mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-22 13:10:13 +00:00
optimize canInsertItem
This commit is contained in:
1 parent
e55d742059
commit
8b9cd4a05e
2 files changed
+10
-17
No files matched your search
@@ -46,20 +46,6 @@ public abstract class AbstractPoweredTaskEntity extends AbstractPowerConsumerEnt
|
||||
return res;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemstack, int j) {
|
||||
if(!super.canInsertItem(i, itemstack, j)) {
|
||||
return false;
|
||||
}
|
||||
if(!isItemValidForSlot(i, itemstack)) {
|
||||
return false;
|
||||
}
|
||||
if(inventory[i] == null) {
|
||||
return true;
|
||||
}
|
||||
return inventory[i].isItemEqual(itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActive() {
|
||||
return currentTask == null ? false : currentTask.getProgress() >= 0 && hasPower() && redstoneCheckPassed;
|
||||
|
||||
Reference in new issue
Block a user