mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 13:09:53 +00:00
cleanup after enabling modern & generic. Primarily changing raw lists to their correct type, changing to pattern variable & enhanced switch and removing unused/unreachable code + ancient comments.
This commit is contained in:
1 parent
e7dc1d9bd4
commit
a5bec6c22b
52 files changed
+273
-489
No files matched your search
@@ -44,8 +44,7 @@ public class ChestSlot extends Slot {
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack itemStack) {
|
||||
if (inventory instanceof ISidedInventory) {
|
||||
ISidedInventory sided = (ISidedInventory) inventory;
|
||||
if (inventory instanceof ISidedInventory sided) {
|
||||
return sided.canInsertItem(this.getSlotIndex(), itemStack, accessSide);
|
||||
}
|
||||
return inventory.isItemValidForSlot(this.getSlotIndex(), itemStack);
|
||||
@@ -53,8 +52,7 @@ public class ChestSlot extends Slot {
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack(EntityPlayer player) {
|
||||
if (inventory instanceof ISidedInventory) {
|
||||
ISidedInventory sided = (ISidedInventory) inventory;
|
||||
if (inventory instanceof ISidedInventory sided) {
|
||||
return sided.canExtractItem(this.getSlotIndex(), this.getStack(), accessSide);
|
||||
}
|
||||
return super.canTakeStack(player);
|
||||
|
||||
Reference in new issue
Block a user