Dont allow batteries to charge other batteries in the inv. Fixes https://github.com/TechReborn/TechReborn/issues/2297

This commit is contained in:
modmuss50 2020-12-20 21:43:53 +00:00
parent c4d9b43832
commit 2ea779acd1

View file

@ -82,7 +82,7 @@ public class BatteryItem extends Item implements EnergyHolder, ItemDurabilityExt
return;
}
if (entity instanceof PlayerEntity) {
ItemUtils.distributePowerToInventory((PlayerEntity) entity, stack, tier.getMaxOutput());
ItemUtils.distributePowerToInventory((PlayerEntity) entity, stack, tier.getMaxOutput(), (testStack) -> !(testStack.getItem() instanceof BatteryItem));
}
}