Files
CatServer/patches/net/minecraft/block/BlockReed.java.patch
2018-07-20 01:14:44 +08:00

18 lines
975 B
Diff

--- ../src-base/minecraft/net/minecraft/block/BlockReed.java
+++ ../src-work/minecraft/net/minecraft/block/BlockReed.java
@@ -56,9 +56,12 @@
if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(worldIn, pos, state, true))
{
- if (j == 15)
+ if (j >= (byte) range(3, ((100.0F / worldIn.spigotConfig.caneModifier) * 15) + 0.5F, 15)) //Spigot
{
- worldIn.setBlockState(pos.up(), this.getDefaultState());
+ // CraftBukkit start
+ BlockPos upPos = pos.up();
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(worldIn, upPos.getX(), upPos.getY(), upPos.getZ(), this, 0);
+ // CraftBukkit end
worldIn.setBlockState(pos, state.withProperty(AGE, Integer.valueOf(0)), 4);
}
else