mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 09:26:08 +03:00
27 lines
1.2 KiB
Diff
27 lines
1.2 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockCactus.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockCactus.java
|
|
@@ -1,6 +1,9 @@
|
|
package net.minecraft.block;
|
|
|
|
import java.util.Random;
|
|
+
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
|
+
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.block.properties.IProperty;
|
|
import net.minecraft.block.properties.PropertyInteger;
|
|
@@ -51,10 +54,11 @@
|
|
|
|
if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(worldIn, blockpos, state, true))
|
|
{
|
|
- if (j == 15)
|
|
+ if (j >= (byte) range(3,((100.0F/ worldIn.spigotConfig.cactusModifier)*15) + 0.5F, 15)) //Spigot
|
|
{
|
|
- worldIn.setBlockState(blockpos, this.getDefaultState());
|
|
IBlockState iblockstate = state.withProperty(AGE, Integer.valueOf(0));
|
|
+
|
|
+ CraftEventFactory.handleBlockGrowEvent(worldIn, pos.getX(), pos.getY(), pos.getZ(), this, 0); // CraftBukkit
|
|
worldIn.setBlockState(pos, iblockstate, 4);
|
|
iblockstate.neighborChanged(worldIn, blockpos, this);
|
|
}
|