mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 09:26:08 +03:00
16 lines
970 B
Diff
16 lines
970 B
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockNetherWart.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockNetherWart.java
|
|
@@ -50,10 +50,10 @@
|
|
{
|
|
int i = ((Integer)state.getValue(AGE)).intValue();
|
|
|
|
- if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(worldIn, pos, state, rand.nextInt(10) == 0))
|
|
+ if (i < 3 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(worldIn, pos, state, rand.nextInt(Math.max(1, (int) (100.0F / worldIn.spigotConfig.wartModifier) * 10)) == 0)) //Spigot
|
|
{
|
|
state = state.withProperty(AGE, Integer.valueOf(i + 1));
|
|
- worldIn.setBlockState(pos, state, 2);
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(worldIn, pos.getX(), pos.getY(), pos.getZ(), this, getMetaFromState(state)); // CraftBukkit
|
|
net.minecraftforge.common.ForgeHooks.onCropsGrowPost(worldIn, pos, state, worldIn.getBlockState(pos));
|
|
}
|
|
|