Fix capabilities

This commit is contained in:
Ellpeck 2016-02-01 17:40:17 +01:00
parent 1e3f0dbe45
commit 091b6cbfc3

View file

@ -216,6 +216,11 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements
return new ChatComponentText(StringUtil.localize(this.getName()));
}
@Override
public boolean hasCapability(net.minecraftforge.common.capabilities.Capability<?> capability, net.minecraft.util.EnumFacing facing){
return this.getCapability(capability, facing) != null;
}
@Override
public <T> T getCapability(Capability<T> capability, EnumFacing facing){
if(facing != null && capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY){