All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minecraft.server.BlockPotatoes Maven / Gradle / Ivy

There is a newer version: 2.4.0
Show newest version
package net.minecraft.server;

public class BlockPotatoes extends BlockCrops {

  public BlockPotatoes() {
  }

  protected Item l() {
    return Items.POTATO;
  }

  protected Item n() {
    return Items.POTATO;
  }

  public void dropNaturally(World world, BlockPosition blockposition, IBlockData iblockdata, float f, int i) {
    super.dropNaturally(world, blockposition, iblockdata, f, i);
    if (!world.isClientSide) {
      if (iblockdata.get(BlockPotatoes.AGE) >= 7 && world.random.nextInt(50) == 0) {
        a(world, blockposition, new ItemStack(Items.POISONOUS_POTATO));
      }

    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy