Fix for machine tank drain. More luv to industrial grinder. (#1254)

* Fix for machine tank drain. More luv to grinder

Fix for empty cell drained from tank.
JEI should honor power units (FE\EU) used.
Fill\drain tank only two times per second in order to avoid game crash
due to ticking entity.
This commit is contained in:
drcrazy 2017-08-29 19:57:21 +03:00 committed by GitHub
parent 63be913878
commit ab1428eb12
3 changed files with 22 additions and 8 deletions

View file

@ -226,7 +226,14 @@ public class DynamicCell extends Item {
@Override
public ItemStack getContainer() {
return new ItemStack(ModItems.CELL, 1);
ItemStack cell;
if (container.hasTagCompound() && container.getTagCompound().hasKey(FLUID_NBT_KEY)) {
cell = super.getContainer();
}
else {
cell = new ItemStack(ModItems.CELL, 1);
}
return cell;
}
}