diff options
author | D-Cysteine <54219287+D-Cysteine@users.noreply.github.com> | 2021-08-01 16:29:52 -0600 |
---|---|---|
committer | D-Cysteine <54219287+D-Cysteine@users.noreply.github.com> | 2021-08-01 16:41:43 -0600 |
commit | 3e59d9f8f2db7d56d9b1431b1e3b93c97752e20a (patch) | |
tree | 93722d4cc0d01c99328b45fb7be0a588868bf57b /src/main/java/gregtech/api/metatileentity/implementations | |
parent | 8680bb2d9a0db42451a277e01d6e881f5c376333 (diff) | |
download | GT5-Unofficial-3e59d9f8f2db7d56d9b1431b1e3b93c97752e20a.tar.gz GT5-Unofficial-3e59d9f8f2db7d56d9b1431b1e3b93c97752e20a.tar.bz2 GT5-Unofficial-3e59d9f8f2db7d56d9b1431b1e3b93c97752e20a.zip |
Add cracked fluid cells
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/implementations')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java index 48d1bd8a18..57f7073e24 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicGenerator.java @@ -245,16 +245,17 @@ public abstract class GT_MetaTileEntity_BasicGenerator extends GT_MetaTileEntity public boolean solidFuelOverride(ItemStack stack) { //this could be used for a coal generator for example aswell... ItemData association = GT_OreDictUnificator.getAssociation(stack); - //if it is a gregtech Item, make sure its not a VOLUMETRIC_FLASK, cell, motlen cell or plasma cell, else do vanilla checks - return association != null ? !OrePrefixes.cell.equals(association.mPrefix) && - !OrePrefixes.cellMolten.equals(association.mPrefix) && - !OrePrefixes.cellPlasma.equals(association.mPrefix) && - !GT_Utility.areStacksEqual(ItemList.VOLUMETRIC_FLASK.get(1L), stack, true) : - stack != null && //when the stack is null its not a solid - stack.getItem() != null && //when the item in the stack is null its not a solid - !(stack.getItem() instanceof IFluidContainerItem) && //when the item is a fluid container its not a solid... - !(stack.getItem() instanceof IFluidHandler) && //when the item is a fluid handler its not a solid... - !stack.getItem().getUnlocalizedName().contains("bucket"); //since we cant really check for buckets... + //if it is a gregtech Item, make sure its not a VOLUMETRIC_FLASK or any type of cell, else do vanilla checks + if (association != null) { + return !OrePrefixes.CELL_TYPES.contains(association.mPrefix) && + !GT_Utility.areStacksEqual(ItemList.VOLUMETRIC_FLASK.get(1L), stack, true); + } else { + return stack != null && //when the stack is null its not a solid + stack.getItem() != null && //when the item in the stack is null its not a solid + !(stack.getItem() instanceof IFluidContainerItem) && //when the item is a fluid container its not a solid... + !(stack.getItem() instanceof IFluidHandler) && //when the item is a fluid handler its not a solid... + !stack.getItem().getUnlocalizedName().contains("bucket"); //since we cant really check for buckets... + } } public abstract int getPollution(); |