mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-27 07:23:33 +00:00
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockNetherWart.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockNetherWart.java
|
|
@@ -58,9 +58,11 @@
|
|
super.updateTick(worldIn, pos, state, rand);
|
|
}
|
|
|
|
+ @SuppressWarnings("unused")
|
|
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
|
|
{
|
|
- if (!worldIn.isRemote)
|
|
+ super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
|
|
+ if (false && !worldIn.isRemote)
|
|
{
|
|
int i = 1;
|
|
|
|
@@ -106,6 +108,26 @@
|
|
return ((Integer)state.getValue(AGE)).intValue();
|
|
}
|
|
|
|
+ @Override
|
|
+ public java.util.List<ItemStack> getDrops(net.minecraft.world.IBlockAccess world, BlockPos pos, IBlockState state, int fortune)
|
|
+ {
|
|
+ java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>();
|
|
+ Random rand = world instanceof World ? ((World)world).rand : new Random();
|
|
+ int count = 1;
|
|
+
|
|
+ if (((Integer)state.getValue(AGE)) >= 3)
|
|
+ {
|
|
+ count = 2 + rand.nextInt(3) + (fortune > 0 ? rand.nextInt(fortune + 1) : 0);
|
|
+ }
|
|
+
|
|
+ for (int i = 0; i < count; i++)
|
|
+ {
|
|
+ ret.add(new ItemStack(Items.nether_wart));
|
|
+ }
|
|
+
|
|
+ return ret;
|
|
+ }
|
|
+
|
|
protected BlockStateContainer createBlockState()
|
|
{
|
|
return new BlockStateContainer(this, new IProperty[] {AGE});
|