mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 09:26:08 +03:00
18 lines
975 B
Diff
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
|