mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 11:49:14 +00:00
Fix #793 frames should not be automated or stack in Apiaries
This commit is contained in:
1 parent
c56f09897c
commit
020f30b418
2 files changed
+11
-2
No files matched your search
@@ -139,12 +139,21 @@ public class TileApiary extends TileBeeHousing {
|
||||
@Override
|
||||
public boolean canSlotAccept(int slotIndex, ItemStack itemStack) {
|
||||
if (Utils.isIndexInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
|
||||
return itemStack.getItem() instanceof IHiveFrame;
|
||||
return (itemStack.getItem() instanceof IHiveFrame) && (getStackInSlot(slotIndex) == null);
|
||||
}
|
||||
|
||||
return super.canSlotAccept(slotIndex, itemStack);
|
||||
}
|
||||
|
||||
// override for pipe automation
|
||||
@Override
|
||||
public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) {
|
||||
if (Utils.isIndexInRange(slotIndex, SLOT_FRAMES_1, SLOT_FRAMES_COUNT)) {
|
||||
return false;
|
||||
}
|
||||
return super.isItemValidForSlot(slotIndex, itemStack);
|
||||
}
|
||||
|
||||
public IInventory getFrameInventory() {
|
||||
return new InventoryMapper(this, SLOT_FRAMES_1, SLOT_FRAMES_COUNT);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public class InventoryAdapterRestricted extends InventoryAdapter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) {
|
||||
public boolean isItemValidForSlot(int slotIndex, ItemStack itemStack) {
|
||||
if (itemStack == null || !accessHandler.allowsPipeConnections()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user