From 1575a8aa62f93ac2339635dc78bca8e73ef49d86 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 18 Jun 2016 17:30:12 +0200 Subject: [PATCH] Fixed nullpointer caused by getting capabilities with null facing --- .../actuallyadditions/mod/tile/TileEntityInventoryBase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java index 5832c1dfe..fc5e1bfff 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java @@ -211,7 +211,7 @@ public abstract class TileEntityInventoryBase extends TileEntityBase implements @Override public T getCapability(Capability capability, EnumFacing facing){ if(this.hasInvWrapperCapabilities() && capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY){ - return (T)this.invWrappers[facing.ordinal()]; + return (T)this.invWrappers[facing == null ? 0 : facing.ordinal()]; } else{ return super.getCapability(capability, facing);