Fix universal bucket not being returned in crafting recipes (#3234)

This commit is contained in:
Marvin Rösch authored and LexManos committed 2016-09-13 00:02:01 -07:00
1 parent 853667c084
commit bf6437c12a
2 files changed
+20

No files matched your search

@@ -79,6 +79,23 @@ public class UniversalBucket extends Item implements IFluidContainerItem
BlockDispenser.DISPENSE_BEHAVIOR_REGISTRY.putObject(this, DispenseFluidContainer.getInstance());
}
@Override
public boolean hasContainerItem(ItemStack stack)
{
return getEmpty() != null;
}
@Override
public ItemStack getContainerItem(ItemStack itemStack)
{
if (getEmpty() != null)
{
// Create a copy such that the game can't mess with it
return getEmpty().copy();
}
return super.getContainerItem(itemStack);
}
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(Item itemIn, CreativeTabs tab, List<ItemStack> subItems)