Created
July 30, 2016 02:15
-
-
Save dazsim/23a8ea1f718ab8de39ee6e610533af19 to your computer and use it in GitHub Desktop.
current version of getdrops for blockBarrel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public ArrayList<ItemStack> getDrops(IBlockAccess world,BlockPos pos, IBlockState state, int fortune) | |
{ | |
ArrayList<ItemStack> items = new ArrayList<ItemStack>(); | |
TileEntity t = world.getTileEntity(pos); | |
if (t instanceof TileEntityBarrel) | |
{ | |
TileEntityBarrel tile = (TileEntityBarrel)t; | |
ItemStack stack = new ItemStack(this,1,tile.getBlockMetadata()); | |
stack.setTagCompound(tile.getTileData()); | |
items.add(stack); | |
} | |
return items; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment