mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 06:24:06 +01:00
16 lines
703 B
Diff
16 lines
703 B
Diff
|
--- a/net/minecraft/server/ItemBoneMeal.java
|
||
|
+++ b/net/minecraft/server/ItemBoneMeal.java
|
||
|
@@ -12,6 +12,12 @@
|
||
|
|
||
|
@Override
|
||
|
public EnumInteractionResult a(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.getWorld();
|
||
|
BlockPosition blockposition = itemactioncontext.getClickPosition();
|
||
|
BlockPosition blockposition1 = blockposition.shift(itemactioncontext.getClickedFace());
|