Disabled putting storage units into other storage units. The overflow can still be triggered in other ways, but players must be very deliberate for that... Co-authored-by: ayutac <fly.high.android@gmail.com>
This commit is contained in:
parent
7be590d01d
commit
10468e762e
3 changed files with 11 additions and 2 deletions
|
@ -73,6 +73,9 @@ class TRItemTagProvider extends ItemTagProvider {
|
|||
getOrCreateTagBuilder(plate.asTag()).add(plate.asItem())
|
||||
getOrCreateTagBuilder(TRContent.ItemTags.PLATES).add(plate.asItem())
|
||||
}
|
||||
TRContent.StorageUnit.values().each {unit ->
|
||||
getOrCreateTagBuilder(TRContent.ItemTags.STORAGE_UNITS).add(unit.asItem())
|
||||
}
|
||||
|
||||
getOrCreateTagBuilder(TRContent.ItemTags.RUBBER_LOGS)
|
||||
.add(TRContent.RUBBER_LOG.asItem())
|
||||
|
|
|
@ -382,13 +382,18 @@ public class StorageUnitBaseBlockEntity extends MachineBaseBlockEntity implement
|
|||
if (slot != INPUT_SLOT) {
|
||||
return false;
|
||||
}
|
||||
if (inputStack == ItemStack.EMPTY){
|
||||
if (inputStack == ItemStack.EMPTY) {
|
||||
return false;
|
||||
}
|
||||
// Do not allow player heads into storage due to lag. Fix #2888
|
||||
if (inputStack.getItem() instanceof SkullItem){
|
||||
if (inputStack.getItem() instanceof SkullItem) {
|
||||
return false;
|
||||
}
|
||||
// do not allow other storage units to avoid NBT overflow. Fix #2580
|
||||
if (inputStack.isIn(TRContent.ItemTags.STORAGE_UNITS)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isLocked()) {
|
||||
return ItemUtils.isItemEqual(lockedItemStack, inputStack, true, true);
|
||||
}
|
||||
|
|
|
@ -286,6 +286,7 @@ public class TRContent {
|
|||
public static final TagKey<Item> GEMS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "gems"));
|
||||
public static final TagKey<Item> NUGGETS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "nuggets"));
|
||||
public static final TagKey<Item> PLATES = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "plates"));
|
||||
public static final TagKey<Item> STORAGE_UNITS = TagKey.of(Registry.ITEM_KEY, new Identifier(TechReborn.MOD_ID, "storage_units"));
|
||||
|
||||
private ItemTags() {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue