Files
2019-02-24 22:29:41 +08:00

25 lines
934 B
Diff

--- ../src-base/minecraft/net/minecraft/block/BlockPotato.java
+++ ../src-work/minecraft/net/minecraft/block/BlockPotato.java
@@ -27,7 +27,7 @@
{
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
- if (!worldIn.isRemote)
+ if (false && !worldIn.isRemote) //Forge: Moved to getDrops
{
if (this.isMaxAge(state) && worldIn.rand.nextInt(50) == 0)
{
@@ -40,4 +40,12 @@
{
return POTATO_AABB[((Integer)state.getValue(this.getAgeProperty())).intValue()];
}
+
+ @Override
+ public void getDrops(net.minecraft.util.NonNullList<ItemStack> drops, net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
+ {
+ super.getDrops(drops, world, pos, state, fortune);
+ if (this.isMaxAge(state) && RANDOM.nextInt(50) == 0)
+ drops.add(new ItemStack(Items.POISONOUS_POTATO));
+ }
}