diff options
| author | miozune <miozune@gmail.com> | 2022-07-15 14:34:19 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-15 06:34:19 +0100 |
| commit | c0eb617fa5c146b7a222c5461faf14394508cf4b (patch) | |
| tree | e25d23490122b5c663fd4e2791a81704c0183b00 /src/main/java/goodgenerator/blocks/tileEntity | |
| parent | 36301feacf5a33ded24d338ae39985da6080d2bb (diff) | |
| download | GT5-Unofficial-c0eb617fa5c146b7a222c5461faf14394508cf4b.tar.gz GT5-Unofficial-c0eb617fa5c146b7a222c5461faf14394508cf4b.tar.bz2 GT5-Unofficial-c0eb617fa5c146b7a222c5461faf14394508cf4b.zip | |
Expand item limit for Neutron Activator & Add back Low Quality Naquadria Sulphate to the outputs from Concentrated Enriched-Naquadah Sludge (#53)
* Expand item limit for Neutron Activator & Add back Low Quality Naquadria Sulphate to the outputs from Concentrated Enriched-Naquadah Sludge
* updateBuildScript & spotlessApply
Diffstat (limited to 'src/main/java/goodgenerator/blocks/tileEntity')
28 files changed, 2510 insertions, 1993 deletions
diff --git a/src/main/java/goodgenerator/blocks/tileEntity/CoolantTower.java b/src/main/java/goodgenerator/blocks/tileEntity/CoolantTower.java index 67dc2b9101..f011934b66 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/CoolantTower.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/CoolantTower.java @@ -1,5 +1,11 @@ package goodgenerator.blocks.tileEntity; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static goodgenerator.util.DescTextLocalization.BLUE_PRINT_INFO; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.util.GT_StructureUtility.ofFrame; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM; import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -21,12 +27,6 @@ import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static goodgenerator.util.DescTextLocalization.BLUE_PRINT_INFO; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.util.GT_StructureUtility.ofFrame; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - public class CoolantTower extends GT_MetaTileEntity_TooltipMultiBlockBase_EM implements IConstructable { protected IStructureDefinition<CoolantTower> multiDefinition = null; @@ -42,38 +42,187 @@ public class CoolantTower extends GT_MetaTileEntity_TooltipMultiBlockBase_EM imp @Override public IStructureDefinition<? extends GT_MetaTileEntity_MultiblockBase_EM> getStructure_EM() { - if(multiDefinition == null) { - multiDefinition = StructureDefinition - .<CoolantTower>builder() - .addShape(mName, - transpose(new String[][]{ - {" ", " ", " BBB ", " B B ", " B B ", " B B ", " B B ", " B B ", " BBB ", " ", " "}, - {" ", " ", " BBB ", " BBBBB ", " BB BB ", " BB BB ", " BB BB ", " BBBBB ", " BBB ", " ", " "}, - {" ", " ", " ", " BBB ", " B B ", " B B ", " B B ", " BBB ", " ", " ", " "}, - {" ", " ", " ", " BBB ", " B B ", " B B ", " B B ", " BBB ", " ", " ", " "}, - {" ", " ", " ", " BBB ", " B B ", " B B ", " B B ", " BBB ", " ", " ", " "}, - {" ", " ", " BBB ", " BBBBB ", " BB BB ", " BB BB ", " BB BB ", " BBBBB ", " BBB ", " ", " "}, - {" ", " ", " BBB ", " B B ", " B B ", " B B ", " B B ", " B B ", " BBB ", " ", " "}, - {" ", " ", " BBB ", " B B ", " B B ", " B B ", " B B ", " B B ", " BBB ", " ", " "}, - {" ", " BBB ", " BBBBB ", " BB BB ", " BB BB ", " BB BB ", " BB BB ", " BB BB ", " BBBBB ", " BBB ", " "}, - {" ", " BBB ", " B B ", " B B ", " B B ", " B B ", " B B ", " B B ", " B B ", " BBB ", " "}, - {" ", " BBBBB ", " BB BB ", " BB BB ", " B B ", " B B ", " B B ", " BB BB ", " BB BB ", " BBBBB ", " "}, - {" HH~HH ", " HBBBBBH ", " HB BH ", "HB BH", "HB BH", "HB BH", "HB BH", "HB BH", " HB BH ", " HBBBBBH ", " HHHHH "}, - {" CCCCC ", " C C ", " C C ", "C C", "C C", "C C", "C C", "C C", " C C ", " C C ", " CCCCC "}, - }) - ).addElement('B', - ofBlockAnyMeta(GregTech_API.sBlockConcretes, 8) - ).addElement('C', - ofFrame(Materials.TungstenCarbide) - ).addElement('H', - ofChain( - ofHatchAdder( - CoolantTower::addIOFluidToMachineList, CASING_INDEX, 1 - ), - ofBlockAnyMeta(GregTech_API.sBlockConcretes, 8) - ) - ) - .build(); + if (multiDefinition == null) { + multiDefinition = StructureDefinition.<CoolantTower>builder() + .addShape(mName, transpose(new String[][] { + { + " ", + " ", + " BBB ", + " B B ", + " B B ", + " B B ", + " B B ", + " B B ", + " BBB ", + " ", + " " + }, + { + " ", + " ", + " BBB ", + " BBBBB ", + " BB BB ", + " BB BB ", + " BB BB ", + " BBBBB ", + " BBB ", + " ", + " " + }, + { + " ", + " ", + " ", + " BBB ", + " B B ", + " B B ", + " B B ", + " BBB ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " BBB ", + " B B ", + " B B ", + " B B ", + " BBB ", + " ", + " ", + " " + }, + { + " ", + " ", + " ", + " BBB ", + " B B ", + " B B ", + " B B ", + " BBB ", + " ", + " ", + " " + }, + { + " ", + " ", + " BBB ", + " BBBBB ", + " BB BB ", + " BB BB ", + " BB BB ", + " BBBBB ", + " BBB ", + " ", + " " + }, + { + " ", + " ", + " BBB ", + " B B ", + " B B ", + " B B ", + " B B ", + " B B ", + " BBB ", + " ", + " " + }, + { + " ", + " ", + " BBB ", + " B B ", + " B B ", + " B B ", + " B B ", + " B B ", + " BBB ", + " ", + " " + }, + { + " ", + " BBB ", + " BBBBB ", + " BB BB ", + " BB BB ", + " BB BB ", + " BB BB ", + " BB BB ", + " BBBBB ", + " BBB ", + " " + }, + { + " ", + " BBB ", + " B B ", + " B B ", + " B B ", + " B B ", + " B B ", + " B B ", + " B B ", + " BBB ", + " " + }, + { + " ", + " BBBBB ", + " BB BB ", + " BB BB ", + " B B ", + " B B ", + " B B ", + " BB BB ", + " BB BB ", + " BBBBB ", + " " + }, + { + " HH~HH ", + " HBBBBBH ", + " HB BH ", + "HB BH", + "HB BH", + "HB BH", + "HB BH", + "HB BH", + " HB BH ", + " HBBBBBH ", + " HHHHH " + }, + { + " CCCCC ", + " C C ", + " C C ", + "C C", + "C C", + "C C", + "C C", + "C C", + " C C ", + " C C ", + " CCCCC " + }, + })) + .addElement('B', ofBlockAnyMeta(GregTech_API.sBlockConcretes, 8)) + .addElement('C', ofFrame(Materials.TungstenCarbide)) + .addElement( + 'H', + ofChain( + ofHatchAdder(CoolantTower::addIOFluidToMachineList, CASING_INDEX, 1), + ofBlockAnyMeta(GregTech_API.sBlockConcretes, 8))) + .build(); } return multiDefinition; } @@ -86,11 +235,11 @@ public class CoolantTower extends GT_MetaTileEntity_TooltipMultiBlockBase_EM imp if (aMetaTileEntity == null) { return false; } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); - return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input)aMetaTileEntity); + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity); } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex); - return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output)aMetaTileEntity); + ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); + return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity); } else { return false; } @@ -112,14 +261,14 @@ public class CoolantTower extends GT_MetaTileEntity_TooltipMultiBlockBase_EM imp protected GT_Multiblock_Tooltip_Builder createTooltip() { final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder(); tt.addMachineType("Coolant Tower") - .addInfo("Controller block for the Coolant Tower.") - .addInfo("Turn Steam back to Distilled Water.") - .addInfo(BLUE_PRINT_INFO) - .addSeparator() - .addController("Mid of the second layer.") - .addInputHatch("Input Hatch", 1) - .addOutputHatch("Output Hatch", 1) - .toolTipFinisher("Good Generator"); + .addInfo("Controller block for the Coolant Tower.") + .addInfo("Turn Steam back to Distilled Water.") + .addInfo(BLUE_PRINT_INFO) + .addSeparator() + .addController("Mid of the second layer.") + .addInputHatch("Input Hatch", 1) + .addOutputHatch("Output Hatch", 1) + .toolTipFinisher("Good Generator"); return tt; } @@ -177,18 +326,40 @@ public class CoolantTower extends GT_MetaTileEntity_TooltipMultiBlockBase_EM imp } @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + public ITexture[] getTexture( + IGregTechTileEntity aBaseMetaTileEntity, + byte aSide, + byte aFacing, + byte aColorIndex, + boolean aActive, + boolean aRedstone) { if (aSide == aFacing) { if (aActive) - return new ITexture[]{ + return new ITexture[] { casingTexturePages[12][6], - TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW).extFacing().glow().build()}; - return new ITexture[]{ + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_ACTIVE_GLOW) + .extFacing() + .glow() + .build() + }; + return new ITexture[] { casingTexturePages[12][6], - TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER).extFacing().build(), - TextureFactory.builder().addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW).extFacing().glow().build()}; + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER) + .extFacing() + .build(), + TextureFactory.builder() + .addIcon(OVERLAY_FRONT_HEAT_EXCHANGER_GLOW) + .extFacing() + .glow() + .build() + }; } - return new ITexture[]{casingTexturePages[12][6]}; + return new ITexture[] {casingTexturePages[12][6]}; } } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaHatch.java b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaHatch.java index 662767d3cf..4c72fff073 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaHatch.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaHatch.java @@ -1,6 +1,7 @@ package goodgenerator.blocks.tileEntity; import goodgenerator.crossmod.thaumcraft.LargeEssentiaEnergyData; +import java.util.ArrayList; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.NetworkManager; @@ -14,8 +15,6 @@ import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.IAspectContainer; import thaumcraft.api.aspects.IEssentiaTransport; -import java.util.ArrayList; - public class EssentiaHatch extends TileEntity implements IAspectContainer, IEssentiaTransport { private Aspect mLocked; @@ -86,17 +85,19 @@ public class EssentiaHatch extends TileEntity implements IAspectContainer, IEsse } public void fillfrompipe() { - if (getEssentiaAmount(null) >= 1000) - return; + if (getEssentiaAmount(null) >= 1000) return; TileEntity[] te = new TileEntity[ForgeDirection.VALID_DIRECTIONS.length]; for (int i = 0; i < ForgeDirection.VALID_DIRECTIONS.length; i++) { - te[i] = ThaumcraftApiHelper.getConnectableTile(this.worldObj, this.xCoord, this.yCoord, this.zCoord, ForgeDirection.VALID_DIRECTIONS[i]); + te[i] = ThaumcraftApiHelper.getConnectableTile( + this.worldObj, this.xCoord, this.yCoord, this.zCoord, ForgeDirection.VALID_DIRECTIONS[i]); if (te[i] != null) { IEssentiaTransport pipe = (IEssentiaTransport) te[i]; if (!pipe.canOutputTo(ForgeDirection.VALID_DIRECTIONS[i])) { return; } - if ((pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i].getOpposite()) != null) && (pipe.getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]) < getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]))) { + if ((pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i].getOpposite()) != null) + && (pipe.getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]) + < getSuctionAmount(ForgeDirection.VALID_DIRECTIONS[i]))) { Aspect readyInput = pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i].getOpposite()); int type = LargeEssentiaEnergyData.getAspectTypeIndex(readyInput); if (type != -1 && (mState & (1 << type)) == 0) continue; @@ -104,7 +105,12 @@ public class EssentiaHatch extends TileEntity implements IAspectContainer, IEsse addToContainer(mLocked, pipe.takeEssentia(mLocked, 1, ForgeDirection.VALID_DIRECTIONS[i])); } if (mLocked == null) - addToContainer(pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]), pipe.takeEssentia(pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]), 1, ForgeDirection.VALID_DIRECTIONS[i])); + addToContainer( + pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]), + pipe.takeEssentia( + pipe.getEssentiaType(ForgeDirection.VALID_DIRECTIONS[i]), + 1, + ForgeDirection.VALID_DIRECTIONS[i])); } } } @@ -159,8 +165,7 @@ public class EssentiaHatch extends TileEntity implements IAspectContainer, IEsse @Override public boolean doesContainerContain(AspectList aspectList) { ArrayList<Boolean> ret = new ArrayList<Boolean>(); - for (Aspect a : aspectList.aspects.keySet()) - ret.add(current.aspects.containsKey(a)); + for (Aspect a : aspectList.aspects.keySet()) ret.add(current.aspects.containsKey(a)); return !ret.contains(false); } @@ -185,7 +190,7 @@ public class EssentiaHatch extends TileEntity implements IAspectContainer, IEsse } @Override - public void setSuction(Aspect aspect, int i) { } + public void setSuction(Aspect aspect, int i) {} @Override public Aspect getSuctionType(ForgeDirection forgeDirection) { diff --git a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java index 77d8004446..b3f3f51aff 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch.java @@ -1,5 +1,6 @@ package goodgenerator.blocks.tileEntity; +import java.util.Map; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraftforge.common.util.ForgeDirection; @@ -9,8 +10,6 @@ import thaumcraft.api.aspects.AspectList; import thaumcraft.api.aspects.IAspectContainer; import thaumcraft.api.aspects.IEssentiaTransport; -import java.util.Map; - public class EssentiaOutputHatch extends TileThaumcraft implements IAspectContainer, IEssentiaTransport { public static final int CAPACITY = 256; @@ -134,8 +133,7 @@ public class EssentiaOutputHatch extends TileThaumcraft implements IAspectContai } @Override - public void setSuction(Aspect var1, int var2) { - } + public void setSuction(Aspect var1, int var2) {} @Override public Aspect getSuctionType(ForgeDirection var1) { diff --git a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java index 8f2c4c920f..44a5bea3c6 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/EssentiaOutputHatch_ME.java @@ -21,12 +21,17 @@ import thaumcraft.api.aspects.AspectList; import thaumicenergistics.api.grid.IEssentiaGrid; import thaumicenergistics.api.grid.IMEEssentiaMonitor; -import java.util.Map; - - -@Optional.InterfaceList(value = { - @Optional.Interface(iface = "appeng.api.networking.security.IActionHost", modid = "appliedenergistics2", striprefs = true), - @Optional.Interface(iface = "appeng.me.helpers.IGridProxyable", modid = "appliedenergistics2", striprefs = true),}) +@Optional.InterfaceList( + value = { + @Optional.Interface( + iface = "appeng.api.networking.security.IActionHost", + modid = "appliedenergistics2", + striprefs = true), + @Optional.Interface( + iface = "appeng.me.helpers.IGridProxyable", + modid = "appliedenergistics2", + striprefs = true), + }) public class EssentiaOutputHatch_ME extends EssentiaOutputHatch implements IActionHost, IGridProxyable { private AENetworkProxy gridProxy = null; @@ -55,30 +60,26 @@ public class EssentiaOutputHatch_ME extends EssentiaOutputHatch implements IActi @Optional.Method(modid = "appliedenergistics2") public void readFromNBT_AENetwork(final NBTTagCompound data) { AENetworkProxy gp = getProxy(); - if (gp != null) - getProxy().readFromNBT(data); + if (gp != null) getProxy().readFromNBT(data); } @TileEvent(TileEventType.WORLD_NBT_WRITE) @Optional.Method(modid = "appliedenergistics2") public void writeToNBT_AENetwork(final NBTTagCompound data) { AENetworkProxy gp = getProxy(); - if (gp != null) - gp.writeToNBT(data); + if (gp != null) gp.writeToNBT(data); } @Optional.Method(modid = "appliedenergistics2") void onChunkUnloadAE() { AENetworkProxy gp = getProxy(); - if (gp != null) - gp.onChunkUnload(); + if (gp != null) gp.onChunkUnload(); } @Optional.Method(modid = "appliedenergistics2") void invalidateAE() { AENetworkProxy gp = getProxy(); - if (gp != null) - gp.invalidate(); + if (gp != null) gp.invalidate(); } @Optional.Method(modid = "appliedenergistics2") @@ -89,8 +90,7 @@ public class EssentiaOutputHatch_ME extends EssentiaOutputHatch implements IActi @Override @Optional.Method(modid = "appliedenergistics2") - public void gridChanged() { - } + public void gridChanged() {} @Override @Optional.Method(modid = "appliedenergistics2") @@ -100,8 +100,7 @@ public class EssentiaOutputHatch_ME extends EssentiaOutputHatch implements IActi @Override @Optional.Method(modid = "appliedenergistics2") - public void securityBreak() { - } + public void securityBreak() {} @Override @Optional.Method(modid = "appliedenergistics2") @@ -168,5 +167,4 @@ public class EssentiaOutputHatch_ME extends EssentiaOutputHatch implements IActi public MachineSource getMachineSource() { return this.asMachineSource; } - } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/ExtremeHeatExchanger.java b/src/main/java/goodgenerator/blocks/tileEntity/ExtremeHeatExchanger.java index b9ce6aa0d4..c7472acfbe 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/ExtremeHeatExchanger.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/ExtremeHeatExchanger.java @@ -1,5 +1,11 @@ package goodgenerator.blocks.tileEntity; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; +import static goodgenerator.util.DescTextLocalization.BLUE_PRINT_INFO; +import static gregtech.api.enums.GT_Values.V; +import static gregtech.api.enums.Textures.BlockIcons.*; +import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; + import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; @@ -28,12 +34,6 @@ import net.minecraft.util.StatCollector; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.*; -import static goodgenerator.util.DescTextLocalization.BLUE_PRINT_INFO; -import static gregtech.api.enums.GT_Values.V; -import static gregtech.api.enums.Textures.BlockIcons.*; -import static gregtech.api.util.GT_StructureUtility.ofHatchAdder; - public class ExtremeHeatExchanger extends GT_MetaTileEntity_TooltipMultiBlockBase_EM implements IConstructable { protected IStructureDefinition<ExtremeHeatExchanger> multiDefinition = null; @@ -56,104 +56,60 @@ public class ExtremeHeatExchanger extends GT_MetaTileEntity_TooltipMultiBlockBas @Override public IStructureDefinition<ExtremeHeatExchanger> getStructure_EM() { - if(multiDefinition == null) { - multiDefinition = StructureDefinition - .<ExtremeHeatExchanger>builder() - .addShape(mName, - transpose(new String[][]{ - {" CCC ", "TTTTT", "TTTTT", "TTTTT", "TTTTT", "TTTTT", "TTTTT", |
