mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-14 01:04:16 +00:00
Fixed crash when corporea funnels or interceptors have empty item frames. Closes #897
This commit is contained in:
1 parent
559d51c529
commit
1d377b8889
2 files changed
+9
-3
No files matched your search
@@ -70,9 +70,12 @@ public class TileCorporeaFunnel extends TileCorporeaBase {
|
||||
for(EntityItemFrame frame : frames) {
|
||||
int orientation = frame.hangingDirection;
|
||||
if(orientationToDir[orientation] == dir.ordinal()) {
|
||||
ItemStack copy = frame.getDisplayedItem().copy();
|
||||
copy.stackSize = rotationToStackSize[frame.getRotation()];
|
||||
filter.add(copy);
|
||||
ItemStack stack = frame.getDisplayedItem();
|
||||
if(stack != null) {
|
||||
ItemStack copy = stack.copy();
|
||||
copy.stackSize = rotationToStackSize[frame.getRotation()];
|
||||
filter.add(copy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,9 @@ public class TileCorporeaInterceptor extends TileCorporeaBase implements ICorpor
|
||||
}
|
||||
|
||||
public boolean requestMatches(Object request, ItemStack filter) {
|
||||
if(filter == null)
|
||||
return false;
|
||||
|
||||
if(request instanceof ItemStack) {
|
||||
ItemStack stack = (ItemStack) request;
|
||||
return stack != null && stack.isItemEqual(filter) && ItemStack.areItemStacksEqual(filter, stack);
|
||||
|
||||
Reference in new issue
Block a user