mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-09 16:42:03 -07:00
Update to Minecraft 1.13-pre7
This commit is contained in:
@@ -1,35 +1,29 @@
|
||||
--- a/net/minecraft/server/BlockCocoa.java
|
||||
+++ b/net/minecraft/server/BlockCocoa.java
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
import java.util.Random;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
||||
+
|
||||
public class BlockCocoa extends BlockFacingHorizontal implements IBlockFragilePlantElement {
|
||||
|
||||
public static final BlockStateInteger AGE = BlockStateInteger.of("age", 0, 2);
|
||||
@@ -23,7 +25,10 @@
|
||||
public static final BlockStateInteger AGE = BlockProperties.S;
|
||||
@@ -21,7 +23,7 @@
|
||||
int i = ((Integer) iblockdata.get(BlockCocoa.AGE)).intValue();
|
||||
|
||||
if (i < 2) {
|
||||
- world.setTypeAndData(blockposition, iblockdata.set(BlockCocoa.AGE, Integer.valueOf(i + 1)), 2);
|
||||
+ // CraftBukkit start
|
||||
+ IBlockData data = iblockdata.set(AGE, Integer.valueOf(i + 1));
|
||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(data));
|
||||
+ // CraftBukkit end
|
||||
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(i + 1)), 2);
|
||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(i + 1)), 2); // CraftBukkkit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +129,10 @@
|
||||
@@ -109,7 +111,7 @@
|
||||
}
|
||||
|
||||
public void b(World world, Random random, BlockPosition blockposition, IBlockData iblockdata) {
|
||||
- world.setTypeAndData(blockposition, iblockdata.set(BlockCocoa.AGE, Integer.valueOf(((Integer) iblockdata.get(BlockCocoa.AGE)).intValue() + 1)), 2);
|
||||
+ // CraftBukkit start
|
||||
+ IBlockData data = iblockdata.set(AGE, Integer.valueOf(((Integer) iblockdata.get(AGE)).intValue() + 1));
|
||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this, toLegacyData(data));
|
||||
+ // CraftBukkit end
|
||||
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(((Integer) iblockdata.get(BlockCocoa.AGE)).intValue() + 1)), 2);
|
||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(((Integer) iblockdata.get(BlockCocoa.AGE)).intValue() + 1)), 2); // CraftBukkit
|
||||
}
|
||||
|
||||
public IBlockData fromLegacyData(int i) {
|
||||
public TextureType c() {
|
||||
|
Reference in New Issue
Block a user