Fixed picking up certain blocks, closes #921

This commit is contained in:
GirafiStudios 2016-12-04 09:51:21 +01:00
parent 1f0140167f
commit 6258ede756

View file

@ -53,7 +53,7 @@ public class AchievementEventHandler
ItemStack stack = event.getItem().getEntityItem(); ItemStack stack = event.getItem().getEntityItem();
Item item = stack.getItem(); Item item = stack.getItem();
IBlockState state = Block.getBlockFromItem(item).getStateFromMeta(item.getMetadata(stack.getMetadata())); IBlockState state = Block.getBlockFromItem(item).getStateFromMeta(item.getMetadata(stack));
Block block = state.getBlock(); Block block = state.getBlock();
EntityPlayer player = event.getEntityPlayer(); EntityPlayer player = event.getEntityPlayer();
@ -174,7 +174,7 @@ public class AchievementEventHandler
if (stack != null) if (stack != null)
{ {
Item item = stack.getItem(); Item item = stack.getItem();
IBlockState state = Block.getBlockFromItem(item).getStateFromMeta(item.getMetadata(stack.getMetadata())); IBlockState state = Block.getBlockFromItem(item).getStateFromMeta(item.getMetadata(stack));
try try
{ {