PaperMC/paper-server/nms-patches/net/minecraft/world/item/ItemBoneMeal.patch
CraftBukkit/Spigot 9ee989ea81 Update to Minecraft 1.18.2
By: md_5 <git@md-5.net>
2022-03-01 02:00:00 +11:00

15 lines
715 B
Diff

--- a/net/minecraft/world/item/ItemBoneMeal.java
+++ b/net/minecraft/world/item/ItemBoneMeal.java
@@ -33,6 +33,12 @@
@Override
public EnumInteractionResult useOn(ItemActionContext itemactioncontext) {
+ // CraftBukkit start - extract bonemeal application logic to separate, static method
+ return applyBonemeal(itemactioncontext);
+ }
+
+ public static EnumInteractionResult applyBonemeal(ItemActionContext itemactioncontext) {
+ // CraftBukkit end
World world = itemactioncontext.getLevel();
BlockPosition blockposition = itemactioncontext.getClickedPos();
BlockPosition blockposition1 = blockposition.relative(itemactioncontext.getClickedFace());