Fixed up Shearable blocks to play nicer with sub-classes.

This commit is contained in:
LexManos 2012-02-24 20:28:59 -08:00
parent 964b33f2c7
commit a50f2a094d
6 changed files with 6 additions and 6 deletions

View file

@ -45,7 +45,7 @@
+ public ArrayList<ItemStack> onSheared(ItemStack item, World world, int X, int Y, int Z, int fortune)
+ {
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
+ ret.add(new ItemStack(Block.leaves.blockID, 1, world.getBlockMetadata(X, Y, Z) & 3));
+ ret.add(new ItemStack(this, 1, world.getBlockMetadata(X, Y, Z) & 3));
+ return ret;
+ }
}

View file

@ -75,7 +75,7 @@
+ public ArrayList<ItemStack> onSheared(ItemStack item, World world, int X, int Y, int Z, int fortune)
+ {
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
+ ret.add(new ItemStack(Block.tallGrass, 1, world.getBlockMetadata(X, Y, Z)));
+ ret.add(new ItemStack(this, 1, world.getBlockMetadata(X, Y, Z)));
+ return ret;
}
}

View file

@ -39,7 +39,7 @@
+ public ArrayList<ItemStack> onSheared(ItemStack item, World world, int X, int Y, int Z, int fortune)
+ {
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
+ ret.add(new ItemStack(Block.vine, 1, 0));
+ ret.add(new ItemStack(this, 1, 0));
+ return ret;
}
}

View file

@ -45,7 +45,7 @@
+ public ArrayList<ItemStack> onSheared(ItemStack item, World world, int X, int Y, int Z, int fortune)
+ {
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
+ ret.add(new ItemStack(Block.leaves.blockID, 1, world.getBlockMetadata(X, Y, Z) & 3));
+ ret.add(new ItemStack(this, 1, world.getBlockMetadata(X, Y, Z) & 3));
+ return ret;
+ }
}

View file

@ -71,7 +71,7 @@
+ public ArrayList<ItemStack> onSheared(ItemStack item, World world, int X, int Y, int Z, int fortune)
+ {
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
+ ret.add(new ItemStack(Block.tallGrass, 1, world.getBlockMetadata(X, Y, Z)));
+ ret.add(new ItemStack(this, 1, world.getBlockMetadata(X, Y, Z)));
+ return ret;
}
}

View file

@ -39,7 +39,7 @@
+ public ArrayList<ItemStack> onSheared(ItemStack item, World world, int X, int Y, int Z, int fortune)
+ {
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
+ ret.add(new ItemStack(Block.vine, 1, 0));
+ ret.add(new ItemStack(this, 1, 0));
+ return ret;
}
}