diff --git a/dependencies.gradle b/dependencies.gradle index d6ca4ceabcb..e4e7bf8631c 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -34,20 +34,20 @@ * For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph */ dependencies { - api("com.github.GTNewHorizons:StructureLib:1.4.0:dev") + api("com.github.GTNewHorizons:StructureLib:1.4.2:dev") api("net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev") - api("com.github.GTNewHorizons:NotEnoughItems:2.7.4-GTNH:dev") + api("com.github.GTNewHorizons:NotEnoughItems:2.7.13-GTNH:dev") api("com.github.GTNewHorizons:NotEnoughIds:2.1.6:dev") api("com.github.GTNewHorizons:GTNHLib:0.6.0:dev") api("com.github.GTNewHorizons:ModularUI:1.2.17:dev") - api("com.github.GTNewHorizons:ModularUI2:2.1.16-1.7.10:dev") + api("com.github.GTNewHorizons:ModularUI2:2.2.0-1.7.10:dev") api("com.github.GTNewHorizons:waila:1.8.2:dev") - api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-507-GTNH:dev") - api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.4.2-gtnh:dev") + api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-518-GTNH:dev") + api("com.github.GTNewHorizons:AE2FluidCraft-Rework:1.4.14-gtnh:dev") api('com.github.GTNewHorizons:Yamcl:0.6.0:dev') api("com.github.GTNewHorizons:Postea:1.0.13:dev") - compileOnlyApi('com.github.GTNewHorizons:ThaumicTinkerer:2.11.0:dev') + compileOnlyApi('com.github.GTNewHorizons:ThaumicTinkerer:2.11.1:dev') compileOnlyApi("com.github.GTNewHorizons:Mobs-Info:0.5.0-GTNH:dev") compileOnlyApi("com.github.GTNewHorizons:Navigator:1.0.15:dev") implementation('com.github.GTNewHorizons:Baubles:1.0.4:dev') {transitive=false} @@ -56,57 +56,57 @@ dependencies { devOnlyNonPublishable("com.github.GTNewHorizons:Infernal-Mobs:1.10.0-GTNH:dev") - compileOnlyApi("com.github.GTNewHorizons:Avaritia:1.57:dev") + compileOnlyApi("com.github.GTNewHorizons:Avaritia:1.59:dev") - compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta27:api') { transitive = false } + compileOnlyApi('com.github.GTNewHorizons:Angelica:1.0.0-beta28:api') { transitive = false } compileOnlyApi("com.github.GTNewHorizons:AppleCore:3.3.4:dev") { transitive = false } - compileOnlyApi("com.github.GTNewHorizons:BuildCraft:7.1.39:dev") { transitive = false } - compileOnlyApi("com.github.GTNewHorizons:EnderIO:2.9.0:dev") { transitive = false } - compileOnlyApi("com.github.GTNewHorizons:ForestryMC:4.10.0:dev") { transitive = false } - compileOnlyApi("com.github.GTNewHorizons:ProjectRed:4.10.5-GTNH:dev") { transitive = false } - compileOnlyApi("com.github.GTNewHorizons:Railcraft:9.15.15:dev") { transitive = false } + compileOnlyApi("com.github.GTNewHorizons:BuildCraft:7.1.42:dev") { transitive = false } + compileOnlyApi("com.github.GTNewHorizons:EnderIO:2.9.2:dev") { transitive = false } + compileOnlyApi("com.github.GTNewHorizons:ForestryMC:4.10.1:dev") { transitive = false } + compileOnlyApi("com.github.GTNewHorizons:ProjectRed:4.11.0-GTNH:dev") { transitive = false } + compileOnlyApi("com.github.GTNewHorizons:Railcraft:9.16.1:dev") { transitive = false } compileOnly("TGregworks:TGregworks:1.7.10-GTNH-1.0.27:deobf") {transitive = false} - compileOnly("com.github.GTNewHorizons:ThaumicBases:1.8.0:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:ThaumicBases:1.8.2:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:EnderCore:0.4.6:dev") { transitive = false } compileOnly('com.github.GTNewHorizons:VisualProspecting:1.3.28:dev') { transitive = false } - compileOnly("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.104-GTNH:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Galaxy-Space-GTNH:1.1.106-GTNH:dev") { transitive = false } - compileOnlyApi("com.github.GTNewHorizons:Galacticraft:3.2.8-GTNH:dev") { transitive = false } - implementation("com.github.GTNewHorizons:TinkersConstruct:1.13.0-GTNH:dev") + compileOnlyApi("com.github.GTNewHorizons:Galacticraft:3.3.1-GTNH:dev") { transitive = false } + implementation("com.github.GTNewHorizons:TinkersConstruct:1.13.3-GTNH:dev") - compileOnly("com.github.GTNewHorizons:Chisel:2.16.0-GTNH:dev") { transitive = false } - compileOnly("com.github.GTNewHorizons:Translocators:1.2.1:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Chisel:2.16.1-GTNH:dev") { transitive = false } + compileOnly("com.github.GTNewHorizons:Translocators:1.3.0:dev") { transitive = false } compileOnly rfg.deobf("curse.maven:cofh-core-69162:2388751") compileOnly("com.github.GTNewHorizons:Nuclear-Control:2.6.7:dev") { transitive = false } compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { transitive = false } - implementation("com.github.GTNewHorizons:Hodgepodge:2.6.6:dev") - compileOnly('com.github.GTNewHorizons:Botania:1.12.2-GTNH:dev') { transitive = false } - compileOnly('com.github.GTNewHorizons:HoloInventory:2.4.13-GTNH:dev') { transitive = false } + implementation("com.github.GTNewHorizons:Hodgepodge:2.6.13:dev") + compileOnly('com.github.GTNewHorizons:Botania:1.12.3-GTNH:dev') { transitive = false } + compileOnly('com.github.GTNewHorizons:HoloInventory:2.5.0-GTNH:dev') { transitive = false } compileOnly rfg.deobf("curse.maven:extra-utilities-225561:2264384") compileOnly rfg.deobf('curse.maven:minefactory-reloaded-66672:2366150') - compileOnly("com.github.GTNewHorizons:OpenComputers:1.11.1-GTNH:dev") {transitive = false} + compileOnly("com.github.GTNewHorizons:OpenComputers:1.11.2-GTNH:dev") {transitive = false} // https://www.curseforge.com/minecraft/mc-mods/advancedsolarpanels compileOnlyApi rfg.deobf('curse.maven:advsolar-362768:2885953') - compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.0-GTNH:dev') {transitive = false} - compileOnly("com.github.GTNewHorizons:BloodMagic:1.6.9:dev") { transitive = false } + compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.2-GTNH:dev') {transitive = false} + compileOnly("com.github.GTNewHorizons:BloodMagic:1.7.0:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:CraftTweaker:3.4.0:dev") { transitive = false } compileOnly("com.github.GTNewHorizons:BetterLoadingScreen:1.7.0-GTNH:dev") { transitive = false } compileOnly rfg.deobf("curse.maven:biomes-o-plenty-220318:2499612") - compileOnly('com.github.GTNewHorizons:SC2:2.2.0:dev') {transitive=false} - compileOnly('com.github.GTNewHorizons:Binnie:2.5.0:dev') {transitive = false} + compileOnly('com.github.GTNewHorizons:SC2:2.3.0:dev') {transitive=false} + compileOnly('com.github.GTNewHorizons:Binnie:2.5.2:dev') {transitive = false} compileOnly('curse.maven:PlayerAPI-228969:2248928') {transitive=false} - devOnlyNonPublishable('com.github.GTNewHorizons:BlockRenderer6343:1.2.16:dev'){transitive=false} + devOnlyNonPublishable('com.github.GTNewHorizons:BlockRenderer6343:1.3.0:dev'){transitive=false} compileOnly("com.google.auto.value:auto-value-annotations:1.10.1") { transitive = false } annotationProcessor("com.google.auto.value:auto-value:1.10.1") // For testing forestry integration (iApiary, combs, tree growth simulator) - // runtimeOnlyNonPublishable("com.github.GTNewHorizons:ForestryMC:4.10.0:dev") + // runtimeOnlyNonPublishable("com.github.GTNewHorizons:ForestryMC:4.10.1:dev") // runtimeOnlyNonPublishable('com.github.GTNewHorizons:neiaddons:1.16.0:dev') - // runtimeOnlyNonPublishable('com.github.GTNewHorizons:MagicBees:2.8.5-GTNH:dev') - // runtimeOnlyNonPublishable('com.github.GTNewHorizons:Binnie:2.5.0:dev') + // runtimeOnlyNonPublishable('com.github.GTNewHorizons:MagicBees:2.9.0-GTNH:dev') + // runtimeOnlyNonPublishable('com.github.GTNewHorizons:Binnie:2.5.2:dev') testImplementation(platform('org.junit:junit-bom:5.9.2')) testImplementation('org.junit.jupiter:junit-jupiter') @@ -119,7 +119,7 @@ dependencies { functionalTestImplementation('org.junit.platform:junit-platform-reporting') runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.3.4:dev") - runtimeOnlyNonPublishable('com.github.GTNewHorizons:EnderIO:2.9.0:dev') + runtimeOnlyNonPublishable('com.github.GTNewHorizons:EnderIO:2.9.2:dev') // For testing //runtimeOnlyNonPublishable('com.github.GTNewHorizons:TCNEIAdditions:1.4.2:dev') diff --git a/src/main/java/bartworks/API/GlassTier.java b/src/main/java/bartworks/API/GlassTier.java index 64612549c9a..897deddddbe 100644 --- a/src/main/java/bartworks/API/GlassTier.java +++ b/src/main/java/bartworks/API/GlassTier.java @@ -34,7 +34,7 @@ public static void addCustomGlass(String modname, String unlocalisedBlockName, i public static void addCustomGlass(@NotNull Block block, int meta, int tier) { Objects.requireNonNull(block, "Glass block cannot be null"); - GlassTier.glasses.put(new BlockMetaPair(block, (byte) meta), tier); + GlassTier.glasses.put(new BlockMetaPair(block, meta), tier); } public static HashMap getGlassMap() { @@ -42,7 +42,7 @@ public static HashMap getGlassMap() { } public static int getGlassTier(Block block, int meta) { - return glasses.getOrDefault(new BlockMetaPair(block, (byte) meta), 0); + return glasses.getOrDefault(new BlockMetaPair(block, meta), 0); } public static class BlockMetaPair { diff --git a/src/main/java/bartworks/common/loaders/recipes/Assembler.java b/src/main/java/bartworks/common/loaders/recipes/Assembler.java index d3bf75812fc..4cbff4e4c35 100644 --- a/src/main/java/bartworks/common/loaders/recipes/Assembler.java +++ b/src/main/java/bartworks/common/loaders/recipes/Assembler.java @@ -120,6 +120,17 @@ public void run() { .eut(TierEU.RECIPE_MV) .addTo(assemblerRecipes); + GTValues.RA.stdBuilder() + .itemInputs( + ItemList.MACHINE_HULLS[3].get(1), + ItemList.Electric_Pump_HV.get(2), + GTOreDictUnificator.get(OrePrefixes.circuit, Materials.EV, 4), + GTOreDictUnificator.get(OrePrefixes.pipeLarge, Materials.StainlessSteel, 2)) + .itemOutputs(ItemList.Distillation_Tower.get(1)) + .duration(10 * SECONDS) + .eut(30) + .addTo(assemblerRecipes); + GTValues.RA.stdBuilder() .itemInputs( ItemList.Hatch_Input_HV.get(64), diff --git a/src/main/java/bartworks/common/loaders/recipes/AssemblyLine.java b/src/main/java/bartworks/common/loaders/recipes/AssemblyLine.java index 2613a8c3b5a..095f123d3a2 100644 --- a/src/main/java/bartworks/common/loaders/recipes/AssemblyLine.java +++ b/src/main/java/bartworks/common/loaders/recipes/AssemblyLine.java @@ -57,8 +57,8 @@ public void run() { WerkstoffLoader.LuVTierMaterial.get(OrePrefixes.plate, 8)) .fluidInputs(new FluidStack(solderIndalloy, 1440)) .itemOutputs(ItemRegistry.cal.copy()) - .eut(TierEU.RECIPE_LuV) - .duration(20 * MINUTES) + .eut(TierEU.RECIPE_ZPM) + .duration(60 * SECONDS) .addTo(AssemblyLine); } } diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java b/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java index e61650e4923..f65b9d61bfc 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTEBioVat.java @@ -818,7 +818,7 @@ public boolean supportsBatchMode() { @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { if (aPlayer.isSneaking()) { batchMode = !batchMode; if (batchMode) { diff --git a/src/main/java/bartworks/common/tileentities/multis/MTECircuitAssemblyLine.java b/src/main/java/bartworks/common/tileentities/multis/MTECircuitAssemblyLine.java index 17aade3cf28..744e0c0f68c 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTECircuitAssemblyLine.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTECircuitAssemblyLine.java @@ -588,14 +588,13 @@ protected boolean supportsSlotAutomation(int aSlot) { @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { if (!aPlayer.isSneaking()) { if (mode == 0) return false; inputSeparation = !inputSeparation; GTUtility.sendChatToPlayer( aPlayer, StatCollector.translateToLocal("GT5U.machines.separatebus") + " " + inputSeparation); - return true; } else { batchMode = !batchMode; if (batchMode) { @@ -603,8 +602,8 @@ public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrench } else { GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff")); } - return true; } + return true; } @Override diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java b/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java index 4eb7e37edc5..dd74cfc8364 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTEElectricImplosionCompressor.java @@ -50,6 +50,7 @@ import org.apache.commons.lang3.tuple.Pair; import org.jetbrains.annotations.NotNull; +import com.google.common.collect.ImmutableList; import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; @@ -89,6 +90,7 @@ import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; +import gregtech.api.util.shutdown.ShutDownReason; public class MTEElectricImplosionCompressor extends MTEExtendedPowerMultiBlockBase implements ISurvivalConstructable { @@ -198,21 +200,15 @@ public PlaceResult survivalPlaceBlock(MTEElectricImplosionCompressor t, World wo .build(); public static List> getAllBlockTiers() { - return new ArrayList<>() { - - private static final long serialVersionUID = 8171991663102417651L; - - { - this.add(Pair.of(GregTechAPI.sBlockMetal5, 2)); - if (Mods.Avaritia.isModLoaded()) { - this.add(Pair.of(LudicrousBlocks.resource_block, 1)); - } - this.add(Pair.of(GregTechAPI.sBlockMetal9, 4)); - this.add(Pair.of(GregTechAPI.sBlockMetal9, 3)); - this.add(Pair.of(GregTechAPI.sBlockMetal9, 8)); - } - - }; + ImmutableList.Builder> b = new ImmutableList.Builder<>(); + b.add(Pair.of(GregTechAPI.sBlockMetal5, 2)); + if (Mods.Avaritia.isModLoaded()) { + b.add(Pair.of(LudicrousBlocks.resource_block, 1)); + } + b.add(Pair.of(GregTechAPI.sBlockMetal9, 4)); + b.add(Pair.of(GregTechAPI.sBlockMetal9, 3)); + b.add(Pair.of(GregTechAPI.sBlockMetal9, 8)); + return b.build(); } public static ITierConverter tieredBlockConverter() { @@ -374,9 +370,9 @@ public boolean isCorrectMachinePart(ItemStack itemStack) { } @Override - public void stopMachine() { + public void stopMachine(@NotNull ShutDownReason reason) { this.resetPiston(this.mBlockTier); - super.stopMachine(); + super.stopMachine(reason); } private void resetPiston(int tier) { @@ -427,13 +423,12 @@ private void animatePiston(IGregTechTileEntity aBaseMetaTileEntity) { aBaseMetaTileEntity.getWorld(), this.chunkCoordinates.get(2).posX, this.chunkCoordinates.get(2).posY, - this.chunkCoordinates.get(2).posZ, - 10); + this.chunkCoordinates.get(2).posZ); } @SideOnly(Side.CLIENT) - private void spawnVisualPistonBlocks(World world, int x, int y, int z, int age) { - EICPistonVisualizer pistonVisualizer = new EICPistonVisualizer(world, x, y, z, age); + private void spawnVisualPistonBlocks(World world, int x, int y, int z) { + EICPistonVisualizer pistonVisualizer = new EICPistonVisualizer(world, x, y, z, 10); Minecraft.getMinecraft().effectRenderer.addEffect(pistonVisualizer); } @@ -536,7 +531,7 @@ public boolean supportsBatchMode() { @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { if (aPlayer.isSneaking()) { batchMode = !batchMode; if (batchMode) { diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEHighTempGasCooledReactor.java b/src/main/java/bartworks/common/tileentities/multis/MTEHighTempGasCooledReactor.java index 7261876bfbf..8f1fef97e4a 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTEHighTempGasCooledReactor.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTEHighTempGasCooledReactor.java @@ -30,6 +30,8 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import org.jetbrains.annotations.NotNull; + import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; @@ -51,10 +53,14 @@ import gregtech.api.metatileentity.implementations.MTEHatchInput; import gregtech.api.metatileentity.implementations.MTEHatchOutputBus; import gregtech.api.recipe.RecipeMap; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTLanguageManager; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.api.util.shutdown.ShutDownReasonRegistry; +import gregtech.api.util.shutdown.SimpleShutDownReason; public class MTEHighTempGasCooledReactor extends MTEEnhancedMultiBlockBase { @@ -257,23 +263,23 @@ protected boolean filtersFluid() { } @Override - public boolean checkRecipe(ItemStack controllerStack) { + public @NotNull CheckRecipeResult checkProcessing() { if (this.empty) { if (this.HeliumSupply > 0 || this.fuelsupply > 0) { this.mEfficiency = 10000; this.mMaxProgresstime = 100; - return true; + return CheckRecipeResultRegistry.SUCCESSFUL; } - return false; + return CheckRecipeResultRegistry.NO_RECIPE; } if (this.HeliumSupply < MTEHighTempGasCooledReactor.HELIUM_NEEDED || this.fuelsupply < mincapacity) - return false; + return CheckRecipeResultRegistry.NO_RECIPE; double eff = Math.min(Math.pow((double) this.fuelsupply / (double) mincapacity, 2D), 100D) / 100D - (this.getIdealStatus() - this.getRepairStatus()) / 10D; - if (eff <= 0) return false; + if (eff <= 0) return CheckRecipeResultRegistry.NO_RECIPE; int toReduce = MathUtils.floorInt(this.fuelsupply * 0.025D * eff); @@ -285,7 +291,7 @@ public boolean checkRecipe(ItemStack controllerStack) { ItemStack[] toOutput = { new ItemStack(HTGRMaterials.aHTGR_Materials, burnedballs, meta), new ItemStack(HTGRMaterials.aHTGR_Materials, toReduce, meta + 1) }; - if (!this.canOutputAll(toOutput)) return false; + if (!this.canOutputAll(toOutput)) return CheckRecipeResultRegistry.NO_RECIPE; this.fuelsupply -= originalToReduce; this.mOutputItems = toOutput; @@ -298,7 +304,7 @@ public boolean checkRecipe(ItemStack controllerStack) { this.mEfficiencyIncrease = 0; this.mEUt = -powerUsage; this.mMaxProgresstime = (int) (72000 * (1d - eff / 2d)); - return true; + return CheckRecipeResultRegistry.SUCCESSFUL; } private int runningtick = 0; @@ -344,7 +350,7 @@ public boolean onRunningTick(ItemStack aStack) { } // USE DA POWAH if (!this.drainEnergyInput(-this.mEUt)) { - this.criticalStopMachine(); + this.stopMachine(ShutDownReasonRegistry.POWER_LOSS); return false; } @@ -366,7 +372,7 @@ public boolean onRunningTick(ItemStack aStack) { this.updateSlots(); - if (takecoolant > 0) this.stopMachine(); + if (takecoolant > 0) this.stopMachine(SimpleShutDownReason.ofNormal("no_coolant")); } return true; diff --git a/src/main/java/bartworks/common/tileentities/multis/MTELESU.java b/src/main/java/bartworks/common/tileentities/multis/MTELESU.java index 4d91348abb3..0320ecfcd0f 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTELESU.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTELESU.java @@ -28,6 +28,8 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import org.jetbrains.annotations.NotNull; + import com.gtnewhorizons.modularui.api.NumberFormatMUI; import com.gtnewhorizons.modularui.api.drawable.Text; import com.gtnewhorizons.modularui.api.forge.ItemStackHandler; @@ -59,6 +61,8 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTEMultiBlockBase; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; @@ -140,11 +144,6 @@ public long maxEUOutput() { return Math.min(Math.max(this.mStorage / Configuration.multiblocks.energyPerCell, 1L), 32768L); } - @Override - public int rechargerSlotStartIndex() { - return 0; - } - @Override public int rechargerSlotCount() { return 1; @@ -312,8 +311,8 @@ public boolean isCorrectMachinePart(ItemStack itemStack) { } @Override - public boolean checkRecipe(ItemStack itemStack) { - return true; + public @NotNull CheckRecipeResult checkProcessing() { + return CheckRecipeResultRegistry.SUCCESSFUL; } @Override diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEManualTrafo.java b/src/main/java/bartworks/common/tileentities/multis/MTEManualTrafo.java index 69fe99e45fb..2c9a22dd9b6 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTEManualTrafo.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTEManualTrafo.java @@ -17,7 +17,6 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; -import static gregtech.api.enums.GTValues.V; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_ELECTRIC_BLAST_FURNACE_ACTIVE_GLOW; @@ -31,6 +30,8 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import org.jetbrains.annotations.NotNull; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.IStructureElementNoPlacement; @@ -45,9 +46,12 @@ import gregtech.api.metatileentity.implementations.MTEHatchDynamo; import gregtech.api.metatileentity.implementations.MTEHatchEnergy; import gregtech.api.metatileentity.implementations.MTETieredMachineBlock; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.api.util.shutdown.ShutDownReasonRegistry; public class MTEManualTrafo extends MTEEnhancedMultiBlockBase { @@ -158,7 +162,7 @@ public boolean isCorrectMachinePart(ItemStack itemStack) { @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { if (!this.getBaseMetaTileEntity() - .isAllowedToWork()) this.stopMachine(); + .isAllowedToWork()) this.stopMachine(ShutDownReasonRegistry.CRITICAL_NONE); super.onPostTick(aBaseMetaTileEntity, aTick); } @@ -166,7 +170,7 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { public boolean onRunningTick(ItemStack aStack) { if (!this.getBaseMetaTileEntity() .isAllowedToWork()) { - this.stopMachine(); + this.stopMachine(ShutDownReasonRegistry.CRITICAL_NONE); return false; } @@ -185,25 +189,6 @@ public boolean onRunningTick(ItemStack aStack) { this.getInputTier() * 2 * this.mEnergyHatches.size() * this.mEfficiency / this.getMaxEfficiency(null)); } - public boolean onRunningTickTabbedMode() { - boolean ret = false; - for (MTEHatchDynamo E : this.mDynamoHatches) { - for (MTEHatchEnergy I : this.mEnergyHatches) { - - long vtt = I.getEUVar() >= V[E.mTier] / 2 && E.getEUVar() < E.maxEUStore() ? I.getEUVar() : 0; - - if (vtt == 0) continue; - - long vtp = E.getEUVar() + vtt; - long avt = Math.min(vtp, E.maxEUStore()); - E.setEUVar(avt); - I.setEUVar(I.getEUVar() - vtt); - ret = true; - } - } - return ret; - } - @Override public long getInputTier() { if (!this.mEnergyHatches.isEmpty()) return GTUtility.getTier( @@ -223,13 +208,15 @@ public long getOutputTier() { } @Override - public boolean checkRecipe(ItemStack itemStack) { + public @NotNull CheckRecipeResult checkProcessing() { if (!this.getBaseMetaTileEntity() .isAllowedToWork()) { - this.stopMachine(); - return false; + this.stopMachine(ShutDownReasonRegistry.CRITICAL_NONE); + return CheckRecipeResultRegistry.NONE; } + + ItemStack itemStack = getControllerSlot(); if (itemStack == null || !itemStack.getUnlocalizedName() .startsWith("gt.integrated_circuit")) this.mode = 0; else this.mode = (byte) Math.min(3, itemStack.getItemDamage()); @@ -237,8 +224,17 @@ public boolean checkRecipe(ItemStack itemStack) { this.mProgresstime = 0; this.mMaxProgresstime = 1; this.mEfficiency = Math.max(this.mEfficiency, 100); - return this.upstep ? this.getOutputTier() - this.getInputTier() == this.mTiers - : this.getInputTier() - this.getOutputTier() == this.mTiers; + + if (this.upstep) { + if (this.getOutputTier() - this.getInputTier() == this.mTiers) { + return CheckRecipeResultRegistry.SUCCESSFUL; + } + } else { + if (this.getInputTier() - this.getOutputTier() == this.mTiers) { + return CheckRecipeResultRegistry.SUCCESSFUL; + } + } + return CheckRecipeResultRegistry.NO_RECIPE; } @Override diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEThoriumHighTempReactor.java b/src/main/java/bartworks/common/tileentities/multis/MTEThoriumHighTempReactor.java index 21ed72cf4cf..75f1b3f7f3a 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTEThoriumHighTempReactor.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTEThoriumHighTempReactor.java @@ -27,6 +27,8 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import org.jetbrains.annotations.NotNull; + import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; @@ -43,6 +45,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase; import gregtech.api.metatileentity.implementations.MTEHatchInput; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; @@ -50,6 +54,16 @@ public class MTEThoriumHighTempReactor extends MTEEnhancedMultiBlockBase { private static final int BASECASINGINDEX = 44; + private int mCasingAmount = 0; + + private static final int HELIUM_NEEDED = 730000; + private static final int powerUsage = (int) TierEU.RECIPE_IV / 2; + private static final int maxCapacity = 675000; + private static final int minCapacityToStart = 100000; + private int HeliumSupply; + private int fuelSupply; + private boolean emptyingMode; + private int coolingPerTick = 0; private static final String STRUCTURE_PIECE_MAIN = "main"; private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition @@ -82,33 +96,23 @@ public class MTEThoriumHighTempReactor extends MTEEnhancedMultiBlockBase x.mCasing++, ofBlock(GregTechAPI.sBlockCasings3, 12))) + .addElement('c', onElementPass(x -> x.mCasingAmount++, ofBlock(GregTechAPI.sBlockCasings3, 12))) .addElement( 'b', ofChain( ofHatchAdder(MTEThoriumHighTempReactor::addOutputToMachineList, BASECASINGINDEX, 1), ofHatchAdder(MTEThoriumHighTempReactor::addMaintenanceToMachineList, BASECASINGINDEX, 1), ofHatchAdder(MTEThoriumHighTempReactor::addEnergyInputToMachineList, BASECASINGINDEX, 1), - onElementPass(x -> x.mCasing++, ofBlock(GregTechAPI.sBlockCasings3, 12)))) + onElementPass(x -> x.mCasingAmount++, ofBlock(GregTechAPI.sBlockCasings3, 12)))) .addElement( 'B', ofChain( ofHatchAdder(MTEThoriumHighTempReactor::addInputToMachineList, BASECASINGINDEX, 2), - onElementPass(x -> x.mCasing++, ofBlock(GregTechAPI.sBlockCasings3, 12)))) + onElementPass(x -> x.mCasingAmount++, ofBlock(GregTechAPI.sBlockCasings3, 12)))) // ofHatchAdderOptional(GT_TileEntity_THTR::addInputToMachineList, BASECASINGINDEX, 2, // GregTechAPI.sBlockCasings3, 12)) .build(); - private static final int HELIUM_NEEDED = 730000; - private static final int powerUsage = (int) TierEU.RECIPE_IV / 2; - private static final int maxcapacity = 675000; - private static final int mincapacity = 100000; - private int HeliumSupply; - private int fuelsupply; - private boolean empty; - private int coolanttaking = 0; - private int mCasing = 0; - public MTEThoriumHighTempReactor(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); } @@ -165,8 +169,8 @@ public void construct(ItemStack stackSize, boolean hintsOnly) { @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) { - this.mCasing = 0; - return this.checkPiece(STRUCTURE_PIECE_MAIN, 5, 11, 0) && this.mCasing >= 500 + this.mCasingAmount = 0; + return this.checkPiece(STRUCTURE_PIECE_MAIN, 5, 11, 0) && this.mCasingAmount >= 500 && this.mMaintenanceHatches.size() == 1 && !this.mInputHatches.isEmpty() && !this.mOutputHatches.isEmpty() @@ -179,24 +183,24 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack i public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); this.HeliumSupply = aNBT.getInteger("HeliumSupply"); - this.fuelsupply = aNBT.getInteger("fuelsupply"); - this.coolanttaking = aNBT.getInteger("coolanttaking"); - this.empty = aNBT.getBoolean("EmptyMode"); + this.fuelSupply = aNBT.getInteger("fuelsupply"); + this.coolingPerTick = aNBT.getInteger("coolanttaking"); + this.emptyingMode = aNBT.getBoolean("EmptyMode"); } @Override public void saveNBTData(NBTTagCompound aNBT) { super.saveNBTData(aNBT); aNBT.setInteger("HeliumSupply", this.HeliumSupply); - aNBT.setInteger("fuelsupply", this.fuelsupply); - aNBT.setInteger("coolanttaking", this.coolanttaking); - aNBT.setBoolean("EmptyMode", this.empty); + aNBT.setInteger("fuelsupply", this.fuelSupply); + aNBT.setInteger("coolanttaking", this.coolingPerTick); + aNBT.setBoolean("EmptyMode", this.emptyingMode); } @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if (aBaseMetaTileEntity.isServerSide() && !this.empty) { + if (aBaseMetaTileEntity.isServerSide() && !this.emptyingMode) { if (this.HeliumSupply < MTEThoriumHighTempReactor.HELIUM_NEEDED) { for (FluidStack fluidStack : this.getStoredFluids()) { if (fluidStack.isFluidEqual(Materials.Helium.getGas(1))) { @@ -207,16 +211,16 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { } } } - if (this.fuelsupply < maxcapacity) { + if (this.fuelSupply < maxCapacity) { this.startRecipeProcessing(); for (ItemStack itemStack : this.getStoredInputs()) { if (GTUtility.areStacksEqual( itemStack, new ItemStack(THTRMaterials.aTHTR_Materials, 1, THTRMaterials.MATERIAL_FUEL_INDEX))) { - int toget = Math.min(maxcapacity - this.fuelsupply, itemStack.stackSize); + int toget = Math.min(maxCapacity - this.fuelSupply, itemStack.stackSize); if (toget == 0) continue; itemStack.stackSize -= toget; - this.fuelsupply += toget; + this.fuelSupply += toget; } } this.endRecipeProcessing(); @@ -225,64 +229,64 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { } } - @Override - public boolean checkRecipe(ItemStack controllerStack) { - - if (this.empty) { - if (this.HeliumSupply > 0 || this.fuelsupply > 0) { - this.mEfficiency = 10000; - this.mMaxProgresstime = 100; - return true; - } - return false; - } - if (this.HeliumSupply < MTEThoriumHighTempReactor.HELIUM_NEEDED || this.fuelsupply < mincapacity) return false; + private double getEfficiency() { + return Math.min( + Math.pow((this.fuelSupply - minCapacityToStart) / ((maxCapacity - minCapacityToStart) / 10D), 2D) + 1, + 100D) / 100D - (this.getIdealStatus() - this.getRepairStatus()) / 10D; + } - double eff = Math - .min(Math.pow((this.fuelsupply - mincapacity) / ((maxcapacity - mincapacity) / 10D), 2D) + 1, 100D) / 100D - - (this.getIdealStatus() - this.getRepairStatus()) / 10D; - if (eff <= 0D) return false; + @Override + public @NotNull CheckRecipeResult checkProcessing() { + if (emptyingMode) { + if (!(HeliumSupply > 0 || fuelSupply > 0)) return CheckRecipeResultRegistry.NO_RECIPE; + this.mEfficiency = 10000; + this.mMaxProgresstime = 100; + } else { + if (this.HeliumSupply < MTEThoriumHighTempReactor.HELIUM_NEEDED || this.fuelSupply < minCapacityToStart) + return CheckRecipeResultRegistry.NO_RECIPE; - int toReduce = MathUtils.floorInt(this.fuelsupply * 0.005D * eff); + double efficiency = getEfficiency(); + if (efficiency <= 0.0) return CheckRecipeResultRegistry.NO_RECIPE; - final int originalToReduce = toReduce; - int burnedballs = toReduce / 64; - if (burnedballs > 0) toReduce -= burnedballs * 64; + int toReduce = MathUtils.floorInt(this.fuelSupply * 0.005D * efficiency); - int meta = THTRMaterials.MATERIAL_USED_FUEL_INDEX; + final int originalToReduce = toReduce; + int burnedBalls = toReduce / 64; + if (burnedBalls > 0) toReduce -= burnedBalls * 64; - ItemStack[] toOutput = { new ItemStack(THTRMaterials.aTHTR_Materials, burnedballs, meta), - new ItemStack(THTRMaterials.aTHTR_Materials, toReduce, meta + 1) }; - if (!this.canOutputAll(toOutput)) return false; + int meta = THTRMaterials.MATERIAL_USED_FUEL_INDEX; - this.fuelsupply -= originalToReduce; - this.mOutputItems = toOutput; + ItemStack[] toOutput = { new ItemStack(THTRMaterials.aTHTR_Materials, burnedBalls, meta), + new ItemStack(THTRMaterials.aTHTR_Materials, toReduce, meta + 1) }; + if (!this.canOutputAll(toOutput)) return CheckRecipeResultRegistry.NO_RECIPE; - // this.updateSlots(); not needed ? + this.fuelSupply -= originalToReduce; + this.mOutputItems = toOutput; - this.coolanttaking = (int) (4800D * eff); - this.mEfficiency = (int) (eff * 10000D); - this.mEUt = -powerUsage; - this.mMaxProgresstime = 648000; - return true; + this.coolingPerTick = (int) (4800.0 * efficiency); + this.mEfficiency = (int) (efficiency * 10000.0); + this.mEUt = -powerUsage; + this.mMaxProgresstime = 648000; + } + return CheckRecipeResultRegistry.SUCCESSFUL; } @Override public boolean onRunningTick(ItemStack aStack) { - if (this.empty) { + if (this.emptyingMode) { this.addOutput(Materials.Helium.getGas(this.HeliumSupply)); this.addOutput( - new ItemStack(THTRMaterials.aTHTR_Materials, this.fuelsupply, THTRMaterials.MATERIAL_FUEL_INDEX)); + new ItemStack(THTRMaterials.aTHTR_Materials, this.fuelSupply, THTRMaterials.MATERIAL_FUEL_INDEX)); this.HeliumSupply = 0; - this.fuelsupply = 0; + this.fuelSupply = 0; this.updateSlots(); return true; } if (!super.onRunningTick(aStack)) return false; - int takecoolant = this.coolanttaking; + int takecoolant = this.coolingPerTick; int drainedamount = 0; for (MTEHatchInput tHatch : validMTEList(mInputHatches)) { @@ -329,12 +333,12 @@ public String[] getInfoData() { + GTUtility.formatNumbers(this.mMaxProgresstime / 20) + "secs", "TRISO-Pebbles:", - GTUtility.formatNumbers(this.fuelsupply) + "pcs. / " + GTUtility.formatNumbers(this.fuelsupply) + "psc.", + GTUtility.formatNumbers(this.fuelSupply) + "pcs. / " + GTUtility.formatNumbers(this.fuelSupply) + "psc.", "Helium-Level:", GTUtility.formatNumbers(this.HeliumSupply) + "L / " + GTUtility.formatNumbers(MTEThoriumHighTempReactor.HELIUM_NEEDED) + "L", - "Coolant/t:", GTUtility.formatNumbers(this.mProgresstime == 0 ? 0 : this.coolanttaking) + "L/t", + "Coolant/t:", GTUtility.formatNumbers(this.mProgresstime == 0 ? 0 : this.coolingPerTick) + "L/t", "Problems:", String.valueOf(this.getIdealStatus() - this.getRepairStatus()) }; } @@ -374,10 +378,10 @@ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, f GTUtility.sendChatToPlayer(aPlayer, "THTR mode cannot be changed while the machine is running."); return; } - this.empty = !this.empty; + this.emptyingMode = !this.emptyingMode; GTUtility.sendChatToPlayer( aPlayer, - "THTR is now running in " + (this.empty ? "emptying mode." : "normal Operation")); + "THTR is now running in " + (this.emptyingMode ? "emptying mode." : "normal Operation")); } @Override diff --git a/src/main/java/bartworks/common/tileentities/multis/MTEWindmill.java b/src/main/java/bartworks/common/tileentities/multis/MTEWindmill.java index 40a7aba420b..c3cbb73be39 100644 --- a/src/main/java/bartworks/common/tileentities/multis/MTEWindmill.java +++ b/src/main/java/bartworks/common/tileentities/multis/MTEWindmill.java @@ -40,6 +40,8 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import org.jetbrains.annotations.NotNull; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; @@ -77,11 +79,14 @@ import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase; import gregtech.api.objects.ItemData; import gregtech.api.recipe.RecipeMaps; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTOreDictUnificator; import gregtech.api.util.GTRecipe; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.api.util.shutdown.ShutDownReason; import gregtech.common.items.IDMetaTool01; import gregtech.common.items.MetaGeneratedTool01; @@ -283,8 +288,9 @@ private float[] multiplierRecipe(ItemStack itemStack) { } @Override - public boolean checkRecipe(ItemStack itemStack) { - if (itemStack == null || itemStack.getItem() == null) return false; + public @NotNull CheckRecipeResult checkProcessing() { + ItemStack itemStack = getControllerSlot(); + if (itemStack == null || itemStack.getItem() == null) return CheckRecipeResultRegistry.NO_RECIPE; if (this.mOutputItems == null) this.mOutputItems = new ItemStack[2]; @@ -293,7 +299,7 @@ public boolean checkRecipe(ItemStack itemStack) { .voltage(V[1]) .find(); if (tRecipe == null) { - return false; + return CheckRecipeResultRegistry.NO_RECIPE; } if (tRecipe.getOutput(0) != null) { @@ -331,11 +337,11 @@ public boolean checkRecipe(ItemStack itemStack) { } this.mMaxProgresstime = tRecipe.mDuration * 2 * 100 * this.mMulti / this.getSpeed(this.rotorBlock); this.mMulti = 16; - return true; + return CheckRecipeResultRegistry.SUCCESSFUL; } @Override - public void stopMachine() { + public void stopMachine(@NotNull ShutDownReason reason) { this.getBaseMetaTileEntity() .disableWorking(); } @@ -524,30 +530,28 @@ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBu } public float OutputMultiplier(TileEntityRotorBlock rotorBlock) { - try { - return ((ItemStonageRotors) rotorBlock.rotorSlot.get() - .getItem()).getmRotor(); - } catch (Exception e) { - return 1f; + ItemStack stack = rotorBlock.rotorSlot.get(); + if (stack == null || !(stack.getItem() instanceof ItemStonageRotors rotor)) { + return 1; } + return rotor.getmRotor(); } public int getSpeed(TileEntityRotorBlock rotorBlock) { - try { - return ((ItemStonageRotors) rotorBlock.rotorSlot.get() - .getItem()).getSpeed(); - } catch (Exception e) { + ItemStack stack = rotorBlock.rotorSlot.get(); + if (stack == null || !(stack.getItem() instanceof ItemStonageRotors rotor)) { return 1; } + return rotor.getSpeed(); } public void setRotorDamage(TileEntityRotorBlock rotorBlock, int damage) { - try { - ((ItemStonageRotors) rotorBlock.rotorSlot.get() - .getItem()).damageItemStack(rotorBlock.rotorSlot.get(), damage); - } catch (Exception e) { + ItemStack stack = rotorBlock.rotorSlot.get(); + if (stack == null || !(stack.getItem() instanceof ItemStonageRotors rotor)) { rotorBlock.rotorSlot.damage(damage, false); + return; } + rotor.damageItemStack(stack, damage); } @Override diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java index fa6d5455366..d1746731f57 100644 --- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java +++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaBlastFurnace.java @@ -24,23 +24,20 @@ import static gregtech.api.util.GTStructureUtility.buildHatchAdder; import static gregtech.api.util.GTStructureUtility.ofCoil; -import java.util.ArrayList; import java.util.Arrays; import javax.annotation.Nonnull; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; -import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import bartworks.API.BorosilicateGlass; @@ -51,7 +48,6 @@ import gregtech.api.GregTechAPI; import gregtech.api.enums.GTValues; import gregtech.api.enums.HeatingCoilLevel; -import gregtech.api.enums.Materials; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -59,7 +55,6 @@ import gregtech.api.logic.ProcessingLogic; import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.metatileentity.implementations.MTEHatchEnergy; -import gregtech.api.metatileentity.implementations.MTEHatchOutput; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.check.CheckRecipeResult; @@ -80,10 +75,7 @@ public class MTEMegaBlastFurnace extends MegaMultiBlockBase .addElement('=', StructureElementAirNoHint.getInstance()) .addElement( 't', - buildHatchAdder(MTEMegaBlastFurnace.class) - .atLeast( - OutputHatch.withAdder(MTEMegaBlastFurnace::addOutputHatchToTopList) - .withCount(t -> t.mPollutionOutputHatches.size())) + buildHatchAdder(MTEMegaBlastFurnace.class).atLeast(OutputHatch) .casingIndex(CASING_INDEX) .dot(1) .buildAndChain(GregTechAPI.sBlockCasings1, CASING_INDEX)) @@ -145,9 +137,6 @@ private static String[][] createShape() { } private HeatingCoilLevel mCoilLevel; - protected final ArrayList mPollutionOutputHatches = new ArrayList<>(); - protected final FluidStack[] pollutionFluidStacks = { Materials.CarbonDioxide.getGas(1000), - Materials.CarbonMonoxide.getGas(1000), Materials.SulfurDioxide.getGas(1000) }; private int mHeatingCapacity; private byte glassTier; private final static int polPtick = PollutionConfig.basePollutionMBFSecond / 20 @@ -169,7 +158,7 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { @Override protected MultiblockTooltipBuilder createTooltip() { MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); - tt.addMachineType("Blast Furnace, MEBF") + tt.addMachineType("Blast Furnace, MEBF, MBF") .addParallelInfo(Configuration.Multiblocks.megaMachinesMax) .addInfo("You can use some fluids to reduce recipe time. Place the circuit in the Input Bus") .addInfo("Each 900K over the min. Heat required reduces power consumption by 5% (multiplicatively)") @@ -190,7 +179,7 @@ protected MultiblockTooltipBuilder createTooltip() { .addPollutionAmount(getPollutionPerSecond(null)) .beginStructureBlock(15, 20, 15, true) .addController("3rd layer center") - .addCasingInfoRange("Heat Proof Machine Casing", 0, 279, false) + .addCasingInfoRange("Heat Proof Machine Casing", 0, 447, false) .addOtherStructurePart("864x Heating Coils", "Inner 13x18x13 (Hollow)") .addOtherStructurePart("1007x Borosilicate Glass", "Outer 15x18x15") .addStructureInfo("The glass tier limits the Energy Input tier") @@ -200,9 +189,7 @@ protected MultiblockTooltipBuilder createTooltip() { .addInputBus("Any bottom layer casing") .addInputHatch("Any bottom layer casing") .addOutputBus("Any bottom layer casing") - .addOutputHatch("Gasses, Any top layer casing") - .addStructureInfo("Recovery amount scales with Muffler Hatch tier") - .addOutputHatch("Platline fluids, Any bottom layer casing") + .addOutputHatch("Any Heat Proof Machine Casing") .addStructureHint("This Mega Multiblock is too big to have its structure hologram displayed fully.") .toolTipFinisher(); return tt; @@ -222,7 +209,7 @@ public void loadNBTData(NBTTagCompound aNBT) { @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { if (!aPlayer.isSneaking()) { this.inputSeparation = !this.inputSeparation; GTUtility.sendChatToPlayer( @@ -276,17 +263,6 @@ public int getPollutionPerSecond(ItemStack aStack) { return polPtick * 20; } - public boolean addOutputHatchToTopList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) return false; - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) return false; - if (aMetaTileEntity instanceof MTEHatchOutput) { - ((MTEHatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return this.mPollutionOutputHatches.add((MTEHatchOutput) aMetaTileEntity); - } - return false; - } - @Override protected String[] getExtendedInfoData() { return new String[] { StatCollector.translateToLocal("GT5U.EBF.heat") + ": " @@ -329,12 +305,12 @@ public void construct(ItemStack stackSize, boolean hintsOnly) { } @Override - public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) { + public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { if (this.mMachine) return -1; int realBudget = elementBudget >= 200 ? elementBudget : Math.min(200, elementBudget * 5); this.glassTier = 0; this.setCoilLevel(HeatingCoilLevel.None); - return this.survivialBuildPiece("main", stackSize, 7, 17, 0, realBudget, source, actor, false, true); + return this.survivialBuildPiece("main", stackSize, 7, 17, 0, realBudget, env, false, true); } public void setCoilLevel(HeatingCoilLevel aCoilLevel) { @@ -345,27 +321,6 @@ public HeatingCoilLevel getCoilLevel() { return this.mCoilLevel; } - @Override - public boolean addOutput(FluidStack aLiquid) { - if (aLiquid == null) return false; - FluidStack tLiquid = aLiquid.copy(); - boolean isOutputPollution = false; - for (FluidStack pollutionFluidStack : this.pollutionFluidStacks) { - if (!tLiquid.isFluidEqual(pollutionFluidStack)) continue; - - isOutputPollution = true; - break; - } - ArrayList tOutputHatches; - if (isOutputPollution) { - tOutputHatches = this.mPollutionOutputHatches; - tLiquid.amount = tLiquid.amount * Math.min(100 - getAveragePollutionPercentage(), 100) / 100; - } else { - tOutputHatches = this.mOutputHatches; - } - return dumpFluid(tOutputHatches, tLiquid, true) || dumpFluid(tOutputHatches, tLiquid, false); - } - @Override public boolean checkMachine(IGregTechTileEntity iGregTechTileEntity, ItemStack itemStack) { this.mHeatingCapacity = 0; @@ -373,8 +328,6 @@ public boolean checkMachine(IGregTechTileEntity iGregTechTileEntity, ItemStack i this.setCoilLevel(HeatingCoilLevel.None); - this.mPollutionOutputHatches.clear(); - if (!this.checkPiece("main", 7, 17, 0) || this.getCoilLevel() == HeatingCoilLevel.None || this.mMaintenanceHatches.size() != 1) return false; diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java index 14e59081604..9cc18de9b31 100644 --- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java +++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaChemicalReactor.java @@ -25,7 +25,6 @@ import static gregtech.api.util.GTStructureUtility.buildHatchAdder; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; @@ -33,8 +32,8 @@ import net.minecraftforge.common.util.ForgeDirection; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; -import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import bartworks.API.BorosilicateGlass; @@ -86,10 +85,10 @@ public MultiblockTooltipBuilder createTooltip() { + " Laser Hatches.") .beginStructureBlock(5, 5, 9, false) .addController("Front center") - .addStructureInfo("46x Chemically Inert Machine Casing (minimum)") - .addStructureInfo("7x Fusion Coil Block") - .addStructureInfo("28x PTFE Pipe Casing") - .addStructureInfo("64x Borosilicate Glass Block (any tier)") + .addCasingInfoMin("Chemically Inert Machine Casing", 46, false) + .addCasingInfoExactly("Fusion Coil Block", 7, false) + .addCasingInfoExactly("PTFE Pipe Casing", 28, false) + .addCasingInfoExactly("Borosilicate Glass", 64, true) .addStructureInfo("The glass tier limits the Energy Input tier") .addEnergyHatch("Hint block ", 3) .addMaintenanceHatch("Hint block ", 2) @@ -160,7 +159,7 @@ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, f @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { if (aPlayer.isSneaking()) { this.batchMode = !this.batchMode; if (this.batchMode) { @@ -185,11 +184,10 @@ public void construct(ItemStack aStack, boolean aHintsOnly) { } @Override - public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) { + public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { if (this.mMachine) return -1; int realBudget = elementBudget >= 200 ? elementBudget : Math.min(200, elementBudget * 5); - return this - .survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 2, 2, 0, realBudget, source, actor, false, true); + return this.survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 2, 2, 0, realBudget, env, false, true); } // -------------- TEC TECH COMPAT ---------------- diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java index 95ddef6b8af..62697dcb8fd 100644 --- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java +++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaDistillTower.java @@ -27,7 +27,6 @@ import java.util.List; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -36,9 +35,9 @@ import net.minecraftforge.fluids.FluidStack; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; -import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.IStructureElementCheckOnly; +import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import bartworks.common.configs.Configuration; @@ -327,12 +326,11 @@ public void construct(ItemStack stackSize, boolean hintsOnly) { } @Override - public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) { + public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { if (this.mMachine) return -1; int realBudget = elementBudget >= 200 ? elementBudget : Math.min(200, elementBudget * 5); this.mHeight = 0; - int built = this - .survivialBuildPiece(STRUCTURE_PIECE_BASE, stackSize, 7, 0, 0, realBudget, source, actor, false, true); + int built = this.survivialBuildPiece(STRUCTURE_PIECE_BASE, stackSize, 7, 0, 0, realBudget, env, false, true); if (built >= 0) return built; int tTotalHeight = Math.min(12, stackSize.stackSize + 2); // min 2 output layer, so at least 1 + 2 height for (int i = 1; i < tTotalHeight - 1; i++) { @@ -344,8 +342,7 @@ public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource 5 * this.mHeight, 0, realBudget, - source, - actor, + env, false, true); if (built >= 0) return built; @@ -358,8 +355,7 @@ public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource 5 * this.mHeight, 0, realBudget, - source, - actor, + env, false, true); } @@ -374,7 +370,7 @@ public void loadNBTData(NBTTagCompound aNBT) { @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { if (aPlayer.isSneaking()) { this.batchMode = !this.batchMode; if (this.batchMode) { diff --git a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java index 30beb268d07..51d8d5ada3b 100644 --- a/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java +++ b/src/main/java/bartworks/common/tileentities/multis/mega/MTEMegaOilCracker.java @@ -34,7 +34,6 @@ import javax.annotation.Nonnull; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; @@ -43,8 +42,8 @@ import net.minecraftforge.fluids.FluidStack; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; -import com.gtnewhorizon.structurelib.structure.IItemSource; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import bartworks.API.BorosilicateGlass; @@ -169,10 +168,13 @@ public MultiblockTooltipBuilder createTooltip() { + "Tech" + EnumChatFormatting.GRAY + " Laser Hatches.") + .addInfo("Gets 10% EU/t reduction per coil tier, up to a maximum of 50%") .beginStructureBlock(13, 7, 9, true) .addController("Front bottom") + .addCasingInfoExactly("Clean Stainless Steel Machine Casing", 197, false) + .addCasingInfoExactly("Coil", 92, true) + .addCasingInfoExactly("Borosilicate Glass", 196, true) .addStructureInfo("The glass tier limits the Energy Input tier") - .addInfo("Gets 10% EU/t reduction per coil tier, up to a maximum of 50%") .addEnergyHatch("Hint block", 1) .addMaintenanceHatch("Hint block", 1) .addInputHatch("Hint block", 2, 3) @@ -246,11 +248,10 @@ public void construct(ItemStack aStack, boolean aHintsOnly) { } @Override - public int survivalConstruct(ItemStack stackSize, int elementBudget, IItemSource source, EntityPlayerMP actor) { + public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBuildEnvironment env) { if (this.mMachine) return -1; int realBudget = elementBudget >= 200 ? elementBudget : Math.min(200, elementBudget * 5); - return this - .survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 6, 6, 0, realBudget, source, actor, false, true); + return this.survivialBuildPiece(STRUCTURE_PIECE_MAIN, stackSize, 6, 6, 0, realBudget, env, false, true); } // -------------- TEC TECH COMPAT ---------------- @@ -429,7 +430,7 @@ public boolean supportsBatchMode() { @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { if (aPlayer.isSneaking()) { batchMode = !batchMode; if (batchMode) { diff --git a/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java b/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java index cd8e360da6a..ae47f0d658c 100644 --- a/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java +++ b/src/main/java/bartworks/system/material/BWMetaGeneratedItems.java @@ -92,7 +92,7 @@ public boolean onEntityItemUpdate(EntityItem aItemEntity) { int tY = MathHelper.floor_double(aItemEntity.posY); int tZ = MathHelper.floor_double(aItemEntity.posZ); Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); - byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); + int tMetaData = aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if (tBlock == Blocks.cauldron && tMetaData > 0) { if (this.orePrefixes == OrePrefixes.dustImpure || this.orePrefixes == OrePrefixes.dustPure) { aItemEntity.setEntityItemStack( diff --git a/src/main/java/detrav/items/tools/DetravToolElectricProspectorBase.java b/src/main/java/detrav/items/tools/DetravToolElectricProspectorBase.java index 66d38c39ea9..59619ca090c 100644 --- a/src/main/java/detrav/items/tools/DetravToolElectricProspectorBase.java +++ b/src/main/java/detrav/items/tools/DetravToolElectricProspectorBase.java @@ -138,14 +138,14 @@ public boolean isMiningTool() { return false; } - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } @Override public int convertBlockDrops(List list, ItemStack itemStack, EntityPlayer entityPlayer, Block block, - int i, int i1, int i2, byte b, int i3, boolean b1, BlockEvent.HarvestDropsEvent harvestDropsEvent) { + int i, int i1, int i2, int b, int i3, boolean b1, BlockEvent.HarvestDropsEvent harvestDropsEvent) { return 0; } @@ -193,8 +193,9 @@ public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase + EnumChatFormatting.WHITE); } - public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, - int aX, int aY, int aZ) { + @Override + public float getMiningSpeed(Block aBlock, int aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, + int aY, int aZ) { return aDefault; } } diff --git a/src/main/java/ggfab/mte/MTEAdvAssLine.java b/src/main/java/ggfab/mte/MTEAdvAssLine.java index a4c913207ce..ae0d4c8d306 100644 --- a/src/main/java/ggfab/mte/MTEAdvAssLine.java +++ b/src/main/java/ggfab/mte/MTEAdvAssLine.java @@ -96,6 +96,7 @@ import gregtech.api.util.OverclockCalculator; import gregtech.api.util.VoidProtectionHelper; import gregtech.api.util.shutdown.ShutDownReason; +import gregtech.api.util.shutdown.ShutDownReasonRegistry; import gregtech.common.tileentities.machines.MTEHatchInputBusME; import gregtech.common.tileentities.machines.MTEHatchInputME; import mcp.mobius.waila.api.IWailaConfigHandler; @@ -432,12 +433,12 @@ public void loadNBTData(NBTTagCompound aNBT) { } /** - * roughly the same as {@link #criticalStopMachine()}, but does not attempt to send a halting sound if world is not + * Does a critical shutdown of the machine, but does not attempt to send a halting sound if world is not * loaded. also supports setting a stop reason */ private void criticalStopMachine(String reason) { int oMaxProgresstime = mMaxProgresstime; - stopMachine(); + stopMachine(ShutDownReasonRegistry.NONE); // don't do these at all if the machine wasn't working before anyway if (oMaxProgresstime > 0) { if (getBaseMetaTileEntity().getWorld() != null) sendSound(INTERRUPT_SOUND_INDEX); @@ -993,7 +994,7 @@ public boolean supportsBatchMode() { @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { batchMode = !batchMode; if (batchMode) { GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTEComponentAssemblyLine.java b/src/main/java/goodgenerator/blocks/tileEntity/MTEComponentAssemblyLine.java index 041e8f4bcff..fed08f8e0d3 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTEComponentAssemblyLine.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTEComponentAssemblyLine.java @@ -234,7 +234,15 @@ protected MultiblockTooltipBuilder createTooltip() { .addInfo(EnumChatFormatting.ITALIC + "Much more efficient than other competing brands!") .addTecTechHatchInfo() .beginStructureBlock(9, 10, 33, false) - .addOtherStructurePart("Borosilicate Glass", "Can be UV tier or higher") + .addController("Mid of the eighth layer") + .addCasingInfoExactly("Advanced Iridium Plated Machine Casing", 644, false) + .addCasingInfoExactly("Advanced Filter Casing", 124, false) + .addCasingInfoExactly("Borosilicate Glass (UV+)", 280, false) + .addCasingInfoExactly("Assembler Machine Casing", 30, false) + .addCasingInfoExactly("Component Assembly Line Casing", 43, true) + .addCasingInfoExactly("PBI Pipe Casing", 126, false) + .addCasingInfoExactly("Tungstensteel Frame Box", 4, false) + .addCasingInfoExactly("Assembly Line Casing", 55, false) .addInputBus("Start of conveyor belt", 1) .addOutputBus("End of conveyor belt", 2) .addEnergyHatch("Second-top layer", 3) @@ -345,7 +353,7 @@ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, f @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { batchMode = !batchMode; if (batchMode) { GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTECoolantTower.java b/src/main/java/goodgenerator/blocks/tileEntity/MTECoolantTower.java index 82747e895dd..68ece26daa9 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTECoolantTower.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTECoolantTower.java @@ -107,7 +107,9 @@ protected MultiblockTooltipBuilder createTooltip() { final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType("Coolant Tower") .addInfo("Turn Steam back to Distilled Water.") - .addController("Mid of the second layer.") + .addController("Mid of the second layer") + .addCasingInfoExactly("Light Concrete", 277, false) + .addCasingInfoExactly("Tungstencarbide Frame Box", 28, false) .addInputHatch("Input Hatch", 1) .addOutputHatch("Output Hatch", 1) .toolTipFinisher(); diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTEFuelRefineFactory.java b/src/main/java/goodgenerator/blocks/tileEntity/MTEFuelRefineFactory.java index 6b4e4f42829..0c025d68db7 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTEFuelRefineFactory.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTEFuelRefineFactory.java @@ -34,11 +34,6 @@ import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; -import gregtech.api.metatileentity.implementations.MTEHatch; -import gregtech.api.metatileentity.implementations.MTEHatchEnergy; -import gregtech.api.metatileentity.implementations.MTEHatchInput; -import gregtech.api.metatileentity.implementations.MTEHatchInputBus; -import gregtech.api.metatileentity.implementations.MTEHatchOutput; import gregtech.api.objects.GTRenderedTexture; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.check.CheckRecipeResult; @@ -48,7 +43,6 @@ import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; -import tectech.thing.metaTileEntity.hatch.MTEHatchEnergyMulti; public class MTEFuelRefineFactory extends MTETooltipMultiBlockBaseEM implements IConstructable, ISurvivalConstructable { @@ -165,6 +159,10 @@ protected MultiblockTooltipBuilder createTooltip() { .addInfo("Performs perfect overclocks.") .addTecTechHatchInfo() .beginStructureBlock(3, 15, 15, false) + .addController("Mid of the third layer") + .addCasingInfoExactly("Naquadah Fuel Refinery Casing", 114, false) + .addCasingInfoExactly("Field Restriction Coil", 32, true) + .addCasingInfoExactly("Field Restriction Glass", 8, false) .addInputHatch("The casings adjacent to field restriction glass.") .addInputBus("The casings adjacent to field restriction glass.", 1) .addOutputHatch("The casings adjacent to field restriction glass.", 1) @@ -229,59 +227,16 @@ protected void setProcessingLogicPower(ProcessingLogic logic) { logic.setAvailableAmperage(1); } - public final boolean addToFRFList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } else { - if (aMetaTileEntity instanceof MTEHatch) { - ((MTEHatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - } - if (aMetaTileEntity instanceof MTEHatchInput) { - return this.mInputHatches.add((MTEHatchInput) aMetaTileEntity); - } else if (aMetaTileEntity instanceof MTEHatchOutput) { - return this.mOutputHatches.add((MTEHatchOutput) aMetaTileEntity); - } else if (aMetaTileEntity instanceof MTEHatchInputBus) { - return this.mInputBusses.add((MTEHatchInputBus) aMetaTileEntity); - } else if (aMetaTileEntity instanceof MTEHatchEnergy) { - return this.mEnergyHatches.add((MTEHatchEnergy) aMetaTileEntity); - } else if (aMetaTileEntity instanceof MTEHatchEnergyMulti) { - return this.eEnergyMulti.add((MTEHatchEnergyMulti) aMetaTileEntity); - } else { - return false; - } - } - } - } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { return new MTEFuelRefineFactory(this.mName); } - @Override - public int getMaxEfficiency(ItemStack aStack) { - return 10000; - } - - @Override - public int getDamageToComponent(ItemStack aStack) { - return 0; - } - @Override public boolean explodesOnComponentBreak(ItemStack aStack) { return true; } - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - @Override public String[] getInfoData() { String[] infoData = new String[super.getInfoData().length + 1]; @@ -292,7 +247,7 @@ public String[] getInfoData() { @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { batchMode = !batchMode; if (batchMode) { GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaSmeltery.java b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaSmeltery.java index 161108d74b6..8c30e1ef677 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaSmeltery.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTELargeEssentiaSmeltery.java @@ -6,6 +6,7 @@ import java.util.ArrayList; import java.util.Map; +import java.util.Objects; import net.minecraft.block.Block; import net.minecraft.item.ItemStack; @@ -37,7 +38,6 @@ import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.metatileentity.implementations.MTEHatchEnergy; import gregtech.api.metatileentity.implementations.MTEHatchMuffler; import gregtech.api.objects.XSTR; import gregtech.api.recipe.check.CheckRecipeResult; @@ -46,7 +46,7 @@ import gregtech.api.render.TextureFactory; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; -import tectech.thing.metaTileEntity.hatch.MTEHatchEnergyMulti; +import gregtech.api.util.shutdown.ShutDownReason; import tectech.thing.metaTileEntity.multi.base.TTMultiblockBase; import thaumcraft.api.aspects.Aspect; import thaumcraft.api.aspects.AspectList; @@ -161,7 +161,8 @@ public IStructureDefinition getStructure_EM() { .addElement('D', ofBlock(ConfigBlocks.blockCosmeticOpaque, 2)) .addElement( 'F', - ThaumicBases.isModLoaded() ? ofBlock(Block.getBlockFromName("thaumicbases:advAlchFurnace"), 0) + ThaumicBases.isModLoaded() + ? ofBlock(Objects.requireNonNull(Block.getBlockFromName("thaumicbases:advAlchFurnace")), 0) : ofBlock(ConfigBlocks.blockStoneDevice, 0)) .addElement( 'E', @@ -272,28 +273,8 @@ protected void onEssentiaCellFound(int tier) { this.pTier = tier; } - private boolean addEnergyHatchToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } else if (aMetaTileEntity instanceof MTEHatchEnergy) { - if (((MTEHatchEnergy) aMetaTileEntity).mTier < 3) return false; - ((MTEHatchEnergy) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return this.mEnergyHatches.add((MTEHatchEnergy) aMetaTileEntity); - } else if (aMetaTileEntity instanceof MTEHatchEnergyMulti) { - ((MTEHatchEnergyMulti) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return this.eEnergyMulti.add(((MTEHatchEnergyMulti) aMetaTileEntity)); - } else { - return false; - } - } - } - private boolean addEssentiaOutputHatchToMachineList(MTEEssentiaOutputHatch aTileEntity) { - if (aTileEntity instanceof MTEEssentiaOutputHatch) { + if (aTileEntity != null) { return this.mEssentiaOutputHatches.add(aTileEntity); } return false; @@ -416,7 +397,7 @@ private AspectList getEssentia(ItemStack itemStack, int amount) { } AspectList aspects = ThaumcraftCraftingManager.getObjectTags(itemStack); aspects = ThaumcraftCraftingManager.getBonusTags(itemStack, aspects); - if (aspects != null && aspects.size() != 0 && aspects.getAspects()[0] != null) { + if (aspects.size() != 0 && aspects.getAspects()[0] != null) { for (int i = 0; i < amount; i++) aspectList.add(aspects); } else aspectList.add(Aspect.ENTROPY, amount); return aspectList; @@ -498,8 +479,8 @@ protected void addClassicOutputs_EM() { } @Override - public void stopMachine() { - super.stopMachine(); + public void stopMachine(@NotNull ShutDownReason reason) { + super.stopMachine(reason); this.mOutputAspects.aspects.clear(); } @@ -577,31 +558,11 @@ public boolean onRunningTick(ItemStack aStack) { return super.onRunningTick(aStack); } - @Override - public boolean isCorrectMachinePart(ItemStack itemStack) { - return true; - } - @Override public int getPollutionPerSecond(ItemStack aStack) { return 22 * (100 - this.nodePurificationEfficiency); } - @Override - public int getMaxEfficiency(ItemStack itemStack) { - return 10000; - } - - @Override - public int getDamageToComponent(ItemStack itemStack) { - return 0; - } - - @Override - public boolean explodesOnComponentBreak(ItemStack itemStack) { - return false; - } - @Override public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) { return new MTELargeEssentiaSmeltery(this.mName); diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTEMultiNqGenerator.java b/src/main/java/goodgenerator/blocks/tileEntity/MTEMultiNqGenerator.java index 277a85e3937..0d41722d0a5 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTEMultiNqGenerator.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTEMultiNqGenerator.java @@ -426,6 +426,10 @@ protected MultiblockTooltipBuilder createTooltip() { .addTecTechHatchInfo() .beginStructureBlock(7, 8, 7, true) .addController("Front bottom") + .addCasingInfoExactly("Field Restriction Casing", 48, false) + .addCasingInfoExactly("Radiation Proof Steel Frame Box", 36, false) + .addCasingInfoExactly("Tungstensteel Pipe Casing", 6, false) + .addCasingInfoExactly("Radiation Proof Machine Casing", 121, false) .addDynamoHatch("Any bottom layer casing, only accept ONE!") .addInputHatch("Any bottom layer casing") .addOutputHatch("Any bottom layer casing") diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTENeutronActivator.java b/src/main/java/goodgenerator/blocks/tileEntity/MTENeutronActivator.java index 2058188445b..29b8c52c72f 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTENeutronActivator.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTENeutronActivator.java @@ -4,6 +4,7 @@ import static gregtech.api.util.GTStructureUtility.buildHatchAdder; import static gregtech.api.util.GTStructureUtility.chainAllGlasses; import static gregtech.api.util.GTStructureUtility.ofFrame; +import static net.minecraft.util.StatCollector.translateToLocal; import java.util.ArrayList; import java.util.Arrays; @@ -57,16 +58,27 @@ import gregtech.api.util.IGTHatchAdder; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; +import tectech.thing.metaTileEntity.multi.base.INameFunction; +import tectech.thing.metaTileEntity.multi.base.IStatusFunction; +import tectech.thing.metaTileEntity.multi.base.LedStatus; +import tectech.thing.metaTileEntity.multi.base.Parameters; public class MTENeutronActivator extends MTETooltipMultiBlockBaseEM implements IConstructable, ISurvivalConstructable { + public Parameters.Group.ParameterIn batchSetting; + + /** Name of the batch setting */ + public static final INameFunction BATCH_SETTING_NAME = (base, + p) -> translateToLocal("batch_mode.cfgi.0"); // Batch size + /** Status of the batch setting */ + public static final IStatusFunction BATCH_STATUS = (base, p) -> LedStatus + .fromLimitsInclusiveOuterBoundary(p.get(), 1, 0, 32, 128); protected static IStructureDefinition multiDefinition = null; protected final ArrayList mNeutronAccelerator = new ArrayList<>(); protected final ArrayList mNeutronSensor = new ArrayList<>(); protected int casingAmount = 0; protected int height = 0; protected int eV = 0, mCeil = 0, mFloor = 0; - private GTRecipe lastRecipe; protected static final NumberFormatMUI numberFormat; static { numberFormat = new NumberFormatMUI(); @@ -136,11 +148,12 @@ protected void setProcessingLogicPower(ProcessingLogic logic) { @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { - batchMode = !batchMode; - if (batchMode) { + float aX, float aY, float aZ, ItemStack aTool) { + if (getMaxBatchSize() == 1) { + parametrization.trySetParameters(batchSetting.hatchId(), batchSetting.parameterId(), 128); GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); } else { + parametrization.trySetParameters(batchSetting.hatchId(), batchSetting.parameterId(), 1); GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff")); } return true; @@ -192,6 +205,11 @@ protected MultiblockTooltipBuilder createTooltip() { + ".") .addInfo("Inputting Graphite/Beryllium dust can reduce 10MeV per dust immediately.") .addController("Front bottom") + .addCasingInfoRange("Clean Stainless Steel Machine Casing", 7, 31, false) + .addCasingInfoExactly("Processor Machine Casing", 18, false) + .addCasingInfoMin("Steel Frame Box", 16, false) + .addCasingInfoMin("Speeding Pipe Casing", 4, false) + .addCasingInfoMin("EV+ Glass", 32, false) .addInputHatch("Hint block with dot 1") .addInputBus("Hint block with dot 1") .addOutputHatch("Hint block with dot 2") @@ -199,11 +217,6 @@ protected MultiblockTooltipBuilder createTooltip() { .addMaintenanceHatch("Hint block with dot 2") .addOtherStructurePart("Neutron Accelerator", "Hint block with dot 2") .addOtherStructurePart("Neutron Sensor", "Hint block with dot 2") - .addCasingInfoRange("Clean Stainless Steel Machine Casing", 7, 31, false) - .addCasingInfoExactly("Processor Machine Casing", 18, false) - .addCasingInfoMin("Steel Frame Box", 16, false) - .addCasingInfoMin("Speeding Pipe Casing", 4, false) - .addCasingInfoMin("EV+ Glass", 32, false) .toolTipFinisher(); return tt; } @@ -294,23 +307,25 @@ public int getCurrentNeutronKineticEnergy() { } @Override - public boolean supportsBatchMode() { - return true; + protected void parametersInstantiation_EM() { + batchSetting = parametrization.getGroup(9, true) + .makeInParameter(1, 1, BATCH_SETTING_NAME, BATCH_STATUS); } @Override - public boolean supportsVoidProtection() { - return true; + protected int getMaxBatchSize() { + // Batch size 1~128 + return (int) Math.min(Math.max(batchSetting.get(), 1.0D), 128.0D); } @Override - public boolean protectsExcessItem() { - return !eSafeVoid; + public boolean supportsBatchMode() { + return true; } @Override - public boolean protectsExcessFluid() { - return !eSafeVoid; + public boolean getDefaultBatchMode() { + return true; } @Override diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java b/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java index 24b80f5ef80..0311544a64e 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTEPreciseAssembler.java @@ -78,6 +78,7 @@ import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; import gregtech.common.tileentities.machines.IDualInputHatch; +import gregtech.common.tileentities.machines.ISmartInputHatch; import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaDataAccessor; import tectech.thing.metaTileEntity.hatch.MTEHatchEnergyMulti; @@ -179,6 +180,12 @@ public boolean addToPAssList(IGregTechTileEntity aTileEntity, int aBaseCasingInd if (aMetaTileEntity == null) { return false; } + if (aMetaTileEntity instanceof ISmartInputHatch hatch) { + // Only add them to be iterated if enabled for performance reasons + if (hatch.doFastRecipeCheck()) { + mSmartInputHatches.add(hatch); + } + } if (aMetaTileEntity instanceof MTEHatchInput) { return mInputHatches.add((MTEHatchInput) aMetaTileEntity); } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MTEUniversalChemicalFuelEngine.java b/src/main/java/goodgenerator/blocks/tileEntity/MTEUniversalChemicalFuelEngine.java index e39aa2e69ef..31ac4554e71 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MTEUniversalChemicalFuelEngine.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MTEUniversalChemicalFuelEngine.java @@ -32,8 +32,6 @@ import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.metatileentity.implementations.MTEHatchDynamo; import gregtech.api.metatileentity.implementations.MTEHatchInput; -import gregtech.api.metatileentity.implementations.MTEHatchMaintenance; -import gregtech.api.metatileentity.implementations.MTEHatchMuffler; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.check.CheckRecipeResult; @@ -43,6 +41,8 @@ import gregtech.api.util.GTRecipe; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.api.util.shutdown.ShutDownReason; +import gregtech.api.util.shutdown.ShutDownReasonRegistry; import gtPlusPlus.api.recipe.GTPPRecipeMaps; import tectech.thing.metaTileEntity.hatch.MTEHatchDynamoMulti; @@ -71,32 +71,6 @@ public MTEUniversalChemicalFuelEngine(int id, String name, String nameRegional) super.useLongPower = true; } - public final boolean addMaintenance(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof MTEHatchMaintenance) { - ((MTEHatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return this.mMaintenanceHatches.add((MTEHatchMaintenance) aMetaTileEntity); - } - } - return false; - } - - public final boolean addMuffler(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } else { - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity instanceof MTEHatchMuffler) { - ((MTEHatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return this.mMufflerHatches.add((MTEHatchMuffler) aMetaTileEntity); - } - } - return false; - } - public final boolean addInputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { if (aTileEntity == null) { return false; @@ -167,11 +141,6 @@ public String[] getStructureDescription(ItemStack itemStack) { return DescTextLocalization.addText("UniversalChemicalFuelEngine.hint", 11); } - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - @Override public int getPollutionPerSecond(ItemStack aStack) { return (int) Math.sqrt(this.getPowerFlow()); @@ -200,6 +169,12 @@ protected MultiblockTooltipBuilder createTooltip() { .addInfo("The efficiency is up to 150%.") .addTecTechHatchInfo() .beginStructureBlock(5, 4, 9, false) + .addController("Mid of the second layer") + .addCasingInfoExactly("Stable Titanium Machine Casing", 93, false) + .addCasingInfoExactly("Titanium Gear Box Casing", 14, false) + .addCasingInfoExactly("Engine Intake Casing", 14, false) + .addCasingInfoExactly("Titanium Plated Cylinder", 14, false) + .addCasingInfoExactly("Titanium Pipe Casing", 93, false) .addMaintenanceHatch("Hint block with dot 1") .addMufflerHatch("Hint block with dot 2 (fill all slots with mufflers)") .addInputHatch("Hint block with dot 3 (fill all slots with input hatches)") @@ -248,10 +223,10 @@ protected CheckRecipeResult processFuel(ArrayList tFluids, RecipeMap } @Override - public void stopMachine() { + public void stopMachine(@NotNull ShutDownReason reason) { // Reset the counter for heating, so that it works again when the machine restarts heatingTicks = 0; - super.stopMachine(); + super.stopMachine(reason); } @Override @@ -301,7 +276,7 @@ void addAutoEnergy() { tHatch.getBaseMetaTileEntity() .getStoredEU() + exEU)); } else if (!isStoppingSafe) { - stopMachine(); + stopMachine(ShutDownReasonRegistry.NONE); } } if (!eDynamoMulti.isEmpty()) { @@ -313,7 +288,7 @@ void addAutoEnergy() { tHatch.getBaseMetaTileEntity() .getStoredEU() + exEU)); } else if (!isStoppingSafe) { - stopMachine(); + stopMachine(ShutDownReasonRegistry.NONE); } } } diff --git a/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputer.java b/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputer.java index 458504384ee..c6c54e448a8 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputer.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputer.java @@ -6,12 +6,14 @@ import static gregtech.api.util.GTStructureUtility.filterByMTETier; import static gregtech.api.util.GTStructureUtility.ofFrame; import static gregtech.api.util.GTUtility.validMTEList; +import static net.minecraft.util.StatCollector.translateToLocal; import java.util.List; import javax.annotation.Nullable; import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; @@ -65,13 +67,26 @@ import gregtech.common.tileentities.machines.IDualInputHatch; import gregtech.common.tileentities.machines.multi.drone.MTEHatchDroneDownLink; import tectech.thing.metaTileEntity.hatch.MTEHatchEnergyMulti; +import tectech.thing.metaTileEntity.multi.base.INameFunction; +import tectech.thing.metaTileEntity.multi.base.IStatusFunction; +import tectech.thing.metaTileEntity.multi.base.LedStatus; +import tectech.thing.metaTileEntity.multi.base.Parameters; public abstract class MTELargeFusionComputer extends MTETooltipMultiBlockBaseEM implements IConstructable, ISurvivalConstructable, IOverclockDescriptionProvider { + public Parameters.Group.ParameterIn batchSetting; + + /** Name of the batch setting */ + public static final INameFunction BATCH_SETTING_NAME = (base, + p) -> translateToLocal("batch_mode.cfgi.0"); // Batch size + /** Status of the batch setting */ + public static final IStatusFunction BATCH_STATUS = (base, p) -> LedStatus + .fromLimitsInclusiveOuterBoundary(p.get(), 1, 0, 32, 128); + public static final String MAIN_NAME = "largeFusion"; public static final int M = 1_000_000; - public GTRecipe mLastRecipe; + public GTRecipe lastRecipe; public int para; protected OverclockDescriber overclockDescriber; private static final ClassValue> STRUCTURE_DEFINITION = new ClassValue<>() { @@ -218,6 +233,19 @@ public boolean checkMachine_EM(IGregTechTileEntity aBaseMetaTileEntity, ItemStac && (mEnergyHatches.size() + eEnergyMulti.size()) != 0; } + @Override + public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, + float aX, float aY, float aZ, ItemStack aTool) { + if (getMaxBatchSize() == 1) { + parametrization.trySetParameters(batchSetting.hatchId(), batchSetting.parameterId(), 128); + GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); + } else { + parametrization.trySetParameters(batchSetting.hatchId(), batchSetting.parameterId(), 1); + GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff")); + } + return true; + } + @Override public void construct(ItemStack itemStack, boolean b) { structureBuild_EM(MAIN_NAME, 23, 3, 40, itemStack, b); @@ -294,14 +322,13 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { turnCasingActive(mMaxProgresstime > 0); if (aBaseMetaTileEntity.isAllowedToWork()) { if (checkRecipe()) { - if (aBaseMetaTileEntity.getStoredEU() - < this.mLastRecipe.mSpecialValue + this.lEUt) { + if (aBaseMetaTileEntity.getStoredEU() < this.lastRecipe.mSpecialValue + this.lEUt) { mMaxProgresstime = 0; turnCasingActive(false); stopMachine(ShutDownReasonRegistry.POWER_LOSS); } getBaseMetaTileEntity() - .decreaseStoredEnergyUnits(this.mLastRecipe.mSpecialValue + this.lEUt, false); + .decreaseStoredEnergyUnits(this.lastRecipe.mSpecialValue + this.lEUt, false); } } if (mMaxProgresstime <= 0) mEfficiency = Math.max(0, mEfficiency - 1000); @@ -309,7 +336,7 @@ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { } } else if (aBaseMetaTileEntity.isAllowedToWork()) { turnCasingActive(false); - this.mLastRecipe = null; + this.lastRecipe = null; stopMachine(ShutDownReasonRegistry.STRUCTURE_INCOMPLETE); } } @@ -430,9 +457,9 @@ public CheckRecipeResult process() { if (mRunningOnLoad) mRunningOnLoad = false; turnCasingActive(result.wasSuccessful()); if (result.wasSuccessful()) { - mLastRecipe = lastRecipe; + MTELargeFusionComputer.this.lastRecipe = lastRecipe; } else { - mLastRecipe = null; + MTELargeFusionComputer.this.lastRecipe = null; } para = getCurrentParallels(); return result; @@ -596,6 +623,28 @@ protected void drawTexts(DynamicPositionedColumn screenElements, SlotWidget inve .widget(new FakeSyncWidget.LongSyncer(this::getEUVar, this::setEUVar)); } + @Override + protected void parametersInstantiation_EM() { + batchSetting = parametrization.getGroup(9, false) + .makeInParameter(1, 1, BATCH_SETTING_NAME, BATCH_STATUS); + } + + @Override + protected int getMaxBatchSize() { + // Batch size 1~128 + return (int) Math.min(Math.max(batchSetting.get(), 1.0D), 128.0D); + } + + @Override + public boolean supportsBatchMode() { + return true; + } + + @Override + public boolean getDefaultBatchMode() { + return true; + } + @Override public boolean getDefaultHasMaintenanceChecks() { return false; diff --git a/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputerPP.java b/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputerPP.java index 70896169114..147b249659c 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputerPP.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/base/MTELargeFusionComputerPP.java @@ -1,25 +1,10 @@ package goodgenerator.blocks.tileEntity.base; -import static net.minecraft.util.StatCollector.translateToLocal; - import gregtech.api.objects.overclockdescriber.OverclockDescriber; import gregtech.api.util.AdvancedFusionOverclockDescriber; -import tectech.thing.metaTileEntity.multi.base.INameFunction; -import tectech.thing.metaTileEntity.multi.base.IStatusFunction; -import tectech.thing.metaTileEntity.multi.base.LedStatus; -import tectech.thing.metaTileEntity.multi.base.Parameters; public abstract class MTELargeFusionComputerPP extends MTELargeFusionComputer { - protected Parameters.Group.ParameterIn batchSetting; - - /** Name of the batch setting */ - private static final INameFunction BATCH_SETTING_NAME = (base, - p) -> translateToLocal("gt.blockmachines.LargeFusionComputerPP.cfgi.0"); // Batch size - /** Status of the batch setting */ - private static final IStatusFunction BATCH_STATUS = (base, p) -> LedStatus - .fromLimitsInclusiveOuterBoundary(p.get(), 1, 0, 32, 128); - public MTELargeFusionComputerPP(String name) { super(name); } @@ -33,20 +18,4 @@ protected OverclockDescriber createOverclockDescriber() { return new AdvancedFusionOverclockDescriber((byte) tier(), capableStartupCanonical()); } - @Override - protected void parametersInstantiation_EM() { - batchSetting = parametrization.getGroup(9, false) - .makeInParameter(1, 1, BATCH_SETTING_NAME, BATCH_STATUS); - } - - @Override - protected int getMaxBatchSize() { - // Batch size 1~128 - return (int) Math.min(Math.max(batchSetting.get(), 1.0D), 128.0D); - } - - @Override - public boolean getDefaultBatchMode() { - return true; - } } diff --git a/src/main/java/goodgenerator/loader/Loaders.java b/src/main/java/goodgenerator/loader/Loaders.java index a3b0b6d13e0..47fa796bd5d 100644 --- a/src/main/java/goodgenerator/loader/Loaders.java +++ b/src/main/java/goodgenerator/loader/Loaders.java @@ -62,6 +62,7 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.render.TextureFactory; +import kekztech.common.blocks.BlockTFFTStorageField; public class Loaders { @@ -518,6 +519,8 @@ public static void addTexturePage() { .of(magneticFluxCasing, 0); Textures.BlockIcons.casingTexturePages[GoodGeneratorTexturePage][10] = TextureFactory .of(gravityStabilizationCasing, 0); + Textures.BlockIcons.casingTexturePages[GoodGeneratorTexturePage][127] = TextureFactory + .of(BlockTFFTStorageField.TFFTCasingIcon.INSTANCE); } } diff --git a/src/main/java/goodgenerator/loader/RecipeLoader2.java b/src/main/java/goodgenerator/loader/RecipeLoader2.java index 022cb5ad726..4e1f63bfef4 100644 --- a/src/main/java/goodgenerator/loader/RecipeLoader2.java +++ b/src/main/java/goodgenerator/loader/RecipeLoader2.java @@ -34,7 +34,6 @@ import static gregtech.api.util.GTRecipeConstants.RESEARCH_ITEM; import static gregtech.api.util.GTRecipeConstants.RESEARCH_TIME; import static gregtech.api.util.GTRecipeConstants.UniversalChemical; -import static tectech.loader.recipe.BaseRecipeLoader.getItemContainer; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; @@ -1388,7 +1387,7 @@ public static void RecipeLoad() { GTValues.RA.stdBuilder() .itemInputs( - getItemContainer("Casing_UEV").get(3), + ItemList.Casing_UEV.get(3), ItemList.Field_Generator_UV.get(2), GTOreDictUnificator.get(OrePrefixes.cableGt04, Materials.NetherStar, 8), ItemRefer.HiC_T4.get(1), diff --git a/src/main/java/gregtech/GTMod.java b/src/main/java/gregtech/GTMod.java index f3f02f1adb6..12451a30de7 100644 --- a/src/main/java/gregtech/GTMod.java +++ b/src/main/java/gregtech/GTMod.java @@ -18,6 +18,7 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.FurnaceRecipes; @@ -41,6 +42,7 @@ import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLLoadCompleteEvent; +import cpw.mods.fml.common.event.FMLMissingMappingsEvent; import cpw.mods.fml.common.event.FMLModIdMappingEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; @@ -48,6 +50,7 @@ import cpw.mods.fml.common.event.FMLServerStartedEvent; import cpw.mods.fml.common.event.FMLServerStartingEvent; import cpw.mods.fml.common.event.FMLServerStoppingEvent; +import cpw.mods.fml.common.registry.GameRegistry; import galacticgreg.SpaceDimRegisterer; import gregtech.api.GregTechAPI; import gregtech.api.enchants.EnchantmentEnderDamage; @@ -828,6 +831,21 @@ public void onServerStopping(FMLServerStoppingEvent aEvent) { RunnableMachineUpdate.shutdownExecutorService(); } + @Mod.EventHandler + public void onMissingMappings(FMLMissingMappingsEvent event) { + for (FMLMissingMappingsEvent.MissingMapping mapping : event.getAll()) { + if (mapping.type == GameRegistry.Type.BLOCK) { + if ("dreamcraft:gt.blockcasingsNH".equals(mapping.name)) { + mapping.remap(GregTechAPI.sBlockCasingsNH); + } + } else if (mapping.type == GameRegistry.Type.ITEM) { + if ("dreamcraft:gt.blockcasingsNH".equals(mapping.name)) { + mapping.remap(Item.getItemFromBlock(GregTechAPI.sBlockCasingsNH)); + } + } + } + } + public static void logStackTrace(Throwable t) { final StringWriter sw = new StringWriter(); t.printStackTrace(new PrintWriter(sw)); diff --git a/src/main/java/gregtech/api/GregTechAPI.java b/src/main/java/gregtech/api/GregTechAPI.java index 70d1a0c2ce9..a888078cd02 100644 --- a/src/main/java/gregtech/api/GregTechAPI.java +++ b/src/main/java/gregtech/api/GregTechAPI.java @@ -233,7 +233,7 @@ public class GregTechAPI { sBlockMetal9, sBlockGem1, sBlockGem2, sBlockGem3, sBlockReinforced; public static Block sBlockGranites, sBlockConcretes, sBlockStones; public static Block sBlockCasings1, sBlockCasings2, sBlockCasings3, sBlockCasings4, sBlockCasings5, sBlockCasings6, - sBlockCasings8, sBlockCasings9, sBlockCasings10, sBlockCasings11, sSolenoidCoilCasings; + sBlockCasings8, sBlockCasings9, sBlockCasings10, sBlockCasings11, sSolenoidCoilCasings, sBlockCasingsNH; public static Block sBlockLongDistancePipes; public static Block sDroneRender; public static Block sBlockFrames; diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java index f3ed791eb21..f80d13cc6ee 100644 --- a/src/main/java/gregtech/api/enums/ItemList.java +++ b/src/main/java/gregtech/api/enums/ItemList.java @@ -2205,7 +2205,6 @@ public enum ItemList implements IItemContainer { Hull_UMV, Hull_UXV, Hull_MAXV, - // todo: move them from gt.blockcasingsNH in NHCore to here Casing_UEV, Casing_UIV, Casing_UMV, @@ -2593,6 +2592,17 @@ public enum ItemList implements IItemContainer { ResearchCompleter, SpaceElevatorController, // Populated in GTNH-Intergalactic Spray_Color_Infinite, + Casing_AirFilter_Turbine_T1, + Casing_AirFilter_Vent_T1, + Casing_AirFilter_Turbine_T2, + Casing_AirFilter_Vent_T2, + Casing_AirFilter_Turbine_T3, + Casing_AirFilter_Vent_T3, + Casing_Pyrolyse, + NameRemover, + Machine_Multi_AirFilterT1, + Machine_Multi_AirFilterT2, + Machine_Multi_AirFilterT3, // semicolon after the comment to reduce merge conflicts ; diff --git a/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java b/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java index 4e7c28a2bda..ff0563d50a1 100644 --- a/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java +++ b/src/main/java/gregtech/api/enums/MetaTileEntityIDs.java @@ -751,16 +751,16 @@ public enum MetaTileEntityIDs { INPUT_HATCH_ME(2717), INPUT_BUS_ME(2718), LARGE_FLUID_EXTRACTOR(2730), - SOLAR_PANEL_LV(2731), - SOLAR_PANEL_MV(2732), - SOLAR_PANEL_HV(2733), - SOLAR_PANEL_EV(2734), - SOLAR_PANEL_IV(2735), - SOLAR_PANEL_LuV(2736), - SOLAR_PANEL_ZPM(2737), - SOLAR_PANEL_UV(2738), - MATTER_MANIPULATOR_UPLINK(2750), - HATCH_MATTER_MANIPULATOR_UPLINK_ME(2751), + MATTER_MANIPULATOR_UPLINK(2731), + HATCH_MATTER_MANIPULATOR_UPLINK_ME(2732), + SOLAR_PANEL_LV(2733), + SOLAR_PANEL_MV(2734), + SOLAR_PANEL_HV(2735), + SOLAR_PANEL_EV(2736), + SOLAR_PANEL_IV(2737), + SOLAR_PANEL_LuV(2738), + SOLAR_PANEL_ZPM(2739), + SOLAR_PANEL_UV(2740), INDUSTRIAL_LASER_ENGRAVER_CONTROLLER(3004), INDUSTRIAL_COMPRESSOR_CONTROLLER(3005), HIP_COMPRESSOR_CONTROLLER(3006), diff --git a/src/main/java/gregtech/api/gui/modularui/GTUITextures.java b/src/main/java/gregtech/api/gui/modularui/GTUITextures.java index 9293b9b1fad..673c04697a9 100644 --- a/src/main/java/gregtech/api/gui/modularui/GTUITextures.java +++ b/src/main/java/gregtech/api/gui/modularui/GTUITextures.java @@ -220,6 +220,8 @@ public class GTUITextures { .fullImage(GregTech.ID, "gui/progressbar/steam_fill"); public static final UITexture PROGRESSBAR_STEAM_FILL_STEEL = UITexture .fullImage(GregTech.ID, "gui/progressbar/steam_fill_steel"); + public static final UITexture PROGRESSBAR_NAME_REMOVER = UITexture + .fullImage(GregTech.ID, "gui/progressbar/name_remover"); public static FallbackableUITexture fallbackableProgressbar(String name, UITexture fallback) { return new FallbackableUITexture(UITexture.fullImage(GregTech.ID, "gui/progressbar/" + name), fallback); diff --git a/src/main/java/gregtech/api/interfaces/IBlockContainer.java b/src/main/java/gregtech/api/interfaces/IBlockContainer.java index 5a80655a5ce..463d23b7425 100644 --- a/src/main/java/gregtech/api/interfaces/IBlockContainer.java +++ b/src/main/java/gregtech/api/interfaces/IBlockContainer.java @@ -6,5 +6,5 @@ public interface IBlockContainer { Block getBlock(); - byte getMeta(); + int getMeta(); } diff --git a/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java index a0a362c4e51..328da78bf44 100644 --- a/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java +++ b/src/main/java/gregtech/api/interfaces/IRedstoneCircuitBlock.java @@ -50,7 +50,7 @@ public interface IRedstoneCircuitBlock { /** * returns whatever Meta-Value is adjacent to the Redstone Circuit Block */ - byte getMetaIDAtSide(ForgeDirection side); + int getMetaIDAtSide(ForgeDirection side); /** * returns whatever TileEntity is adjacent to the Redstone Circuit Block diff --git a/src/main/java/gregtech/api/interfaces/IToolStats.java b/src/main/java/gregtech/api/interfaces/IToolStats.java index 64fc81196c8..052dccfc521 100644 --- a/src/main/java/gregtech/api/interfaces/IToolStats.java +++ b/src/main/java/gregtech/api/interfaces/IToolStats.java @@ -47,7 +47,7 @@ public interface IToolStats { * @param tile TileEntity of the block if exist * @param event the event, cancel it to prevent the block from being broken */ - default void onBreakBlock(@Nonnull EntityPlayer player, int x, int y, int z, @Nonnull Block block, byte metadata, + default void onBreakBlock(@Nonnull EntityPlayer player, int x, int y, int z, @Nonnull Block block, int metadata, @Nullable TileEntity tile, @Nonnull BlockEvent.BreakEvent event) {} /** @@ -164,7 +164,7 @@ default boolean isScrewdriver() { * @return If this is a minable Block. Tool Quality checks (like Diamond Tier or something) are separate from this * check. */ - boolean isMinableBlock(Block aBlock, byte aMetaData); + boolean isMinableBlock(Block aBlock, int aMetaData); /** * This lets you modify the Drop List, when this type of Tool has been used. @@ -172,7 +172,7 @@ default boolean isScrewdriver() { * @return the Amount of modified Items, used to determine the extra durability cost */ int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, - int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); + int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); /** * @return Returns a broken Version of the Item. @@ -193,7 +193,7 @@ int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPl short[] getRGBa(boolean aIsToolHead, ItemStack aStack); - float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, + float getMiningSpeed(Block aBlock, int aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, int aY, int aZ); default String getToolTypeName() { diff --git a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java index b62c3e92cf9..429cfe39536 100644 --- a/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java +++ b/src/main/java/gregtech/api/interfaces/tileentity/IHasWorldObjectAndCoords.java @@ -79,13 +79,13 @@ default ChunkCoordinates getCoords() { Block getBlockAtSideAndDistance(ForgeDirection side, int aDistance); - byte getMetaID(int aX, int aY, int aZ); + int getMetaID(int aX, int aY, int aZ); - byte getMetaIDOffset(int aX, int aY, int aZ); + int getMetaIDOffset(int aX, int aY, int aZ); - byte getMetaIDAtSide(ForgeDirection side); + int getMetaIDAtSide(ForgeDirection side); - byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance); + int getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance); byte getLightLevel(int aX, int aY, int aZ); diff --git a/src/main/java/gregtech/api/items/MetaGeneratedTool.java b/src/main/java/gregtech/api/items/MetaGeneratedTool.java index 4c9cdf39ae8..87698c7dbb6 100644 --- a/src/main/java/gregtech/api/items/MetaGeneratedTool.java +++ b/src/main/java/gregtech/api/items/MetaGeneratedTool.java @@ -255,7 +255,7 @@ public final ItemStack getToolWithStats(int aToolID, int aAmount, Materials aPri */ @Mod.EventHandler public void onHarvestBlockEvent(ArrayList aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, - int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aX, int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { IToolStats tStats = getToolStats(aStack); if (isItemStackUsable(aStack) && getDigSpeed(aStack, aBlock, aMetaData) > 0.0F) doDamage( aStack, @@ -266,7 +266,7 @@ public void onHarvestBlockEvent(ArrayList aDrops, ItemStack aStack, E @Mod.EventHandler public float onBlockBreakSpeedEvent(float aDefault, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, PlayerEvent.BreakSpeed aEvent) { + int aY, int aZ, int aMetaData, PlayerEvent.BreakSpeed aEvent) { IToolStats tStats = getToolStats(aStack); return tStats == null ? aDefault : tStats.getMiningSpeed(aBlock, aMetaData, aDefault, aPlayer, aPlayer.worldObj, aX, aY, aZ); @@ -695,14 +695,14 @@ public float getDigSpeed(ItemStack aStack, Block aBlock, int aMetaData) { if (!isItemStackUsable(aStack)) return 0.0F; IToolStats tStats = getToolStats(aStack); if (tStats == null || Math.max(0, getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData)) return 0.0F; - return tStats.isMinableBlock(aBlock, (byte) aMetaData) + return tStats.isMinableBlock(aBlock, aMetaData) ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) : 0.0F; } @Override public final boolean canHarvestBlock(Block aBlock, ItemStack aStack) { - return getDigSpeed(aStack, aBlock, (byte) 0) > 0.0F; + return getDigSpeed(aStack, aBlock, 0) > 0.0F; } @Override diff --git a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java index f2b5278e49d..37f2871d761 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseTileEntity.java @@ -221,17 +221,17 @@ public final Block getBlockAtSideAndDistance(ForgeDirection side, int distance) } @Override - public final byte getMetaIDOffset(int x, int y, int z) { + public final int getMetaIDOffset(int x, int y, int z) { return getMetaID(xCoord + x, yCoord + y, zCoord + z); } @Override - public final byte getMetaIDAtSide(ForgeDirection side) { + public final int getMetaIDAtSide(ForgeDirection side) { return getMetaIDAtSideAndDistance(side, 1); } @Override - public final byte getMetaIDAtSideAndDistance(ForgeDirection side, int distance) { + public final int getMetaIDAtSideAndDistance(ForgeDirection side, int distance) { return getMetaID(getOffsetX(side, distance), getOffsetY(side, distance), getOffsetZ(side, distance)); } @@ -404,9 +404,9 @@ public Block getBlock(ChunkCoordinates aCoords) { } @Override - public final byte getMetaID(int x, int y, int z) { + public final int getMetaID(int x, int y, int z) { if (ignoreUnloadedChunks && crossedChunkBorder(x, z) && !worldObj.blockExists(x, y, z)) return 0; - return (byte) worldObj.getBlockMetadata(x, y, z); + return worldObj.getBlockMetadata(x, y, z); } @Override diff --git a/src/main/java/gregtech/api/metatileentity/implementations/MTEEnhancedMultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/MTEEnhancedMultiBlockBase.java index 345ce96dbc2..090ef47cadc 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/MTEEnhancedMultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/MTEEnhancedMultiBlockBase.java @@ -83,9 +83,9 @@ public final boolean isFacingValid(ForgeDirection facing) { @Override public boolean onWrenchRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer entityPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { if (wrenchingSide != getBaseMetaTileEntity().getFrontFacing()) - return super.onWrenchRightClick(side, wrenchingSide, entityPlayer, aX, aY, aZ); + return super.onWrenchRightClick(side, wrenchingSide, entityPlayer, aX, aY, aZ, aTool); if (entityPlayer.isSneaking()) { if (isFlipChangeAllowed()) { toolSetFlip(getFlip().isHorizontallyFlipped() ? Flip.NONE : Flip.HORIZONTAL); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/MTEHatchMuffler.java b/src/main/java/gregtech/api/metatileentity/implementations/MTEHatchMuffler.java index d1c957b9767..f79333ef210 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/MTEHatchMuffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/MTEHatchMuffler.java @@ -26,8 +26,7 @@ public class MTEHatchMuffler extends MTEHatch { private static final String localizedDescFormat = GTLanguageManager.addStringLocalization( "gt.blockmachines.hatch.muffler.desc.format", "Outputs the Pollution (Might cause ... things)%n" + "DO NOT OBSTRUCT THE OUTPUT!%n" - + "Reduces Pollution to %d%%%n" - + "Recovers %d%% of CO2/CO/SO2"); + + "Reduces Pollution to %d%%%n"); private final int pollutionReduction = calculatePollutionReduction(100); private final int pollutionRecover = 100 - pollutionReduction; private final String[] description = String.format(localizedDescFormat, pollutionReduction, pollutionRecover) diff --git a/src/main/java/gregtech/api/util/GTBlockMap.java b/src/main/java/gregtech/api/util/GTBlockMap.java index a5ac98d4271..a0a2e755ea4 100644 --- a/src/main/java/gregtech/api/util/GTBlockMap.java +++ b/src/main/java/gregtech/api/util/GTBlockMap.java @@ -5,17 +5,17 @@ import net.minecraft.block.Block; -import gnu.trove.map.TByteObjectMap; -import gnu.trove.map.hash.TByteObjectHashMap; +import gnu.trove.map.TIntObjectMap; +import gnu.trove.map.hash.TIntObjectHashMap; public class GTBlockMap { - public static final byte WILDCARD = -1; - private final ConcurrentHashMap> backing = new ConcurrentHashMap<>(); + public static final int WILDCARD = -1; + private final ConcurrentHashMap> backing = new ConcurrentHashMap<>(); private int size = 0; - private TByteObjectMap getSubmap(Block block) { - return backing.computeIfAbsent(block, b -> new TByteObjectHashMap<>()); + private TIntObjectMap getSubmap(Block block) { + return backing.computeIfAbsent(block, b -> new TIntObjectHashMap<>()); } /** @@ -25,7 +25,7 @@ private TByteObjectMap getSubmap(Block block) { * @param meta meta * @return old mapping, or null if that doesn't exist */ - public V put(Block block, byte meta, V value) { + public V put(Block block, int meta, V value) { V v = getSubmap(block).put(meta, value); if (v == null) size++; return v; @@ -38,7 +38,7 @@ public V put(Block block, byte meta, V value) { * @param meta meta * @return old mapping, or null if that doesn't exist */ - public V putIfAbsent(Block block, byte meta, V value) { + public V putIfAbsent(Block block, int meta, V value) { V v = getSubmap(block).putIfAbsent(meta, value); if (v == null) size++; return v; @@ -51,8 +51,8 @@ public V putIfAbsent(Block block, byte meta, V value) { * @param meta meta * @return old mapping, or null if that doesn't exist */ - public V computeIfAbsent(Block block, byte meta, BiFunction function) { - TByteObjectMap submap = getSubmap(block); + public V computeIfAbsent(Block block, int meta, BiFunction function) { + TIntObjectMap submap = getSubmap(block); V v = submap.get(meta); if (v == null) { v = function.apply(block, meta); @@ -69,8 +69,8 @@ public V computeIfAbsent(Block block, byte meta, BiFunction func * @param meta meta * @return current mapping OR wildcard of that mapping exists */ - public boolean containsKey(Block block, byte meta) { - TByteObjectMap submap = backing.get(block); + public boolean containsKey(Block block, int meta) { + TIntObjectMap submap = backing.get(block); if (submap == null) return false; return submap.containsKey(meta) || submap.containsKey(WILDCARD); } @@ -82,8 +82,8 @@ public boolean containsKey(Block block, byte meta) { * @param meta meta * @return current mapping OR wildcard of that block. null if neither exists */ - public V get(Block block, byte meta) { - TByteObjectMap submap = backing.get(block); + public V get(Block block, int meta) { + TIntObjectMap submap = backing.get(block); if (submap == null) return null; V v = submap.get(meta); if (v != null) return v; @@ -97,8 +97,8 @@ public V get(Block block, byte meta) { * @param meta meta * @return old value, or null if none */ - public V remove(Block block, byte meta) { - TByteObjectMap submap = backing.get(block); + public V remove(Block block, int meta) { + TIntObjectMap submap = backing.get(block); if (submap == null) return null; V v = submap.remove(meta); if (v != null) { diff --git a/src/main/java/gregtech/api/util/GTBlockSet.java b/src/main/java/gregtech/api/util/GTBlockSet.java index 6c91193832f..36086030b7d 100644 --- a/src/main/java/gregtech/api/util/GTBlockSet.java +++ b/src/main/java/gregtech/api/util/GTBlockSet.java @@ -6,15 +6,15 @@ public class GTBlockSet { private final GTBlockMap backing = new GTBlockMap<>(); - public boolean add(Block block, byte meta) { + public boolean add(Block block, int meta) { return backing.put(block, meta, this) != this; } - public boolean contains(Block block, byte meta) { + public boolean contains(Block block, int meta) { return backing.get(block, meta) == this; } - public boolean remove(Block block, byte meta) { + public boolean remove(Block block, int meta) { return backing.remove(block, meta) == this; } diff --git a/src/main/java/gregtech/api/util/GTRecipeConstants.java b/src/main/java/gregtech/api/util/GTRecipeConstants.java index 9b7916d5126..d274b93f7a3 100644 --- a/src/main/java/gregtech/api/util/GTRecipeConstants.java +++ b/src/main/java/gregtech/api/util/GTRecipeConstants.java @@ -253,7 +253,7 @@ public class GTRecipeConstants { Collection ret = new ArrayList<>(); for (Materials mat : new Materials[] { Materials.Argon, Materials.Nitrogen }) { builder.duration(Math.max(1, mat == Materials.Nitrogen ? aDuration / 4 : aDuration / 24)); - int tPlasmaAmount = (int) Math.min(1L, aDuration / (mat.getMass() * 16L)); + int tPlasmaAmount = (int) Math.max(1L, aDuration / (mat.getMass() * 16L)); GTRecipeBuilder plasmaBuilder = builder.copy() .fluidInputs(mat.getPlasma(tPlasmaAmount)) .fluidOutputs(mat.getGas(tPlasmaAmount)); diff --git a/src/main/java/gregtech/api/util/GTToolHarvestHelper.java b/src/main/java/gregtech/api/util/GTToolHarvestHelper.java index 8dd5d6b93c4..5a09aaf6538 100644 --- a/src/main/java/gregtech/api/util/GTToolHarvestHelper.java +++ b/src/main/java/gregtech/api/util/GTToolHarvestHelper.java @@ -12,7 +12,7 @@ public class GTToolHarvestHelper { - public static boolean isAppropriateTool(Block aBlock, byte aMetaData, String... tTools) { + public static boolean isAppropriateTool(Block aBlock, int aMetaData, String... tTools) { if (aBlock == null || tTools == null) { return false; diff --git a/src/main/java/gregtech/api/util/GTUtility.java b/src/main/java/gregtech/api/util/GTUtility.java index dc863c64cda..c4a94424027 100644 --- a/src/main/java/gregtech/api/util/GTUtility.java +++ b/src/main/java/gregtech/api/util/GTUtility.java @@ -2527,7 +2527,7 @@ public static int getTextureId(byte page, byte startIndex, byte blockMeta) { * * @return casing texture 0 to 16383 */ - public static int getTextureId(Block blockFromBlock, byte metaFromBlock) { + public static int getTextureId(Block blockFromBlock, int metaFromBlock) { for (int page = 0; page < Textures.BlockIcons.casingTexturePages.length; page++) { ITexture[] casingTexturePage = Textures.BlockIcons.casingTexturePages[page]; if (casingTexturePage != null) { @@ -2535,7 +2535,7 @@ public static int getTextureId(Block blockFromBlock, byte metaFromBlock) { ITexture iTexture = casingTexturePage[index]; if (iTexture instanceof IBlockContainer) { Block block = ((IBlockContainer) iTexture).getBlock(); - byte meta = ((IBlockContainer) iTexture).getMeta(); + int meta = ((IBlockContainer) iTexture).getMeta(); if (meta == metaFromBlock && blockFromBlock == block) { return (page << 7) + index; } diff --git a/src/main/java/gregtech/common/GTProxy.java b/src/main/java/gregtech/common/GTProxy.java index fde6318a56a..a1ca9b3eab6 100644 --- a/src/main/java/gregtech/common/GTProxy.java +++ b/src/main/java/gregtech/common/GTProxy.java @@ -76,6 +76,7 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; +import net.minecraft.util.StatCollector; import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenMinable; @@ -1555,7 +1556,7 @@ public void onBlockBreakingEvent(BlockEvent.BreakEvent event) { if (stats == null) return; TileEntity tile = event.world.getTileEntity(event.x, event.y, event.z); - stats.onBreakBlock(player, event.x, event.y, event.z, event.block, (byte) event.blockMetadata, tile, event); + stats.onBreakBlock(player, event.x, event.y, event.z, event.block, event.blockMetadata, tile, event); } @SubscribeEvent @@ -1574,7 +1575,7 @@ public void onBlockHarvestingEvent(BlockEvent.HarvestDropsEvent aEvent) { aEvent.x, aEvent.y, aEvent.z, - (byte) aEvent.blockMetadata, + aEvent.blockMetadata, aEvent.fortuneLevel, aEvent.isSilkTouching, aEvent); @@ -1626,8 +1627,9 @@ public void registerOre(OreDictionary.OreRegisterEvent aEvent) { try { aEvent.Ore.stackSize = 1; - // skipping TinkerConstruct ore registration - if (this.mIgnoreTcon && aOriginalMod.equals(TinkerConstruct.ID)) { + // skipping TinkerConstruct ore registration except for blocks + if (this.mIgnoreTcon && aOriginalMod.equals(TinkerConstruct.ID) + && !(aEvent.Ore.getItem() instanceof ItemBlock)) { return; } String tModToName = aMod + " -> " + aEvent.Name; @@ -2694,7 +2696,7 @@ public void onBlockBreakSpeedEvent(PlayerEvent.BreakSpeed aEvent) { aEvent.x, aEvent.y, aEvent.z, - (byte) aEvent.metadata, + aEvent.metadata, aEvent); } } @@ -2765,7 +2767,9 @@ public void onItemTooltip(ItemTooltipEvent event) { ItemStack aStackTemp = event.itemStack; GTItemStack aStack = new GTItemStack(aStackTemp); if (providesProtection(aStackTemp)) { - event.toolTip.add(EnumChatFormatting.LIGHT_PURPLE + "Provides full hazmat protection."); + event.toolTip.add( + EnumChatFormatting.LIGHT_PURPLE + + StatCollector.translateToLocal("GT5U.providesfullhazmatprotection")); } } } diff --git a/src/main/java/gregtech/common/blocks/BlockCasingsNH.java b/src/main/java/gregtech/common/blocks/BlockCasingsNH.java new file mode 100644 index 00000000000..aedc9561968 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/BlockCasingsNH.java @@ -0,0 +1,81 @@ +package gregtech.common.blocks; + +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Dyes; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.util.GTLanguageManager; + +public class BlockCasingsNH extends BlockCasingsAbstract { + + public BlockCasingsNH() { + super(ItemCasingsNH.class, "gt.blockcasingsNH", MaterialCasings.INSTANCE, 16); + + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Air Filter Turbine Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Air Filter Vent Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Pyrolyse Oven Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Advanced Air Filter Turbine Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Advanced Air Filter Vent Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Super Air Filter Turbine Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Super Air Filter Vent Casing"); + + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "UEV Machine Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "UIV Machine Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "UMV Machine Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "UXV Machine Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "MAX Machine Casing"); + + ItemList.Casing_AirFilter_Turbine_T1.set(new ItemStack(this, 1, 0)); + ItemList.Casing_AirFilter_Vent_T1.set(new ItemStack(this, 1, 1)); + ItemList.Casing_Pyrolyse.set(new ItemStack(this, 1, 2)); + ItemList.Casing_AirFilter_Turbine_T2.set(new ItemStack(this, 1, 3)); + ItemList.Casing_AirFilter_Vent_T2.set(new ItemStack(this, 1, 4)); + ItemList.Casing_AirFilter_Turbine_T3.set(new ItemStack(this, 1, 5)); + ItemList.Casing_AirFilter_Vent_T3.set(new ItemStack(this, 1, 6)); + + ItemList.Casing_UEV.set(new ItemStack(this, 1, 10)); + ItemList.Casing_UIV.set(new ItemStack(this, 1, 11)); + ItemList.Casing_UMV.set(new ItemStack(this, 1, 12)); + ItemList.Casing_UXV.set(new ItemStack(this, 1, 13)); + ItemList.Casing_MAXV.set(new ItemStack(this, 1, 14)); + } + + @Override + public int getTextureIndex(int aMeta) { + return (8 << 7) | (aMeta + 64); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int aSide, int aMeta) { + return switch (aMeta) { + case 0 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_STEEL.getIcon(); + case 1 -> Textures.BlockIcons.MACHINE_CASING_PIPE_STEEL.getIcon(); + case 2 -> Textures.BlockIcons.MACHINE_8V_SIDE.getIcon(); + case 3 -> Textures.BlockIcons.MACHINE_CASING_STABLE_TITANIUM.getIcon(); + case 4 -> Textures.BlockIcons.MACHINE_CASING_PIPE_TITANIUM.getIcon(); + case 5 -> Textures.BlockIcons.MACHINE_CASING_ROBUST_TUNGSTENSTEEL.getIcon(); + case 6 -> Textures.BlockIcons.MACHINE_CASING_PIPE_TUNGSTENSTEEL.getIcon(); + default -> { + if (aSide == 0) { + yield Textures.BlockIcons.MACHINECASINGS_BOTTOM[aMeta].getIcon(); + } + if (aSide == 1) { + yield Textures.BlockIcons.MACHINECASINGS_TOP[aMeta].getIcon(); + } + yield Textures.BlockIcons.MACHINECASINGS_SIDE[aMeta].getIcon(); + } + }; + } + + @Override + public int colorMultiplier(IBlockAccess aWorld, int aX, int aY, int aZ) { + return aWorld.getBlockMetadata(aX, aY, aZ) <= 9 ? super.colorMultiplier(aWorld, aX, aY, aZ) + : Dyes.MACHINE_METAL.mRGBa[0] << 16 | Dyes.MACHINE_METAL.mRGBa[1] << 8 | Dyes.MACHINE_METAL.mRGBa[2]; + } +} diff --git a/src/main/java/gregtech/common/blocks/ItemCasingsNH.java b/src/main/java/gregtech/common/blocks/ItemCasingsNH.java new file mode 100644 index 00000000000..42616286625 --- /dev/null +++ b/src/main/java/gregtech/common/blocks/ItemCasingsNH.java @@ -0,0 +1,10 @@ +package gregtech.common.blocks; + +import net.minecraft.block.Block; + +public class ItemCasingsNH extends ItemCasingsAbstract { + + public ItemCasingsNH(Block block) { + super(block); + } +} diff --git a/src/main/java/gregtech/common/covers/redstone/CoverWirelessDoesWorkDetector.java b/src/main/java/gregtech/common/covers/redstone/CoverWirelessDoesWorkDetector.java index 769f578fd12..2518bde5fa3 100644 --- a/src/main/java/gregtech/common/covers/redstone/CoverWirelessDoesWorkDetector.java +++ b/src/main/java/gregtech/common/covers/redstone/CoverWirelessDoesWorkDetector.java @@ -7,9 +7,11 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import com.google.common.io.ByteArrayDataInput; +import com.gtnewhorizons.modularui.api.math.Alignment; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; @@ -76,7 +78,11 @@ public ActivityTransmitterData doCoverThingsImpl(ForgeDirection side, byte aInpu final long hash = hashCoverCoords(aTileEntity, side); setSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), hash, signal); - aTileEntity.setOutputRedstoneSignal(side, signal); + if (aCoverVariable.physical) { + aTileEntity.setOutputRedstoneSignal(side, signal); + } else { + aTileEntity.setOutputRedstoneSignal(side, (byte) 0); + } return aCoverVariable; } @@ -114,21 +120,25 @@ public enum ActivityMode { public static class ActivityTransmitterData extends CoverAdvancedRedstoneTransmitterBase.TransmitterData { private ActivityMode mode; + /** Whether the wireless detector cover also sets the tiles sided Redstone output */ + private boolean physical; - public ActivityTransmitterData(int frequency, UUID uuid, boolean invert, ActivityMode mode) { + public ActivityTransmitterData(int frequency, UUID uuid, boolean invert, ActivityMode mode, boolean physical) { super(frequency, uuid, invert); this.mode = mode; + this.physical = physical; } public ActivityTransmitterData() { super(); this.mode = ActivityMode.MACHINE_IDLE; + this.physical = true; } @Nonnull @Override public ISerializableObject copy() { - return new ActivityTransmitterData(frequency, uuid, invert, mode); + return new ActivityTransmitterData(frequency, uuid, invert, mode, physical); } @Nonnull @@ -136,6 +146,7 @@ public ISerializableObject copy() { public NBTBase saveDataToNBT() { NBTTagCompound tag = (NBTTagCompound) super.saveDataToNBT(); tag.setInteger("mode", mode.ordinal()); + tag.setBoolean("physical", physical); return tag; } @@ -144,6 +155,7 @@ public NBTBase saveDataToNBT() { public void writeToByteBuf(ByteBuf aBuf) { super.writeToByteBuf(aBuf); aBuf.writeInt(mode.ordinal()); + aBuf.writeBoolean(physical); } @Override @@ -152,6 +164,11 @@ public void loadDataFromNBT(NBTBase aNBT) { NBTTagCompound tag = (NBTTagCompound) aNBT; mode = ActivityMode.values()[tag.getInteger("mode")]; + if (tag.hasKey("physical")) { + physical = tag.getBoolean("physical"); + } else { + physical = false; + } } @Nonnull @@ -159,6 +176,7 @@ public void loadDataFromNBT(NBTBase aNBT) { public ISerializableObject readFromPacket(ByteArrayDataInput aBuf, EntityPlayerMP aPlayer) { super.readFromPacket(aBuf, aPlayer); mode = ActivityMode.values()[aBuf.readInt()]; + physical = aBuf.readBoolean(); return this; } @@ -177,7 +195,7 @@ public WirelessActivityDetectorUIFactory(CoverUIBuildContext buildContext) { @Override protected int getGUIHeight() { - return 107; + return 123; } @Override @@ -208,7 +226,22 @@ protected void addUIWidgets(ModularWindow.Builder builder) { }) .setSynced(false) .setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 3, 4 + startY + spaceY * 2)); + .setPos(startX + spaceX * 3, 4 + startY + spaceY * 2)) + .widget(TextWidget.dynamicString(() -> { + ActivityTransmitterData coverData = getCoverData(); + if (coverData != null) { + return getCoverData().physical + ? StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.1") + : StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.0"); + } else { + return ""; + } + }) + .setSynced(false) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setTextAlignment(Alignment.CenterLeft) + .setPos(startX + spaceX, 4 + startY + spaceY * 3) + .setSize(spaceX * 10, 12)); } @Override @@ -244,7 +277,17 @@ protected void addUIForDataController(CoverDataControllerWidget widget.setStaticTexture(GTUITextures.OVERLAY_BUTTON_POWER_SWITCH_ON) .addTooltip(GTUtility.trans("271", "Machine enabled")) - .setPos(spaceX * 2, spaceY * 2)); + .setPos(spaceX * 2, spaceY * 2)) + .addFollower( + CoverDataFollowerToggleButtonWidget.ofDisableable(), + coverData -> coverData.physical, + (coverData, state) -> { + coverData.physical = state; + return coverData; + }, + widget -> widget + .addTooltip(StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.tooltip")) + .setPos(0, 1 + spaceY * 3)); } } diff --git a/src/main/java/gregtech/common/covers/redstone/CoverWirelessFluidDetector.java b/src/main/java/gregtech/common/covers/redstone/CoverWirelessFluidDetector.java index 9c7de19a01f..3a58fd198c0 100644 --- a/src/main/java/gregtech/common/covers/redstone/CoverWirelessFluidDetector.java +++ b/src/main/java/gregtech/common/covers/redstone/CoverWirelessFluidDetector.java @@ -8,11 +8,13 @@ import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidTankInfo; import net.minecraftforge.fluids.IFluidHandler; import com.google.common.io.ByteArrayDataInput; +import com.gtnewhorizons.modularui.api.math.Alignment; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; @@ -24,6 +26,7 @@ import gregtech.common.covers.CoverLiquidMeter; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollowerNumericWidget; +import gregtech.common.gui.modularui.widget.CoverDataFollowerToggleButtonWidget; import io.netty.buffer.ByteBuf; public class CoverWirelessFluidDetector @@ -51,7 +54,11 @@ public FluidTransmitterData doCoverThingsImpl(ForgeDirection side, byte aInputRe final long hash = hashCoverCoords(aTileEntity, side); setSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), hash, signal); - aTileEntity.setOutputRedstoneSignal(side, signal); + if (aCoverVariable.physical) { + aTileEntity.setOutputRedstoneSignal(side, signal); + } else { + aTileEntity.setOutputRedstoneSignal(side, (byte) 0); + } return aCoverVariable; } @@ -72,21 +79,25 @@ public static class FluidTransmitterData extends CoverAdvancedRedstoneTransmitte /** The special value {@code 0} means threshold check is disabled. */ private int threshold; + /** Whether the wireless detector cover also sets the tiles sided Redstone output */ + private boolean physical; - public FluidTransmitterData(int frequency, UUID uuid, boolean invert, int threshold) { + public FluidTransmitterData(int frequency, UUID uuid, boolean invert, int threshold, boolean physical) { super(frequency, uuid, invert); this.threshold = threshold; + this.physical = physical; } public FluidTransmitterData() { super(); this.threshold = 0; + this.physical = true; } @Nonnull @Override public ISerializableObject copy() { - return new FluidTransmitterData(frequency, uuid, invert, threshold); + return new FluidTransmitterData(frequency, uuid, invert, threshold, physical); } @Nonnull @@ -94,6 +105,7 @@ public ISerializableObject copy() { public NBTBase saveDataToNBT() { NBTTagCompound tag = (NBTTagCompound) super.saveDataToNBT(); tag.setInteger("threshold", threshold); + tag.setBoolean("physical", physical); return tag; } @@ -102,6 +114,7 @@ public NBTBase saveDataToNBT() { public void writeToByteBuf(ByteBuf aBuf) { super.writeToByteBuf(aBuf); aBuf.writeInt(threshold); + aBuf.writeBoolean(physical); } @Override @@ -110,6 +123,11 @@ public void loadDataFromNBT(NBTBase aNBT) { NBTTagCompound tag = (NBTTagCompound) aNBT; threshold = tag.getInteger("threshold"); + if (tag.hasKey("physical")) { + physical = tag.getBoolean("physical"); + } else { + physical = false; + } } @Nonnull @@ -117,6 +135,7 @@ public void loadDataFromNBT(NBTBase aNBT) { public ISerializableObject readFromPacket(ByteArrayDataInput aBuf, EntityPlayerMP aPlayer) { super.readFromPacket(aBuf, aPlayer); threshold = aBuf.readInt(); + physical = aBuf.readBoolean(); return this; } @@ -137,6 +156,11 @@ public WirelessFluidDetectorUIFactory(CoverUIBuildContext buildContext) { super(buildContext); } + @Override + protected int getGUIHeight() { + return 123; + } + @Override protected int getFrequencyRow() { return 0; @@ -151,9 +175,25 @@ protected int getButtonRow() { protected void addUIWidgets(ModularWindow.Builder builder) { setMaxCapacity(); super.addUIWidgets(builder); - builder.widget( - new TextWidget(GTUtility.trans("222", "Fluid threshold")).setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5, 4 + startY + spaceY * 2)); + builder + .widget( + new TextWidget(GTUtility.trans("222", "Fluid threshold")).setDefaultColor(COLOR_TEXT_GRAY.get()) + .setPos(startX + spaceX * 5, 4 + startY + spaceY * 2)) + .widget(TextWidget.dynamicString(() -> { + FluidTransmitterData coverData = getCoverData(); + if (coverData != null) { + return getCoverData().physical + ? StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.1") + : StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.0"); + } else { + return ""; + } + }) + .setSynced(false) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setTextAlignment(Alignment.CenterLeft) + .setPos(startX + spaceX, 4 + startY + spaceY * 3) + .setSize(spaceX * 10, 12)); } @Override @@ -170,7 +210,17 @@ protected void addUIForDataController(CoverDataControllerWidget coverData.physical, + (coverData, state) -> { + coverData.physical = state; + return coverData; + }, + widget -> widget + .addTooltip(StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.tooltip")) + .setPos(0, 1 + spaceY * 3)); } private void setMaxCapacity() { diff --git a/src/main/java/gregtech/common/covers/redstone/CoverWirelessItemDetector.java b/src/main/java/gregtech/common/covers/redstone/CoverWirelessItemDetector.java index 72b6d25e736..087e5d58dd9 100644 --- a/src/main/java/gregtech/common/covers/redstone/CoverWirelessItemDetector.java +++ b/src/main/java/gregtech/common/covers/redstone/CoverWirelessItemDetector.java @@ -10,10 +10,12 @@ import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import com.google.common.io.ByteArrayDataInput; import com.gtnewhorizons.modularui.api.NumberFormatMUI; +import com.gtnewhorizons.modularui.api.math.Alignment; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; @@ -26,6 +28,7 @@ import gregtech.common.covers.CoverItemMeter; import gregtech.common.gui.modularui.widget.CoverDataControllerWidget; import gregtech.common.gui.modularui.widget.CoverDataFollowerNumericWidget; +import gregtech.common.gui.modularui.widget.CoverDataFollowerToggleButtonWidget; import gregtech.common.gui.modularui.widget.ItemWatcherSlotWidget; import gregtech.common.tileentities.storage.MTEDigitalChestBase; import io.netty.buffer.ByteBuf; @@ -59,7 +62,11 @@ public ItemTransmitterData doCoverThingsImpl(ForgeDirection side, byte aInputRed final long hash = hashCoverCoords(aTileEntity, side); setSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), hash, signal); - aTileEntity.setOutputRedstoneSignal(side, signal); + if (aCoverVariable.physical) { + aTileEntity.setOutputRedstoneSignal(side, signal); + } else { + aTileEntity.setOutputRedstoneSignal(side, (byte) 0); + } return aCoverVariable; } @@ -86,23 +93,28 @@ public static class ItemTransmitterData extends CoverAdvancedRedstoneTransmitter * The special value {@code 0} means threshold check is disabled. */ private int threshold; + /** Whether the wireless detector cover also sets the tiles sided Redstone output */ + private boolean physical; - public ItemTransmitterData(int frequency, UUID uuid, boolean invert, int threshold, int slot) { + public ItemTransmitterData(int frequency, UUID uuid, boolean invert, int threshold, int slot, + boolean physical) { super(frequency, uuid, invert); this.threshold = threshold; this.slot = slot; + this.physical = physical; } public ItemTransmitterData() { super(); this.threshold = 0; this.slot = -1; + this.physical = true; } @Nonnull @Override public ISerializableObject copy() { - return new ItemTransmitterData(frequency, uuid, invert, threshold, slot); + return new ItemTransmitterData(frequency, uuid, invert, threshold, slot, physical); } @Nonnull @@ -111,6 +123,7 @@ public NBTBase saveDataToNBT() { NBTTagCompound tag = (NBTTagCompound) super.saveDataToNBT(); tag.setInteger("threshold", threshold); tag.setInteger("slot", slot); + tag.setBoolean("physical", physical); return tag; } @@ -120,6 +133,7 @@ public void writeToByteBuf(ByteBuf aBuf) { super.writeToByteBuf(aBuf); aBuf.writeInt(threshold); aBuf.writeInt(slot); + aBuf.writeBoolean(physical); } @Override @@ -129,6 +143,12 @@ public void loadDataFromNBT(NBTBase aNBT) { NBTTagCompound tag = (NBTTagCompound) aNBT; threshold = tag.getInteger("threshold"); slot = tag.getInteger("slot"); + + if (tag.hasKey("physical")) { + physical = tag.getBoolean("physical"); + } else { + physical = false; + } } @Nonnull @@ -137,6 +157,7 @@ public ISerializableObject readFromPacket(ByteArrayDataInput aBuf, EntityPlayerM super.readFromPacket(aBuf, aPlayer); threshold = aBuf.readInt(); slot = aBuf.readInt(); + physical = aBuf.readBoolean(); return this; } @@ -172,6 +193,11 @@ public WirelessItemDetectorUIFactory(CoverUIBuildContext buildContext) { super(buildContext); } + @Override + protected int getGUIHeight() { + return 143; + } + @Override protected int getFrequencyRow() { return 0; @@ -195,7 +221,22 @@ protected void addUIWidgets(ModularWindow.Builder builder) { .setPos(startX + spaceX * 5, 4 + startY + spaceY * 2)) .widget( new TextWidget(GTUtility.trans("254", "Detect Slot #")).setDefaultColor(COLOR_TEXT_GRAY.get()) - .setPos(startX + spaceX * 5, 4 + startY + spaceY * 3)); + .setPos(startX + spaceX * 5, 4 + startY + spaceY * 3)) + .widget(TextWidget.dynamicString(() -> { + ItemTransmitterData coverData = getCoverData(); + if (coverData != null) { + return getCoverData().physical + ? StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.1") + : StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.0"); + } else { + return ""; + } + }) + .setSynced(false) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setTextAlignment(Alignment.CenterLeft) + .setPos(startX + spaceX, 5 + startY + spaceY * 4) + .setSize(spaceX * 10, 12)); } @Override @@ -225,7 +266,17 @@ protected void addUIForDataController(CoverDataControllerWidget coverData.physical, + (coverData, state) -> { + coverData.physical = state; + return coverData; + }, + widget -> widget + .addTooltip(StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.tooltip")) + .setPos(0, 2 + spaceY * 4)); } private void setMaxSlot() { diff --git a/src/main/java/gregtech/common/covers/redstone/CoverWirelessMaintenanceDetector.java b/src/main/java/gregtech/common/covers/redstone/CoverWirelessMaintenanceDetector.java index a71e597969e..e44e70858ab 100644 --- a/src/main/java/gregtech/common/covers/redstone/CoverWirelessMaintenanceDetector.java +++ b/src/main/java/gregtech/common/covers/redstone/CoverWirelessMaintenanceDetector.java @@ -8,9 +8,11 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTBase; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import com.google.common.io.ByteArrayDataInput; +import com.gtnewhorizons.modularui.api.math.Alignment; import com.gtnewhorizons.modularui.api.screen.ModularWindow; import com.gtnewhorizons.modularui.common.widget.TextWidget; @@ -96,7 +98,11 @@ public MaintenanceTransmitterData doCoverThingsImpl(ForgeDirection side, byte aI final long hash = hashCoverCoords(aTileEntity, side); setSignalAt(aCoverVariable.getUuid(), aCoverVariable.getFrequency(), hash, signal); - aTileEntity.setOutputRedstoneSignal(side, signal); + if (aCoverVariable.physical) { + aTileEntity.setOutputRedstoneSignal(side, signal); + } else { + aTileEntity.setOutputRedstoneSignal(side, (byte) 0); + } return aCoverVariable; } @@ -133,21 +139,26 @@ public enum MaintenanceMode { public static class MaintenanceTransmitterData extends CoverAdvancedRedstoneTransmitterBase.TransmitterData { private MaintenanceMode mode; + /** Whether the wireless detector cover also sets the tiles sided Redstone output */ + private boolean physical; - public MaintenanceTransmitterData(int frequency, UUID uuid, boolean invert, MaintenanceMode mode) { + public MaintenanceTransmitterData(int frequency, UUID uuid, boolean invert, MaintenanceMode mode, + boolean physical) { super(frequency, uuid, invert); this.mode = mode; + this.physical = physical; } public MaintenanceTransmitterData() { super(); this.mode = MaintenanceMode.ONE_ISSUE; + this.physical = true; } @Nonnull @Override public ISerializableObject copy() { - return new MaintenanceTransmitterData(frequency, uuid, invert, mode); + return new MaintenanceTransmitterData(frequency, uuid, invert, mode, physical); } @Nonnull @@ -155,6 +166,7 @@ public ISerializableObject copy() { public NBTBase saveDataToNBT() { NBTTagCompound tag = (NBTTagCompound) super.saveDataToNBT(); tag.setInteger("mode", mode.ordinal()); + tag.setBoolean("physical", physical); return tag; } @@ -163,6 +175,7 @@ public NBTBase saveDataToNBT() { public void writeToByteBuf(ByteBuf aBuf) { super.writeToByteBuf(aBuf); aBuf.writeInt(mode.ordinal()); + aBuf.writeBoolean(physical); } @Override @@ -171,6 +184,11 @@ public void loadDataFromNBT(NBTBase aNBT) { NBTTagCompound tag = (NBTTagCompound) aNBT; mode = MaintenanceMode.values()[tag.getInteger("mode")]; + if (tag.hasKey("physical")) { + physical = tag.getBoolean("physical"); + } else { + physical = false; + } } @Nonnull @@ -178,6 +196,7 @@ public void loadDataFromNBT(NBTBase aNBT) { public ISerializableObject readFromPacket(ByteArrayDataInput aBuf, EntityPlayerMP aPlayer) { super.readFromPacket(aBuf, aPlayer); mode = MaintenanceMode.values()[aBuf.readInt()]; + physical = aBuf.readBoolean(); return this; } @@ -201,7 +220,7 @@ public WirelessMaintenanceDetectorUIFactory(CoverUIBuildContext buildContext) { @Override protected int getGUIHeight() { - return 143; + return 175; } @Override @@ -222,6 +241,21 @@ protected void addUIWidgets(ModularWindow.Builder builder) { new TextWidget(extraTexts[i]).setDefaultColor(COLOR_TEXT_GRAY.get()) .setPos(startX + spaceX * (i % 2 == 0 ? 1 : 7), 4 + startY + spaceY * (2 + i / 2))); } + builder.widget(TextWidget.dynamicString(() -> { + MaintenanceTransmitterData coverData = getCoverData(); + if (coverData != null) { + return getCoverData().physical + ? StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.1") + : StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.0"); + } else { + return ""; + } + }) + .setSynced(false) + .setDefaultColor(COLOR_TEXT_GRAY.get()) + .setTextAlignment(Alignment.CenterLeft) + .setPos(startX + spaceX, 4 + startY + spaceY * 6) + .setSize(spaceX * 10, 12)); } @Override @@ -239,6 +273,16 @@ protected void addUIForDataController(CoverDataControllerWidget widget.setToggleTexture(GTUITextures.OVERLAY_BUTTON_CHECKMARK, GTUITextures.TRANSPARENT) .setPos(spaceX * (index % 2 == 0 ? 0 : 6), spaceY * (2 + index / 2))); } + controller.addFollower( + CoverDataFollowerToggleButtonWidget.ofDisableable(), + coverData -> coverData.physical, + (coverData, state) -> { + coverData.physical = state; + return coverData; + }, + widget -> widget + .addTooltip(StatCollector.translateToLocal("gt.cover.wirelessdetector.redstone.tooltip")) + .setPos(0, 1 + spaceY * 6)); } } } diff --git a/src/main/java/gregtech/common/items/MetaGeneratedItem01.java b/src/main/java/gregtech/common/items/MetaGeneratedItem01.java index c6950fb8871..0560f42aa13 100644 --- a/src/main/java/gregtech/common/items/MetaGeneratedItem01.java +++ b/src/main/java/gregtech/common/items/MetaGeneratedItem01.java @@ -3481,7 +3481,7 @@ public boolean onEntityItemUpdate(EntityItem aItemEntity) { OrePrefixes aPrefix = this.mGeneratedPrefixList[(aDamage / 1000)]; if ((aPrefix == OrePrefixes.dustImpure) || (aPrefix == OrePrefixes.dustPure)) { Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); - byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); + int tMetaData = aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { aMaterial = cauldronRemap.getOrDefault(aMaterial, aMaterial); @@ -3494,7 +3494,7 @@ public boolean onEntityItemUpdate(EntityItem aItemEntity) { } } else if (aPrefix == OrePrefixes.crushed) { Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); - byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); + int tMetaData = aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { aItemEntity.setEntityItemStack( GTOreDictUnificator @@ -3504,7 +3504,7 @@ public boolean onEntityItemUpdate(EntityItem aItemEntity) { } } else if (aPrefix == OrePrefixes.dust && aMaterial == Materials.Wheat) { Block tBlock = aItemEntity.worldObj.getBlock(tX, tY, tZ); - byte tMetaData = (byte) aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); + int tMetaData = aItemEntity.worldObj.getBlockMetadata(tX, tY, tZ); if ((tBlock == Blocks.cauldron) && (tMetaData > 0)) { aItemEntity.setEntityItemStack(ItemList.Food_Dough.get(aItemEntity.getEntityItem().stackSize)); aItemEntity.worldObj.setBlockMetadataWithNotify(tX, tY, tZ, tMetaData - 1, 3); diff --git a/src/main/java/gregtech/common/items/behaviors/BehaviourCrowbar.java b/src/main/java/gregtech/common/items/behaviors/BehaviourCrowbar.java index 76c215bfd00..da9b3f336a3 100644 --- a/src/main/java/gregtech/common/items/behaviors/BehaviourCrowbar.java +++ b/src/main/java/gregtech/common/items/behaviors/BehaviourCrowbar.java @@ -37,7 +37,7 @@ public boolean onItemUseFirst(MetaBaseItem aItem, ItemStack aStack, EntityPlayer if (aBlock == null) { return false; } - byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + int aMeta = aWorld.getBlockMetadata(aX, aY, aZ); if (aBlock == Blocks.rail) { if (GTModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { aWorld.isRemote = true; diff --git a/src/main/java/gregtech/common/items/behaviors/BehaviourScrewdriver.java b/src/main/java/gregtech/common/items/behaviors/BehaviourScrewdriver.java index 599398349f8..029f94fc5c8 100644 --- a/src/main/java/gregtech/common/items/behaviors/BehaviourScrewdriver.java +++ b/src/main/java/gregtech/common/items/behaviors/BehaviourScrewdriver.java @@ -32,7 +32,7 @@ public boolean onItemUseFirst(MetaBaseItem aItem, ItemStack aStack, EntityPlayer if (aBlock == null) { return false; } - byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + int aMeta = aWorld.getBlockMetadata(aX, aY, aZ); if ((aBlock == Blocks.unpowered_repeater) || (aBlock == Blocks.powered_repeater)) { if (GTModHandler.damageOrDechargeItem(aStack, this.mVanillaCosts, this.mEUCosts, aPlayer)) { aWorld.setBlockMetadataWithNotify(aX, aY, aZ, aMeta / 4 * 4 + (aMeta % 4 + 1) % 4, 3); diff --git a/src/main/java/gregtech/common/items/behaviors/BehaviourSoftHammer.java b/src/main/java/gregtech/common/items/behaviors/BehaviourSoftHammer.java index 83e458276db..72c930ac60f 100644 --- a/src/main/java/gregtech/common/items/behaviors/BehaviourSoftHammer.java +++ b/src/main/java/gregtech/common/items/behaviors/BehaviourSoftHammer.java @@ -35,7 +35,7 @@ public boolean onItemUseFirst(MetaBaseItem aItem, ItemStack aStack, EntityPlayer if (aBlock == null) { return false; } - byte aMeta = (byte) aWorld.getBlockMetadata(aX, aY, aZ); + int aMeta = aWorld.getBlockMetadata(aX, aY, aZ); if (aBlock == Blocks.lit_redstone_lamp) { if ((aPlayer.capabilities.isCreativeMode) || (((MetaGeneratedTool) aItem).doDamage(aStack, this.mCosts))) { aWorld.isRemote = true; diff --git a/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java b/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java index e7e4353c7a2..eb75d6974ec 100644 --- a/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java +++ b/src/main/java/gregtech/common/misc/spaceprojects/SpaceProjectWorldSavedData.java @@ -207,6 +207,7 @@ private static class SpaceTeamAdapter public JsonElement serialize(HashMap src, Type typeOfSrc, JsonSerializationContext context) { JsonArray map = new JsonArray(); for (Entry entry : src.entrySet()) { + if (entry.getKey() == null) continue; JsonObject teamMap = new JsonObject(); teamMap.addProperty( diff --git a/src/main/java/gregtech/common/render/GTCopiedBlockTextureRender.java b/src/main/java/gregtech/common/render/GTCopiedBlockTextureRender.java index 3ce88236635..3966654df46 100644 --- a/src/main/java/gregtech/common/render/GTCopiedBlockTextureRender.java +++ b/src/main/java/gregtech/common/render/GTCopiedBlockTextureRender.java @@ -12,14 +12,15 @@ public class GTCopiedBlockTextureRender extends GTTextureBase implements ITexture, IBlockContainer { private final Block mBlock; - private final byte mSide, mMeta; + private final byte mSide; + private final int mMeta; protected GTCopiedBlockTextureRender(Block aBlock, int ordinalSide, int aMeta, short[] aRGBa, boolean allowAlpha) { if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GTCopiedBlockTextureRender"); mBlock = aBlock; mSide = (byte) ordinalSide; - mMeta = (byte) aMeta; + mMeta = aMeta; } @Override @@ -107,7 +108,7 @@ public Block getBlock() { } @Override - public byte getMeta() { + public int getMeta() { return mMeta; } } diff --git a/src/main/java/gregtech/common/render/GTCopiedCTMBlockTexture.java b/src/main/java/gregtech/common/render/GTCopiedCTMBlockTexture.java index a33ead9ec54..1bfe6b55e8d 100644 --- a/src/main/java/gregtech/common/render/GTCopiedCTMBlockTexture.java +++ b/src/main/java/gregtech/common/render/GTCopiedCTMBlockTexture.java @@ -13,14 +13,15 @@ class GTCopiedCTMBlockTexture extends GTTextureBase implements ITexture, IBlockContainer { private final Block mBlock; - private final byte mSide, mMeta; + private final byte mSide; + private final int mMeta; GTCopiedCTMBlockTexture(Block aBlock, int ordinalSide, int aMeta, short[] aRGBa, boolean allowAlpha) { if (aRGBa.length != 4) throw new IllegalArgumentException("RGBa doesn't have 4 Values @ GTCopiedCTMBlockTexture"); mBlock = aBlock; mSide = (byte) ordinalSide; - mMeta = (byte) aMeta; + mMeta = aMeta; } @Override @@ -112,7 +113,7 @@ public Block getBlock() { } @Override - public byte getMeta() { + public int getMeta() { return mMeta; } } diff --git a/src/main/java/gregtech/common/render/GTTextureBuilder.java b/src/main/java/gregtech/common/render/GTTextureBuilder.java index aad734b8288..0346c579a46 100644 --- a/src/main/java/gregtech/common/render/GTTextureBuilder.java +++ b/src/main/java/gregtech/common/render/GTTextureBuilder.java @@ -134,10 +134,10 @@ public ITexture build() { } private boolean isCTMBlock(Block fromBlock, int fromMeta) { - return GTMod.gregtechproxy.mCTMBlockCache.computeIfAbsent(fromBlock, (byte) fromMeta, GTTextureBuilder::apply); + return GTMod.gregtechproxy.mCTMBlockCache.computeIfAbsent(fromBlock, fromMeta, GTTextureBuilder::apply); } - private static Boolean apply(Block b, Byte m) { + private static Boolean apply(Block b, int m) { Class clazz = b.getClass(); while (clazz != Block.class) { final String className = clazz.getName(); diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/MTENameRemover.java b/src/main/java/gregtech/common/tileentities/machines/basic/MTENameRemover.java new file mode 100644 index 00000000000..bc4112dee4b --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/MTENameRemover.java @@ -0,0 +1,259 @@ +package gregtech.common.tileentities.machines.basic; + +import static net.minecraft.util.EnumChatFormatting.BOLD; +import static net.minecraft.util.EnumChatFormatting.RESET; +import static net.minecraft.util.EnumChatFormatting.UNDERLINE; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +import com.gtnewhorizons.modularui.api.drawable.FallbackableUITexture; + +import gregtech.api.enums.Textures; +import gregtech.api.gui.modularui.GTUITextures; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.CoverableTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.MTEBasicMachine; +import gregtech.api.recipe.BasicUIProperties; +import gregtech.api.render.TextureFactory; +import gregtech.common.items.ItemIntegratedCircuit; + +public class MTENameRemover extends MTEBasicMachine { + + public MTENameRemover(int aID, String aName, String aNameRegional, int aTier) { + super( + aID, + aName, + aNameRegional, + aTier, + 1, + "Can fix GT items with broken NBT data, will erase everything!", + 2, + 1, + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER_ACTIVE), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER_ACTIVE), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE_GLOW) + .glow() + .build()), + TextureFactory.of( + TextureFactory.of(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER_GLOW) + .glow() + .build())); + } + + public MTENameRemover(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 1, aDescription, aTextures, 2, 1); + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new MTENameRemover(mName, mTier, mDescriptionArray, mTextures); + } + + @Override + public int checkRecipe() { + if (getInputAt(0) == null) return 0; + ItemStack output = getInputAt(0).copy(); + NBTTagCompound nbt = output.getTagCompound(); + if (nbt != null) { + int circuitSetting = 0; + ItemStack circuit = getInputAt(1); + if (circuit != null && circuit.getItem() instanceof ItemIntegratedCircuit) { + circuitSetting = circuit.getItemDamage(); + } + boolean removeName = false; + boolean removeDisassembly = false; + boolean removeColor = false; + boolean removeRepair = false; + boolean removeDye = false; + boolean removeSpray = false; + boolean removeCovers = false; + switch (circuitSetting) { + case 1: + removeName = true; + break; + case 2: + removeDisassembly = true; + break; + case 3: + removeColor = true; + break; + case 4: + removeRepair = true; + break; + case 5: + removeDye = true; + break; + case 6: + removeSpray = true; + break; + case 24: + removeCovers = true; + default: + removeName = true; + removeDisassembly = true; + removeColor = true; + removeRepair = true; + removeDye = true; + removeSpray = true; + } + if (removeName && nbt.hasKey("display")) { + nbt.getCompoundTag("display") + .removeTag("Name"); + if (nbt.getCompoundTag("display") + .hasNoTags()) { + nbt.removeTag("display"); + } + } + if (removeDisassembly) removeTag(nbt, "GT.CraftingComponents"); + if (removeColor) removeTag(nbt, "color"); + if (removeRepair) removeTag(nbt, "RepairCost"); + if (removeDye && nbt.hasKey("display")) { + nbt.getCompoundTag("display") + .removeTag("color"); + if (nbt.getCompoundTag("display") + .hasNoTags()) { + nbt.removeTag("display"); + } + } + if (removeSpray) removeTag(nbt, "mColor"); + removeTag(nbt, "mTargetStackSize"); // MTEBuffer + removeTag(nbt, "mOutputFluid"); // MTEDigitalTankBase + removeTag(nbt, "mVoidOverflow"); // MTEDigitalTankBase & MTEQuantumChest + removeTag(nbt, "mVoidFluidFull"); // MTEDigitalTankBase + removeTag(nbt, "mLockFluid"); // MTEDigitalTankBase + removeTag(nbt, "lockedFluidName"); // MTEDigitalTankBase + removeTag(nbt, "mAllowInputFromOutputSide"); // MTEDigitalTankBase + removeTag(nbt, "mItemsPerSide"); // MTEItemDistributor + removeTag(nbt, "radiusConfig"); // MTEMiner & MTEPump + removeTag(nbt, "mDisallowRetract"); // MTEPump + removeTag(nbt, "mStrongRedstone"); // BaseMetaTileEntity + if (removeCovers) { // BaseMetaTileEntity + removeTag(nbt, "mMuffler"); + removeTag(nbt, "mLockUpgrade"); + removeTag(nbt, "mCoverSides"); + removeTag(nbt, "gt.covers"); + for (String key : CoverableTileEntity.COVER_DATA_NBT_KEYS) { + removeTag(nbt, key); + } + } + if (nbt.hasNoTags()) { + output.setTagCompound(null); + } + } + if (canOutput(output)) { + getInputAt(0).stackSize = 0; + mEUt = 0; + mMaxProgresstime = 20; + mOutputItems[0] = output; + return 2; + } + return 0; + } + + private static void removeTag(NBTTagCompound nbt, String key) { + if (nbt.hasKey(key)) { + nbt.removeTag(key); + } + } + + @Override + public String[] getDescription() { + List description = new ArrayList<>(); + description.add("Removes various NBT tags as well as covers."); + description.add(" "); + description.add(UNDERLINE + "First Slot" + RESET); + description.add("The item you want to strip of NBT"); + description.add(" "); + description.add(UNDERLINE + "Second Slot" + RESET); + description.add("One of the following circuits:"); + description.add(BOLD + "Circuit 1:" + RESET + " Attempt to fix broken ores by removing the Display Name tag"); + description.add(BOLD + "Circuit 3:" + RESET + " Remove Railcraft stacking tag"); + description.add(BOLD + "Circuit 4:" + RESET + " Remove Anvil repair tag"); + description.add(BOLD + "Circuit 5:" + RESET + " Remove Dye from Leather armor"); + description.add(BOLD + "Circuit 6:" + RESET + " Remove Spray color from GT items"); + description.add( + BOLD + "Circuit 24:" + + RESET + + " Remove everything including covers. Be careful you won't recover the covers!"); + description.add(" "); + description.add(BOLD + "No Circuit:" + RESET + " Remove everything except covers"); + return description.toArray(new String[0]); + } + + @Override + public boolean isElectric() { + return false; + } + + @Override + public long maxEUStore() { + return 0; + } + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public long maxAmperesIn() { + return 0; + } + + @Override + public long maxAmperesOut() { + return 0; + } + + @Override + protected BasicUIProperties getUIProperties() { + return super.getUIProperties().toBuilder() + .progressBarTexture(new FallbackableUITexture(GTUITextures.PROGRESSBAR_NAME_REMOVER)) + .build(); + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/long_distance/MTELongDistancePipelineBase.java b/src/main/java/gregtech/common/tileentities/machines/long_distance/MTELongDistancePipelineBase.java index 259988c16aa..e3f270e8a28 100644 --- a/src/main/java/gregtech/common/tileentities/machines/long_distance/MTELongDistancePipelineBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/long_distance/MTELongDistancePipelineBase.java @@ -215,7 +215,7 @@ protected void scanPipes() { Block aBlock = gtTile.getBlockAtSide(gtTile.getBackFacing()); if (aBlock instanceof BlockLongDistancePipe) { - byte aMetaData = gtTile.getMetaIDAtSide(gtTile.getBackFacing()); + int aMetaData = gtTile.getMetaIDAtSide(gtTile.getBackFacing()); if (aMetaData != getPipeMeta()) return; HashSet tVisited = new HashSet<>(Collections.singletonList(getCoords())), diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilter1.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilter1.java new file mode 100644 index 00000000000..d533dfc9572 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilter1.java @@ -0,0 +1,48 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.enums.TierEU; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class MTEAirFilter1 extends MTEAirFilterBase { + + public MTEAirFilter1(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + multiTier = 1; + } + + public MTEAirFilter1(String aName) { + super(aName); + multiTier = 1; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new MTEAirFilter1(mName); + } + + @Override + public long getEUt() { + return TierEU.RECIPE_LV; + } + + @Override + public float getBonusByTier() { + return 1.0f; + } + + @Override + public int getCasingIndex() { + return 57; + } + + @Override + public int getPipeMeta() { + return 1; + } + + @Override + public int getCasingMeta() { + return 0; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilter2.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilter2.java new file mode 100644 index 00000000000..08e1c6bcb52 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilter2.java @@ -0,0 +1,48 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.enums.TierEU; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class MTEAirFilter2 extends MTEAirFilterBase { + + public MTEAirFilter2(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + multiTier = 2; + } + + public MTEAirFilter2(String aName) { + super(aName); + multiTier = 2; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new MTEAirFilter2(mName); + } + + @Override + public long getEUt() { + return TierEU.RECIPE_HV; + } + + @Override + public float getBonusByTier() { + return 1.05f; + } + + @Override + public int getCasingIndex() { + return 59; + } + + @Override + public int getPipeMeta() { + return 4; + } + + @Override + public int getCasingMeta() { + return 3; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilter3.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilter3.java new file mode 100644 index 00000000000..5450a5c309a --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilter3.java @@ -0,0 +1,48 @@ +package gregtech.common.tileentities.machines.multi; + +import gregtech.api.enums.TierEU; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class MTEAirFilter3 extends MTEAirFilterBase { + + public MTEAirFilter3(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + multiTier = 3; + } + + public MTEAirFilter3(String aName) { + super(aName); + multiTier = 3; + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new MTEAirFilter3(mName); + } + + @Override + public long getEUt() { + return TierEU.RECIPE_IV; + } + + @Override + public float getBonusByTier() { + return 1.1f; + } + + @Override + public int getCasingIndex() { + return 60; + } + + @Override + public int getPipeMeta() { + return 6; + } + + @Override + public int getCasingMeta() { + return 5; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilterBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilterBase.java new file mode 100644 index 00000000000..632196b8398 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAirFilterBase.java @@ -0,0 +1,609 @@ +package gregtech.common.tileentities.machines.multi; + +import static com.gtnewhorizon.structurelib.structure.StructureUtility.lazy; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain; +import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; +import static gregtech.api.enums.GTValues.VN; +import static gregtech.api.enums.Textures.BlockIcons.TURBINE_NEW; +import static gregtech.api.enums.Textures.BlockIcons.TURBINE_NEW_ACTIVE; +import static gregtech.api.util.GTStructureUtility.ofHatchAdder; +import static gregtech.api.util.GTStructureUtility.ofHatchAdderOptional; +import static gregtech.api.util.GTUtility.filterValidMTEs; +import static java.lang.Math.max; +import static java.lang.Math.min; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Random; + +import net.minecraft.block.Block; +import net.minecraft.client.renderer.RenderBlocks; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.ChatComponentText; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +import org.jetbrains.annotations.NotNull; + +import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits; +import com.gtnewhorizon.structurelib.alignment.enumerable.ExtendedFacing; +import com.gtnewhorizon.structurelib.structure.IStructureDefinition; +import com.gtnewhorizon.structurelib.structure.StructureDefinition; + +import gregtech.api.GregTechAPI; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Mods; +import gregtech.api.enums.Textures; +import gregtech.api.interfaces.IIconContainer; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.IToolStats; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.MetaGeneratedTool; +import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase; +import gregtech.api.metatileentity.implementations.MTEHatchMuffler; +import gregtech.api.objects.XSTR; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTUtility; +import gregtech.api.util.GTUtilityClient; +import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.common.items.MetaGeneratedTool01; +import gregtech.common.pollution.Pollution; + +public abstract class MTEAirFilterBase extends MTEEnhancedMultiBlockBase { + + // Formerly configurable values + public static final int POLLUTION_THRESHOLD = 10000; + public static final float BOOST_PER_FILTER = 2.0f; + public static final float GLOBAL_MULTIPLIER = 30.0f; + public static final float SCALING_FACTOR = 2.5f; + public static final int USES_PER_FILTER = 30; + + private static final Random RANDOM = new XSTR(); + + protected int baseEff = 0; + protected int multiTier = 0; + protected int chunkIndex = 0; + protected boolean hasPollution = false; + protected int mode = 0; // 0 for processing chunks in order, 1 for processing chunks randomly + protected int size; // current working size of the multi, max is 2*multiTier + 1 + protected boolean isFilterLoaded = false; + protected int filterUsageRemaining = 0; + protected int tickCounter = 0; // because we can't trust the world tick, it may be in a dim with eternal day, etc + private boolean mFormed; + protected static final String STRUCTURE_PIECE_MAIN = "main"; + protected static final ClassValue> STRUCTURE_DEFINITION = new ClassValue<>() { + + @Override + protected IStructureDefinition computeValue(Class type) { + return StructureDefinition.builder() + .addShape( + STRUCTURE_PIECE_MAIN, + transpose( + new String[][] { { "xxx", "xxx", "xxx" }, { "vmv", "m-m", "vmv" }, { "vmv", "m-m", "vmv" }, + { "c~c", "ccc", "ccc" }, })) + .addElement( + 'c', + lazy( + x -> ofChain( + ofBlock(GregTechAPI.sBlockCasingsNH, x.getCasingMeta()), + ofHatchAdder(MTEAirFilterBase::addMaintenanceToMachineList, x.getCasingIndex(), 1), + ofHatchAdder(MTEAirFilterBase::addInputToMachineList, x.getCasingIndex(), 1), + ofHatchAdder(MTEAirFilterBase::addOutputToMachineList, x.getCasingIndex(), 1), + ofHatchAdder(MTEAirFilterBase::addEnergyInputToMachineList, x.getCasingIndex(), 1)))) + .addElement('x', lazy(x -> ofBlock(GregTechAPI.sBlockCasingsNH, x.getCasingMeta()))) + .addElement('v', lazy(x -> ofBlock(GregTechAPI.sBlockCasingsNH, x.getPipeMeta()))) + .addElement( + 'm', + lazy( + x -> ofHatchAdderOptional( + MTEAirFilterBase::addMufflerToMachineList, + x.getCasingIndex(), + 2, + GregTechAPI.sBlockCasingsNH, + x.getCasingMeta()))) + .build(); + } + }; + + @Override + public final IStructureDefinition getStructureDefinition() { + return STRUCTURE_DEFINITION.get(getClass()); + } + + @Override + public void construct(ItemStack stackSize, boolean hintsOnly) { + buildPiece(STRUCTURE_PIECE_MAIN, stackSize, hintsOnly, 1, 3, 0); + } + + @Override + public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { + return checkPiece(STRUCTURE_PIECE_MAIN, 1, 3, 0) && !mMufflerHatches.isEmpty() + && mMaintenanceHatches.size() == 1; + } + + public MTEAirFilterBase(int aID, String aName, String aNameRegional) { + super(aID, aName, aNameRegional); + } + + public MTEAirFilterBase(String aName) { + super(aName); + } + + public abstract long getEUt(); + + public String getCasingString() { + return switch (getCasingMeta()) { + case 0 -> "Air Filter Turbine Casing"; + case 3 -> "Advanced Air Filter Turbine Casing"; + case 5 -> "Super Air Filter Turbine Casing"; + default -> "fill a ticket on github if you read this"; + }; + } + + public String getPipeString() { + return switch (getPipeMeta()) { + case 1 -> "Air Filter Vent Casing"; + case 4 -> "Advanced Air Filter Vent Casing"; + case 6 -> "Super Air Filter Vent Casing"; + default -> "fill a ticket on github if you read this"; + }; + } + + @Override + protected MultiblockTooltipBuilder createTooltip() { + final MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); + tt.addMachineType("Air Filter") + .addInfo("Needs a Turbine in the controller") + .addInfo("Can process " + (2 * multiTier + 1) + "x" + (2 * multiTier + 1) + " chunks") + .addInfo("Each muffler hatch reduces pollution in one chunk of the working area by:") + .addInfo( + " " + EnumChatFormatting.WHITE + + GLOBAL_MULTIPLIER + + " * multiTierBonus * turbineEff * FLOOR(" + + SCALING_FACTOR + + "^mufflerTier)") + .addInfo("every second") + .addInfo("- multiTierBonus for this controller is " + getBonusByTier()) + .addInfo("- turbineEff is the efficiency of the Turbine in controller slot") + .addInfo("- Effective muffler tier is limited by energy input tier") + .addInfo("- Uses " + getEUt() + " EU/t while working") + .addSeparator() + .addInfo("Insert Absorption Filter in an input bus") + .addInfo(" to double pollution cleaning amount (30 uses per item)") + .addInfo("Each maintenance issue reduces cleaning amount by 10%") + .beginStructureBlock(3, 4, 3, true) + .addController("Front bottom") + .addOtherStructurePart(getCasingString(), "Top and bottom layers") + .addOtherStructurePart(getPipeString(), "Corners of the middle two layers") + .addOtherStructurePart("Muffler Hatch", "Sides of the middle two layers") + .addEnergyHatch("Any bottom layer casing", 1) + .addMaintenanceHatch("Any bottom layer casing", 1) + .addInputBus("Any bottom layer casing", 1) + .addOutputBus("Any bottom layer casing", 1) + .toolTipFinisher(); + return tt; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing, + int colorIndex, boolean aActive, boolean aRedstone) { + ITexture casingTexture = Textures.BlockIcons.getCasingTextureForId(getCasingIndex()); + if (side == facing) { + if (aActive) { + return new ITexture[] { casingTexture, + TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE), TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE_GLOW) + .glow() + .build() }; + } + return new ITexture[] { casingTexture, TextureFactory.of(Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE), + TextureFactory.builder() + .addIcon(Textures.BlockIcons.OVERLAY_FRONT_DIESEL_ENGINE_GLOW) + .glow() + .build() }; + } + return new ITexture[] { casingTexture }; + } + + public abstract float getBonusByTier(); + + public abstract int getCasingIndex(); + + @Override + public boolean isCorrectMachinePart(ItemStack aStack) { + if (aStack == null) return false; + if (!(aStack.getItem() instanceof MetaGeneratedTool01 tool)) return false; + if (aStack.getItemDamage() < 170 || aStack.getItemDamage() > 179) return false; + + IToolStats stats = tool.getToolStats(aStack); + if (stats == null || stats.getSpeedMultiplier() <= 0) return false; + + Materials material = MetaGeneratedTool.getPrimaryMaterial(aStack); + return material != null && material.mToolSpeed > 0; + } + + private float getTurbineDamage(ItemStack aStack) { + if (aStack == null || !(aStack.getItem() instanceof MetaGeneratedTool tool)) { + return -1; + } + return tool.getToolCombatDamage(aStack); + } + + @Override + protected IAlignmentLimits getInitialAlignmentLimits() { + // don't rotate it, it's cursed. + return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped(); + } + + public int getPollutionCleaningRatePerTick(float turbineEff, float multiEff, boolean isRateBoosted) { + return getPollutionCleaningRatePerSecond(turbineEff, multiEff, isRateBoosted) / 20; + } + + public int getPollutionCleaningRatePerSecond(float turbineEff, float multiEff, boolean isRateBoosted) { + long tVoltage = getMaxInputVoltage(); + byte tTier = (byte) max(1, GTUtility.getTier(tVoltage)); + int pollutionPerSecond = 0; + for (MTEHatchMuffler tHatch : filterValidMTEs(mMufflerHatches)) { + // applying scaling factor + pollutionPerSecond += (int) Math.pow(SCALING_FACTOR, min(tTier, tHatch.mTier)); + } + // apply the boost + if (isRateBoosted) { + pollutionPerSecond = (int) (pollutionPerSecond * BOOST_PER_FILTER); + } + // apply the rest of the coefs + pollutionPerSecond = (int) (pollutionPerSecond * turbineEff * multiEff * getBonusByTier() * GLOBAL_MULTIPLIER); + return pollutionPerSecond; + } + + @NotNull + @Override + public CheckRecipeResult checkProcessing() { + mEfficiencyIncrease = 10000; + mEfficiency = 10000 - (getIdealStatus() - getRepairStatus()) * 1000; + // check pollution for next cycle: + hasPollution = getTotalPollution() >= POLLUTION_THRESHOLD; + mMaxProgresstime = 200; + mEUt = (int) -getEUt(); + if (!hasPollution) { + return CheckRecipeResultRegistry.SUCCESSFUL; + } + + ItemStack aStack = getControllerSlot(); + if (!isCorrectMachinePart(aStack)) { + return CheckRecipeResultRegistry.NO_TURBINE_FOUND; + } + + float damage = getTurbineDamage(aStack); + if (damage == -1) { + return CheckRecipeResultRegistry.NO_TURBINE_FOUND; + } + baseEff = GTUtility.safeInt((long) ((50.0F + 10.0F * damage) * 100)); + tickCounter = 0; // resetting the counter in case of a power failure, etc + + // scan the inventory to search for filter if none has been loaded previously + if (!isFilterLoaded) { + ArrayList tInputList = getStoredInputs(); + int tInputList_sS = tInputList.size(); + for (int i = 0; i < tInputList_sS - 1; i++) { + for (int j = i + 1; j < tInputList_sS; j++) { + if (GTUtility.areStacksEqual(tInputList.get(i), tInputList.get(j))) { + if (tInputList.get(i).stackSize >= tInputList.get(j).stackSize) { + tInputList.remove(j--); + tInputList_sS = tInputList.size(); + } else { + tInputList.remove(i--); + tInputList_sS = tInputList.size(); + break; + } + } + } + } + + ItemStack[] tInputs = Arrays.copyOfRange(tInputList.toArray(new ItemStack[0]), 0, 2); + if (!tInputList.isEmpty()) { + ItemStack cleanFilter = getCleanFilter(); + for (ItemStack input : tInputs) { + if (GTUtility.areStacksEqual(input, cleanFilter, true)) { + input.stackSize -= 1; + updateSlots(); + filterUsageRemaining = USES_PER_FILTER; + isFilterLoaded = true; + break; + } + } + } + } + + // if a filter is loaded in + if (isFilterLoaded) { + + // consume one use of the filter + filterUsageRemaining -= 1; + + // when the filter finished its last usage, we give it back in dirty form. + if (filterUsageRemaining == 0) { + mOutputItems = new ItemStack[] { getDirtyFilter() }; + isFilterLoaded = false; + } else { + mOutputItems = null; // no return until the filter has been totally consumed + } + } + + return CheckRecipeResultRegistry.SUCCESSFUL; + } + + // Cache the lookup, but return clean copies of the stacks each time + private ItemStack cleanFilter, dirtyFilter; + + private ItemStack getCleanFilter() { + if (cleanFilter == null) { + if (Mods.NewHorizonsCoreMod.isModLoaded()) { + cleanFilter = GTModHandler.getModItem(Mods.NewHorizonsCoreMod.ID, "item.AdsorptionFilter", 1, 0); + } + if (cleanFilter == null) { + // fallback for dev environment + cleanFilter = new ItemStack(Blocks.stone); + } + } + return cleanFilter.copy(); + } + + private ItemStack getDirtyFilter() { + if (dirtyFilter == null) { + if (Mods.NewHorizonsCoreMod.isModLoaded()) { + dirtyFilter = GTModHandler.getModItem(Mods.NewHorizonsCoreMod.ID, "item.AdsorptionFilterDirty", 1, 0); + } + if (dirtyFilter == null) { + // fallback for dev environment + dirtyFilter = new ItemStack(Blocks.cobblestone); + } + } + return dirtyFilter.copy(); + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setInteger("mode", mode); // running mode + aNBT.setInteger("chunkIndex", chunkIndex); // chunk index when running in normal mode + aNBT.setInteger("size", size); // working area + aNBT.setBoolean("isFilterLoaded", isFilterLoaded); + aNBT.setInteger("filterUsageRemaining", filterUsageRemaining); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mode = aNBT.getInteger("mode"); + chunkIndex = aNBT.getInteger("chunkIndex"); + size = aNBT.getInteger("size"); + isFilterLoaded = aNBT.getBoolean("isFilterLoaded"); + filterUsageRemaining = aNBT.getInteger("filterUsageRemaining"); + } + + public void cleanPollution() { + int cleaningRate = getPollutionCleaningRatePerSecond(baseEff / 10000f, mEfficiency / 10000f, isFilterLoaded); + if (cleaningRate > 0) { + World world = this.getBaseMetaTileEntity() + .getWorld(); + if (mode == 0) { // processing chunk normally + removePollutionFromChunk(cleaningRate, world, chunkIndex); + chunkIndex += 1; + if (chunkIndex >= size * size) { + chunkIndex = 0; + } + } else { // process chunks randomly + // list all the polluted chunks + ArrayList pollutedChunks = new ArrayList<>(); + for (int index = 0; index < size * size; index++) { + if (getPollutionInChunk(world, index) > 0) { + pollutedChunks.add(index); + } + } + // pick the chunk randomly + if (!pollutedChunks.isEmpty()) { + int index = pollutedChunks.get(RANDOM.nextInt(pollutedChunks.size())); + removePollutionFromChunk(cleaningRate, world, index); + } + } + } + } + + protected final int getPollutionInChunk(World world, int chunkIndexIn) { + final int xCoordMulti = this.getBaseMetaTileEntity() + .getXCoord(); + final int zCoordMulti = this.getBaseMetaTileEntity() + .getZCoord(); + final int chunkX = xCoordMulti - 16 * (size / 2 - chunkIndexIn % size) >> 4; + final int chunkZ = zCoordMulti + 16 * (size / 2 - chunkIndexIn / size) >> 4; + return Pollution.getPollution(world, chunkX, chunkZ); + } + + protected final void removePollutionFromChunk(int amount, World world, int chunkIndexIn) { + final int xCoordMulti = this.getBaseMetaTileEntity() + .getXCoord(); + final int zCoordMulti = this.getBaseMetaTileEntity() + .getZCoord(); + final int chunkX = xCoordMulti - 16 * (size / 2 - chunkIndexIn % size) >> 4; + final int chunkZ = zCoordMulti + 16 * (size / 2 - chunkIndexIn / size) >> 4; + Pollution.addPollution(world, chunkX, chunkZ, -amount); + } + + public abstract int getPipeMeta(); + + public abstract int getCasingMeta(); + + @Override + public int getMaxEfficiency(ItemStack aStack) { + return 10000; + } + + @Override + public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (size == 0) { // here in case it's not set by NBT loading + size = 2 * multiTier + 1; + } + super.onPreTick(aBaseMetaTileEntity, aTick); + } + + public int getTotalPollution() { + int pollutionAmount = 0; + World world = this.getBaseMetaTileEntity() + .getWorld(); + for (int i = 0; i < size * size; i++) { + pollutionAmount += getPollutionInChunk(world, i); + + } + return pollutionAmount; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + if (aTick % 200L == 0L) { + // refresh casing on state change + int Xpos = aBaseMetaTileEntity.getXCoord() + aBaseMetaTileEntity.getBackFacing().offsetX; + int Ypos = aBaseMetaTileEntity.getYCoord() + 3; + int Zpos = aBaseMetaTileEntity.getZCoord() + aBaseMetaTileEntity.getBackFacing().offsetZ; + try { + aBaseMetaTileEntity.getWorld() + .markBlockRangeForRenderUpdate(Xpos - 1, Ypos, Zpos - 1, Xpos + 1, Ypos, Zpos + 1); + } catch (Exception ignored) {} + } + super.onPostTick(aBaseMetaTileEntity, aTick); + } + + @Override + public void onValueUpdate(byte aValue) { + mFormed = aValue == 1; + } + + @Override + public byte getUpdateData() { + return (byte) (mMachine ? 1 : 0); + } + + @Override + public boolean renderInWorld(IBlockAccess aWorld, int aX, int aY, int aZ, Block aBlock, RenderBlocks aRenderer) { + if (!mFormed) return false; + int[] xyz = new int[3]; + ExtendedFacing ext = getExtendedFacing(); + ext.getWorldOffset(new int[] { 0, -3, 1 }, xyz); + IIconContainer[] tTextures = getBaseMetaTileEntity().isActive() ? TURBINE_NEW_ACTIVE : TURBINE_NEW; + // we know this multi can only ever face upwards, so just use +y directly + ExtendedFacing direction = ExtendedFacing.of(ForgeDirection.UP); + GTUtilityClient.renderTurbineOverlay( + aWorld, + xyz[0] + aX, + xyz[1] + aY, + xyz[2] + aZ, + aRenderer, + direction, + GregTechAPI.sBlockCasingsNH, + tTextures); + return false; + } + + @Override + public boolean onRunningTick(ItemStack aStack) { + if (tickCounter == 19 && hasPollution) { + cleanPollution(); + tickCounter = 0; + } else { + tickCounter += 1; + } + return super.onRunningTick(aStack); + } + + @Override + public int getDamageToComponent(ItemStack aStack) { + try { + if (isCorrectMachinePart(aStack) && hasPollution) { // no pollution no damage + return getBaseMetaTileEntity().getRandomNumber(2); // expected to be 0.5 damage in long term + } + } catch (Exception e) { + /**/ + } + return 0; + } + + @Override + public boolean explodesOnComponentBreak(ItemStack aStack) { + return false; + } + + @Override + public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (!aPlayer.isSneaking()) { // change mode + mode = mode == 1 ? 0 : 1; + if (mode == 0) { + chunkIndex = 0; + aPlayer.addChatMessage(new ChatComponentText("Electric air filter now running in normal mode")); + } else { + aPlayer.addChatMessage(new ChatComponentText("Electric air filter now running in random mode")); + } + } else { // change radius on sneak + if (size == 1) { + size = 2 * multiTier + 1; + } else { + size -= 2; // always get odd number + } + chunkIndex = 0; + aPlayer.addChatMessage( + new ChatComponentText("Electric air filter is now working in a " + size + "x" + size + " area")); + } + } + + @Override + public String[] getInfoData() { + return new String[] { "Progress:", + EnumChatFormatting.GREEN + Integer.toString(mProgresstime / 20) + + EnumChatFormatting.RESET + + " s / " + + EnumChatFormatting.YELLOW + + mMaxProgresstime / 20 + + EnumChatFormatting.RESET + + " s", + "Stored Energy:", + EnumChatFormatting.GREEN + Long.toString(getBaseMetaTileEntity().getStoredEU()) + + EnumChatFormatting.RESET + + " EU / " + + EnumChatFormatting.YELLOW + + getBaseMetaTileEntity().getEUCapacity() + + EnumChatFormatting.RESET + + " EU", + "Probably uses: " + + // negative EU triggers special EU consumption behavior. however it does not produce power. + EnumChatFormatting.RED + Math.abs(mEUt) + EnumChatFormatting.RESET + " EU/t", + "Max Energy Income: " + EnumChatFormatting.YELLOW + + getMaxInputVoltage() + + EnumChatFormatting.RESET + + " EU/t(*2A) Tier: " + + EnumChatFormatting.YELLOW + + VN[GTUtility.getTier(getMaxInputVoltage())] + + EnumChatFormatting.RESET, + "Problems: " + EnumChatFormatting.RED + + (getIdealStatus() - getRepairStatus()) + + EnumChatFormatting.RESET + + " Efficiency: " + + EnumChatFormatting.YELLOW + + mEfficiency / 100.0F + + EnumChatFormatting.RESET + + " %", + "Pollution reduction: " + EnumChatFormatting.GREEN + + getPollutionCleaningRatePerTick(baseEff / 10000f, mEfficiency / 10000f, isFilterLoaded) + + EnumChatFormatting.RESET + + " gibbl/t", + "Has a filter in it: " + isFilterLoaded, + "remaining cycles for the filter (if present): " + filterUsageRemaining }; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEAssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAssemblyLine.java index 6fa17fdd759..99b63d40898 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEAssemblyLine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEAssemblyLine.java @@ -61,6 +61,7 @@ import gregtech.api.util.IGTHatchAdder; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.OverclockCalculator; +import gregtech.api.util.ParallelHelper; import gregtech.api.util.VoidProtectionHelper; public class MTEAssemblyLine extends MTEExtendedPowerMultiBlockBase implements ISurvivalConstructable { @@ -358,8 +359,9 @@ public CheckRecipeResult checkProcessing() { GT_FML_LOGGER.info("Find available recipe"); } result = CheckRecipeResultRegistry.SUCCESSFUL; - mOutputItems = new ItemStack[] { tRecipe.mOutput.copy() }; - mOutputItems[0].stackSize *= maxParallelBeforeBatchMode * batchMultiplierMax; + ArrayList outputs = new ArrayList<>(); + ParallelHelper.addItemsLong(outputs, tRecipe.mOutput, (long) tRecipe.mOutput.stackSize * maxParallel); + mOutputItems = outputs.toArray(new ItemStack[0]); break; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEDistillationTower.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEDistillationTower.java index d695e8b9efe..e736415be48 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEDistillationTower.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEDistillationTower.java @@ -21,7 +21,9 @@ import java.util.ArrayList; import java.util.List; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; @@ -46,6 +48,7 @@ import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.render.TextureFactory; +import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.common.tileentities.machines.MTEHatchOutputME; @@ -355,4 +358,21 @@ protected SoundResource getProcessStartSound() { public boolean supportsVoidProtection() { return true; } + + @Override + public boolean supportsBatchMode() { + return true; + } + + @Override + public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, + float aX, float aY, float aZ, ItemStack aTool) { + batchMode = !batchMode; + if (batchMode) { + GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); + } else { + GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff")); + } + return true; + } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEDrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEDrillerBase.java index a729edeaeff..54575725d56 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEDrillerBase.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEDrillerBase.java @@ -261,7 +261,7 @@ public void loadNBTData(NBTTagCompound aNBT) { @Override public boolean onSolderingToolRightClick(ForgeDirection side, ForgeDirection wrenchingSide, - EntityPlayer entityPlayer, float aX, float aY, float aZ) { + EntityPlayer entityPlayer, float aX, float aY, float aZ, ItemStack aTool) { if (side == getBaseMetaTileEntity().getFrontFacing()) { mChunkLoadingEnabled = !mChunkLoadingEnabled; GTUtility.sendChatToPlayer( @@ -270,7 +270,7 @@ public boolean onSolderingToolRightClick(ForgeDirection side, ForgeDirection wre : GTUtility.trans("503", "Mining chunk loading disabled")); return true; } - return super.onSolderingToolRightClick(side, wrenchingSide, entityPlayer, aX, aY, aZ); + return super.onSolderingToolRightClick(side, wrenchingSide, entityPlayer, aX, aY, aZ, aTool); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEElectricBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEElectricBlastFurnace.java index ffe7efa0ba5..f69008c97d5 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEElectricBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEElectricBlastFurnace.java @@ -16,15 +16,9 @@ import static gregtech.api.enums.Textures.BlockIcons.casingTexturePages; import static gregtech.api.util.GTStructureUtility.buildHatchAdder; import static gregtech.api.util.GTStructureUtility.ofCoil; -import static gregtech.api.util.GTUtility.filterValidMTEs; import static gregtech.api.util.GTUtility.validMTEList; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - import javax.annotation.Nonnull; -import javax.annotation.Nullable; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -32,7 +26,6 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; -import net.minecraftforge.fluids.FluidStack; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -44,16 +37,12 @@ import gregtech.GTMod; import gregtech.api.GregTechAPI; import gregtech.api.enums.HeatingCoilLevel; -import gregtech.api.enums.Materials; import gregtech.api.enums.SoundResource; import gregtech.api.interfaces.ITexture; -import gregtech.api.interfaces.fluid.IFluidStore; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.logic.ProcessingLogic; -import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.metatileentity.implementations.MTEHatchEnergy; -import gregtech.api.metatileentity.implementations.MTEHatchOutput; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.check.CheckRecipeResult; @@ -68,9 +57,6 @@ public class MTEElectricBlastFurnace extends MTEAbstractMultiFurnace mPollutionOutputHatches = new ArrayList<>(); - protected final FluidStack[] pollutionFluidStacks = { Materials.CarbonDioxide.getGas(1000), - Materials.CarbonMonoxide.getGas(1000), Materials.SulfurDioxide.getGas(1000) }; protected static final int CASING_INDEX = 11; protected static final String STRUCTURE_PIECE_MAIN = "main"; @@ -79,16 +65,13 @@ public class MTEElectricBlastFurnace extends MTEAbstractMultiFurnace t.mPollutionOutputHatches.size())) + 'f', + buildHatchAdder(MTEElectricBlastFurnace.class).atLeast(OutputHatch) .casingIndex(CASING_INDEX) - .dot(1) + .dot(3) .buildAndChain(GregTechAPI.sBlockCasings1, CASING_INDEX)) .addElement('m', Muffler.newAny(CASING_INDEX, 2)) .addElement('C', ofCoil(MTEElectricBlastFurnace::setCoilLevel, MTEElectricBlastFurnace::getCoilLevel)) @@ -128,15 +111,13 @@ protected MultiblockTooltipBuilder createTooltip() { .addController("Front bottom") .addCasingInfoRange("Heat Proof Machine Casing", 0, 15, false) .addOtherStructurePart("Heating Coils", "Two middle Layers") - .addEnergyHatch("Any bottom layer casing", 3) - .addMaintenanceHatch("Any bottom layer casing", 3) + .addEnergyHatch("Any bottom layer casing", 1) + .addMaintenanceHatch("Any bottom layer casing", 1) .addMufflerHatch("Top middle", 2) - .addInputBus("Any bottom layer casing", 3) - .addInputHatch("Any bottom layer casing", 3) - .addOutputBus("Any bottom layer casing", 3) - .addOutputHatch("Fluid outputs, Any bottom layer casing") - .addOutputHatch("Pollution gases (CO2/CO/SO2), Any top layer casing", 1) - .addStructureInfo("Pollution gas output amount scales with Muffler Hatch tier") + .addInputBus("Any bottom layer casing", 1) + .addInputHatch("Any bottom layer casing", 1) + .addOutputBus("Any bottom layer casing", 1) + .addOutputHatch("Any Heat Proof Machine Casing", 3) .toolTipFinisher(); return tt; } @@ -177,11 +158,6 @@ public RecipeMap getRecipeMap() { return RecipeMaps.blastFurnaceRecipes; } - @Override - public boolean isCorrectMachinePart(ItemStack aStack) { - return true; - } - @Override public IStructureDefinition getStructureDefinition() { return STRUCTURE_DEFINITION; @@ -208,25 +184,12 @@ protected OverclockCalculator createOverclockCalculator(@Nonnull GTRecipe recipe }; } - public boolean addOutputHatchToTopList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { - if (aTileEntity == null) return false; - IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) return false; - if (aMetaTileEntity instanceof MTEHatchOutput) { - ((MTEHatch) aMetaTileEntity).updateTexture(aBaseCasingIndex); - return mPollutionOutputHatches.add((MTEHatchOutput) aMetaTileEntity); - } - return false; - } - @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { this.mHeatingCapacity = 0; setCoilLevel(HeatingCoilLevel.None); - mPollutionOutputHatches.clear(); - if (!checkPiece(STRUCTURE_PIECE_MAIN, 1, 3, 0)) return false; if (getCoilLevel() == HeatingCoilLevel.None) return false; @@ -237,42 +200,6 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a return true; } - @Override - public boolean addOutput(FluidStack aLiquid) { - if (aLiquid == null) return false; - FluidStack tLiquid = aLiquid.copy(); - ArrayList tOutputHatches; - if (isPollutionFluid(tLiquid)) { - tOutputHatches = this.mPollutionOutputHatches; - multiplyPollutionFluidAmount(tLiquid); - } else { - tOutputHatches = this.mOutputHatches; - } - return dumpFluid(tOutputHatches, tLiquid, true) || dumpFluid(tOutputHatches, tLiquid, false); - } - - protected boolean isPollutionFluid(@Nullable FluidStack fluidStack) { - if (fluidStack == null) return false; - for (FluidStack pollutionFluidStack : pollutionFluidStacks) { - if (!fluidStack.isFluidEqual(pollutionFluidStack)) continue; - return true; - } - return false; - } - - @Override - public List getFluidOutputSlots(FluidStack[] toOutput) { - if (Arrays.stream(toOutput) - .anyMatch(this::isPollutionFluid)) { - return filterValidMTEs(mPollutionOutputHatches); - } - return filterValidMTEs(mOutputHatches); - } - - protected void multiplyPollutionFluidAmount(@Nonnull FluidStack fluid) { - fluid.amount = fluid.amount * Math.min(100 - getAveragePollutionPercentage(), 100) / 100; - } - @Override public String[] getInfoData() { long storedEnergy = 0; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEImplosionCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEImplosionCompressor.java index 6a264133c03..5a0155b12fe 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEImplosionCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEImplosionCompressor.java @@ -14,7 +14,9 @@ import java.util.List; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import com.google.common.collect.ImmutableList; @@ -34,6 +36,7 @@ import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; import gregtech.api.render.TextureFactory; +import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; public class MTEImplosionCompressor extends MTECubicMultiBlockBase { @@ -171,4 +174,21 @@ public boolean explodesOnComponentBreak(ItemStack aStack) { public boolean supportsVoidProtection() { return true; } + + @Override + public boolean supportsBatchMode() { + return true; + } + + @Override + public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, + float aX, float aY, float aZ, ItemStack aTool) { + batchMode = !batchMode; + if (batchMode) { + GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); + } else { + GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff")); + } + return true; + } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEIndustrialElectromagneticSeparator.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEIndustrialElectromagneticSeparator.java index 8d9b265190e..b2954f15e05 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEIndustrialElectromagneticSeparator.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEIndustrialElectromagneticSeparator.java @@ -456,7 +456,7 @@ private boolean addMagHatch(IGregTechTileEntity aTileEntity, int aBaseCasingInde @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { batchMode = !batchMode; if (batchMode) { GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEIntegratedOreFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEIntegratedOreFactory.java index 40a960fb7dd..5fdc88cf88c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEIntegratedOreFactory.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEIntegratedOreFactory.java @@ -197,12 +197,12 @@ protected MultiblockTooltipBuilder createTooltip() { .addPollutionAmount(getPollutionPerSecond(null)) .beginStructureBlock(6, 12, 11, false) .addController("The third layer") - .addStructureInfo("128 Advanced Iridium Plated Machine Casing") - .addStructureInfo("105 Clean Stainless Steel Machine Casing") - .addStructureInfo("48 Reinforced Glass") - .addStructureInfo("30 Tungstensteel Pipe Casing") - .addStructureInfo("16 Tungstensteel Frame Box") - .addStructureInfo("16 Steel Gear Box Casing") + .addCasingInfoExactly("Advanced Iridium Plated Machine Casing", 128, false) + .addCasingInfoExactly("Clean Stainless Steel Machine Casing", 105, false) + .addCasingInfoExactly("Reinforced Glass", 48, false) + .addCasingInfoExactly("Tungstensteel Pipe Casing", 30, false) + .addCasingInfoExactly("Tungstensteel Frame Box", 16, false) + .addCasingInfoExactly("Steel Gear Box Casing", 16, false) .addEnergyHatch("Any bottom Casing", 1) .addMaintenanceHatch("Any bottom Casing", 1) .addInputBus("Input ore/crushed ore", 2) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeChemicalReactor.java index 1d4026aff66..544900066ae 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeChemicalReactor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeChemicalReactor.java @@ -304,7 +304,7 @@ public boolean supportsBatchMode() { @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { batchMode = !batchMode; if (batchMode) { GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeFluidExtractor.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeFluidExtractor.java index 14452c623f4..d0f807c173f 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeFluidExtractor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTELargeFluidExtractor.java @@ -422,7 +422,7 @@ public float getEUMultiplier() { @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { batchMode = !batchMode; if (batchMode) { GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java index ca79297c513..ea42aea04a0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEMultiLathe.java @@ -15,8 +15,6 @@ import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_MULTI_LATHE_GLOW; import static gregtech.api.util.GTStructureUtility.buildHatchAdder; import static gregtech.api.util.GTStructureUtility.chainAllGlasses; -import static net.minecraft.util.EnumChatFormatting.BLUE; -import static net.minecraft.util.EnumChatFormatting.DARK_AQUA; import java.text.DecimalFormat; import java.util.List; @@ -33,7 +31,6 @@ import net.minecraftforge.common.util.ForgeDirection; import org.apache.commons.lang3.tuple.Pair; -import org.jetbrains.annotations.NotNull; import com.google.common.collect.ImmutableList; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; @@ -54,7 +51,6 @@ import gregtech.api.metatileentity.implementations.MTEExtendedPowerMultiBlockBase; import gregtech.api.recipe.RecipeMap; import gregtech.api.recipe.RecipeMaps; -import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; @@ -78,40 +74,6 @@ public MTEMultiLathe(String aName) { protected int pipeTier = 0; - public enum PipeTiers { - - Tin(1, 0.75F), - Brass(1, 0.8F), - Electrum(2, 0.9F), - Platinum(4, 1F), - Osmium(8, 1.5F), - Quantium(12, 2F), - FluxedElectrum(16, 3F), - BlackPlutonium(32, 4F); - - final int maxParallel; - final float speedBoost; - - PipeTiers(int maxParallel, float speedBoost) { - this.maxParallel = maxParallel; - this.speedBoost = speedBoost; - } - } - - private PipeTiers getPipeData() { - pipeTier = getPipeTier(); - return switch (pipeTier) { - case 2 -> PipeTiers.Brass; - case 3 -> PipeTiers.Electrum; - case 4 -> PipeTiers.Platinum; - case 5 -> PipeTiers.Osmium; - case 6 -> PipeTiers.Quantium; - case 7 -> PipeTiers.FluxedElectrum; - case 8 -> PipeTiers.BlackPlutonium; - default -> PipeTiers.Tin; - }; - } - // get tier from block meta private static Integer getTierFromMeta(Block block, Integer metaID) { if (block != GregTechAPI.sBlockCasings11) return -1; @@ -228,16 +190,9 @@ public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirect protected MultiblockTooltipBuilder createTooltip() { MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder(); tt.addMachineType("Lathe") - .addInfo(BLUE + "Allows more parallel recipes based on item pipe casing parallel and voltage.") - .addInfo("Max Parallel Recipes = Item Pipe Casing Parallel + (Voltage Tier * 2).") - .addInfo(BLUE + "Increases processing speed based on item pipe casing speed and voltage.") - .addInfo("Time Reduction = 1 / (Item Pipe Casing Speed Boost + Voltage Tier / 4).") - .addInfo("Speed Increase = (100 / Time Reduction).") - .addInfo( - DARK_AQUA - + "For example, using Black Plutonium item pipe casings (boost of 4) and Tier 3 voltage (HV) ") - .addInfo(DARK_AQUA + "reduces processing time to 57% of the recipe time, making the machine 175% faster.") - .addInfo(BLUE + "Only uses 80% of the EU/T normally required.") + .addInfo("300% faster than using single block machines of the same voltage") + .addInfo("Gains 8 parallel per Pipe Casing Tier") + .addInfo("Only uses 80% of the EU/t normally required.") .beginStructureBlock(7, 5, 5, true) .addController("Front Center") .addCasingInfoMin("Solid Steel Machine Casing", 42, false) @@ -293,36 +248,24 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a return this.mMaintenanceHatches.size() == 1 && pipeTier > 0 && !mEnergyHatches.isEmpty() && mCasingAmount >= 42; } - public float speedBoost(float speedBoost, byte voltageTier) { - return 1F / ((speedBoost + voltageTier) / 4F); - } - @Override protected ProcessingLogic createProcessingLogic() { - return new ProcessingLogic() { - - @NotNull - @Override - public CheckRecipeResult process() { - speedBoost = (speedBoost(getPipeData().speedBoost, GTUtility.getTier(getMaxInputVoltage()))); - return super.process(); - } - }.setEuModifier(0.8F) + return new ProcessingLogic().setSpeedBonus(1F / 4F) + .setEuModifier(0.8F) .setMaxParallelSupplier(this::getMaxParallelRecipes); } public int getMaxParallelRecipes() { - return getPipeData().maxParallel + (GTUtility.getTier(this.getMaxInputVoltage()) * 2); + return (getPipeTier() * 8); } @Override public void getWailaNBTData(EntityPlayerMP player, TileEntity tile, NBTTagCompound tag, World world, int x, int y, int z) { super.getWailaNBTData(player, tile, tag, world, x, y, z); - tag.setInteger("itemPipeTier", Math.max(0, pipeTier)); - tag.setFloat("speedBonus", getPipeData().speedBoost); + tag.setInteger("itemPipeTier", Math.max(0, getPipeTier())); + tag.setFloat("speedBonus", 400); tag.setFloat("getMaxParallelRecipes", Math.max(0, getMaxParallelRecipes())); - tag.setByte("voltageTier", GTUtility.getTier(this.getMaxInputVoltage())); } private static final DecimalFormat dfNone = new DecimalFormat("#"); @@ -343,7 +286,7 @@ public void getWailaBody(ItemStack itemStack, List currenttip, IWailaDat currenttip.add( StatCollector.translateToLocal("GT5U.multiblock.speed") + ": " + EnumChatFormatting.WHITE - + dfNone.format(Math.max(0, 100 / speedBoost(tag.getFloat("speedBonus"), tag.getByte("voltageTier")))) + + dfNone.format((Math.max(0, tag.getInteger("speedBonus")))) + "%"); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEOilCracker.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEOilCracker.java index 32651313a31..885d9e90fe0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEOilCracker.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEOilCracker.java @@ -304,7 +304,7 @@ private void replaceDeprecatedCoils(IGregTechTileEntity aBaseMetaTileEntity) { for (int yPos = tY - 1; yPos <= tY + 1; yPos++) for (int zPos = tZ - 1; zPos <= tZ + 1; zPos += (xDir != 0 ? 2 : 1)) { if ((yPos == tY) && (xPos == tX || zPos == tZ)) continue; - final byte tUsedMeta = aBaseMetaTileEntity.getMetaID(xPos, yPos, zPos); + final int tUsedMeta = aBaseMetaTileEntity.getMetaID(xPos, yPos, zPos); if (tUsedMeta < 12) continue; if (tUsedMeta > 14) continue; if (aBaseMetaTileEntity.getBlock(xPos, yPos, zPos) != GregTechAPI.sBlockCasings1) continue; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEPyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEPyrolyseOven.java index 0c2c17d8aed..59eba0910da 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEPyrolyseOven.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEPyrolyseOven.java @@ -1,7 +1,6 @@ package gregtech.common.tileentities.machines.multi; import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock; -import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlockUnlocalizedName; import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass; import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose; import static gregtech.api.enums.HatchElement.Energy; @@ -11,7 +10,6 @@ import static gregtech.api.enums.HatchElement.Muffler; import static gregtech.api.enums.HatchElement.OutputBus; import static gregtech.api.enums.HatchElement.OutputHatch; -import static gregtech.api.enums.Mods.NewHorizonsCoreMod; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE; import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE_GLOW; @@ -19,21 +17,21 @@ import static gregtech.api.util.GTStructureUtility.buildHatchAdder; import static gregtech.api.util.GTStructureUtility.ofCoil; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; import net.minecraftforge.common.util.ForgeDirection; import org.jetbrains.annotations.NotNull; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; -import com.gtnewhorizon.structurelib.structure.IStructureElement; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; import com.gtnewhorizon.structurelib.structure.StructureDefinition; import gregtech.GTMod; import gregtech.api.GregTechAPI; import gregtech.api.enums.HeatingCoilLevel; -import gregtech.api.enums.Textures; import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -44,43 +42,36 @@ import gregtech.api.recipe.RecipeMaps; import gregtech.api.recipe.check.CheckRecipeResult; import gregtech.api.render.TextureFactory; +import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; public class MTEPyrolyseOven extends MTEEnhancedMultiBlockBase implements ISurvivalConstructable { private HeatingCoilLevel coilHeat; private static final int CASING_INDEX = 1090; - private static final IStructureDefinition STRUCTURE_DEFINITION = createStructureDefinition(); - - private static IStructureDefinition createStructureDefinition() { - IStructureElement tCasingElement = NewHorizonsCoreMod.isModLoaded() - ? ofBlockUnlocalizedName(NewHorizonsCoreMod.ID, "gt.blockcasingsNH", 2) - : ofBlock(GregTechAPI.sBlockCasings1, 0); - - return StructureDefinition.builder() - .addShape( - "main", - transpose( - new String[][] { { "ccccc", "ctttc", "ctttc", "ctttc", "ccccc" }, - { "ccccc", "c---c", "c---c", "c---c", "ccccc" }, - { "ccccc", "c---c", "c---c", "c---c", "ccccc" }, - { "bb~bb", "bCCCb", "bCCCb", "bCCCb", "bbbbb" }, })) - .addElement('c', onElementPass(MTEPyrolyseOven::onCasingAdded, tCasingElement)) - .addElement('C', ofCoil(MTEPyrolyseOven::setCoilLevel, MTEPyrolyseOven::getCoilLevel)) - .addElement( - 'b', - buildHatchAdder(MTEPyrolyseOven.class).atLeast(OutputBus, OutputHatch, Energy, Maintenance) - .casingIndex(CASING_INDEX) - .dot(1) - .buildAndChain(onElementPass(MTEPyrolyseOven::onCasingAdded, tCasingElement))) - .addElement( - 't', - buildHatchAdder(MTEPyrolyseOven.class).atLeast(InputBus, InputHatch, Muffler) - .casingIndex(CASING_INDEX) - .dot(1) - .buildAndChain(onElementPass(MTEPyrolyseOven::onCasingAdded, tCasingElement))) - .build(); - } + private static final IStructureDefinition STRUCTURE_DEFINITION = StructureDefinition + .builder() + .addShape( + "main", + transpose( + new String[][] { { "ccccc", "ctttc", "ctttc", "ctttc", "ccccc" }, + { "ccccc", "c---c", "c---c", "c---c", "ccccc" }, { "ccccc", "c---c", "c---c", "c---c", "ccccc" }, + { "bb~bb", "bCCCb", "bCCCb", "bCCCb", "bbbbb" }, })) + .addElement('c', onElementPass(MTEPyrolyseOven::onCasingAdded, ofBlock(GregTechAPI.sBlockCasingsNH, 2))) + .addElement('C', ofCoil(MTEPyrolyseOven::setCoilLevel, MTEPyrolyseOven::getCoilLevel)) + .addElement( + 'b', + buildHatchAdder(MTEPyrolyseOven.class).atLeast(OutputBus, OutputHatch, Energy, Maintenance) + .casingIndex(CASING_INDEX) + .dot(1) + .buildAndChain(onElementPass(MTEPyrolyseOven::onCasingAdded, ofBlock(GregTechAPI.sBlockCasingsNH, 2)))) + .addElement( + 't', + buildHatchAdder(MTEPyrolyseOven.class).atLeast(InputBus, InputHatch, Muffler) + .casingIndex(CASING_INDEX) + .dot(1) + .buildAndChain(onElementPass(MTEPyrolyseOven::onCasingAdded, ofBlock(GregTechAPI.sBlockCasingsNH, 2)))) + .build(); private int mCasingAmount; @@ -120,7 +111,7 @@ protected MultiblockTooltipBuilder createTooltip() { public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirection sideDirection, ForgeDirection facingDirection, int colorIndex, boolean active, boolean redstoneLevel) { if (sideDirection == facingDirection) { - if (active) return new ITexture[] { BlockIcons.casingTexturePages[0][0], TextureFactory.builder() + if (active) return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX), TextureFactory.builder() .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE) .extFacing() .build(), @@ -129,7 +120,7 @@ public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirect .extFacing() .glow() .build() }; - return new ITexture[] { BlockIcons.casingTexturePages[0][0], TextureFactory.builder() + return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX), TextureFactory.builder() .addIcon(OVERLAY_FRONT_PYROLYSE_OVEN) .extFacing() .build(), @@ -139,7 +130,7 @@ public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirect .glow() .build() }; } - return new ITexture[] { Textures.BlockIcons.casingTexturePages[0][0] }; + return new ITexture[] { BlockIcons.getCasingTextureForId(CASING_INDEX) }; } @Override @@ -254,4 +245,26 @@ public int survivalConstruct(ItemStack stackSize, int elementBudget, ISurvivalBu public boolean supportsVoidProtection() { return true; } + + @Override + public boolean supportsBatchMode() { + return true; + } + + @Override + public boolean supportsInputSeparation() { + return true; + } + + @Override + public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, + float aX, float aY, float aZ, ItemStack aTool) { + batchMode = !batchMode; + if (batchMode) { + GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); + } else { + GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOff")); + } + return true; + } } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEResearchCompleter.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEResearchCompleter.java index 65e65c664ab..4b69a930099 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEResearchCompleter.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEResearchCompleter.java @@ -11,6 +11,8 @@ import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.util.ForgeDirection; +import org.jetbrains.annotations.NotNull; + import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.StructureDefinition; @@ -23,6 +25,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase; import gregtech.api.net.GTPacketNodeInfo; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; @@ -169,8 +173,7 @@ public boolean onRunningTick(ItemStack aStack) { TileEntity tileEntity = aBaseMetaTileEntity.getWorld() .getTileEntity(nodeX, nodeY, nodeZ); - if (tileEntity instanceof TileNode) { - TileNode aNode = (TileNode) tileEntity; + if (tileEntity instanceof TileNode aNode) { AspectList aspectsBase = aNode.getAspectsBase(); for (Aspect aspect : aspectsBase.getAspects()) { @@ -227,7 +230,7 @@ public boolean isCorrectMachinePart(ItemStack itemStack) { } @Override - public boolean checkRecipe(ItemStack itemStack) { + public @NotNull CheckRecipeResult checkProcessing() { ArrayList tInputList = this.getStoredInputs(); for (ItemStack stack : tInputList) { @@ -248,7 +251,7 @@ public boolean checkRecipe(ItemStack itemStack) { this.getMaxInputVoltage(), false); if (this.mMaxProgresstime == 2147483646 && this.mEUt == 2147483646) { - return false; + return CheckRecipeResultRegistry.NO_RECIPE; } if (this.mEUt > 0) { this.mEUt = -this.mEUt; @@ -267,12 +270,12 @@ public boolean checkRecipe(ItemStack itemStack) { this.sendLoopStart((byte) 20); this.updateSlots(); - return true; + return CheckRecipeResultRegistry.SUCCESSFUL; } } } - return false; + return CheckRecipeResultRegistry.NO_RECIPE; } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTETranscendentPlasmaMixer.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTETranscendentPlasmaMixer.java index daaf772ae54..52186e1d7d3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTETranscendentPlasmaMixer.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTETranscendentPlasmaMixer.java @@ -20,8 +20,6 @@ import static gregtech.common.tileentities.machines.multi.MTEPlasmaForge.DIM_INJECTION_CASING; import static gregtech.common.tileentities.machines.multi.MTEPlasmaForge.DIM_TRANS_CASING; import static kekztech.util.Util.toStandardForm; -import static net.minecraft.util.EnumChatFormatting.GOLD; -import static net.minecraft.util.EnumChatFormatting.GRAY; import static net.minecraft.util.StatCollector.translateToLocal; import java.math.BigInteger; @@ -123,9 +121,19 @@ protected MultiblockTooltipBuilder createTooltip() { .addInfo("in the parallel menu. All inputs will scale, except time.") .addInfo("All EU is deducted from wireless EU networks only.") .beginStructureBlock(5, 7, 5, false) - .addStructureInfo(GOLD + "1+ " + GRAY + "Input Hatch") - .addStructureInfo(GOLD + "1+ " + GRAY + "Output Hatch") - .addStructureInfo(GOLD + "1+ " + GRAY + "Input Bus") + .addController("Front Center") + .addCasingInfoExactly("Dimensionally Transcendent Casing", 48, false) + .addCasingInfoExactly("Dimensional Bridge", 16, false) + .addCasingInfoRangeColored( + "Dimensional Injection Casing", + EnumChatFormatting.GRAY, + 0, + 33, + EnumChatFormatting.GOLD, + false) + .addInputBus("Any Dimensional Injection Casing", 1) + .addInputHatch("Any Dimensional Injection Casing", 1) + .addOutputHatch("Any Dimensional Injection Casing", 1) .toolTipFinisher(AuthorColen); return tt; } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/MTEWormholeGenerator.java b/src/main/java/gregtech/common/tileentities/machines/multi/MTEWormholeGenerator.java index 022dd14d2d0..7b20dc9f77c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/MTEWormholeGenerator.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/MTEWormholeGenerator.java @@ -1001,6 +1001,7 @@ protected MultiblockTooltipBuilder createTooltip() { .addInfo("Right click the controller with a screwdriver to disable overclocking.") .addTecTechHatchInfo() .beginStructureBlock(7, 9, 7, false) + .addController("Front center") .addCasingInfoExactly("Molecular Casing", 2 * 12, false) .addCasingInfoExactly("Europium Reinforced Radiation Proof Machine Casing", 4, false) .addCasingInfoExactly("Fusion Coil Block", 3 * 4 + 5 * 2, false) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEHIPCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEHIPCompressor.java index c1f3cef93eb..0c716e975a3 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEHIPCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEHIPCompressor.java @@ -268,7 +268,7 @@ protected MultiblockTooltipBuilder createTooltip() { + "1" + EnumChatFormatting.GRAY + " parallels per voltage tier") - .beginStructureBlock(7, 5, 7, true) + .beginStructureBlock(15, 8, 7, false) .addController("Front Center") .addCasingInfoMin("Electric Compressor Casing", 95, false) .addCasingInfoMin("Compressor Pipe Casing", 60, false) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEIndustrialCompressor.java b/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEIndustrialCompressor.java index e8bfb2761c6..bd8fc806cbc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEIndustrialCompressor.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/compressor/MTEIndustrialCompressor.java @@ -146,7 +146,7 @@ protected MultiblockTooltipBuilder createTooltip() { .addInfo("100% faster than singleblock machines of the same voltage") .addInfo("Only uses 90% of the EU/t normally required") .addInfo("Gains 2 parallels per voltage tier") - .beginStructureBlock(7, 5, 7, true) + .beginStructureBlock(7, 8, 7, true) .addController("Front Center") .addCasingInfoMin("Electric Compressor Casing", 95, false) .addCasingInfoMin("Compressor Pipe Casing", 45, false) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationPlant.java b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationPlant.java index b5385ff5a10..c271f4a8d88 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationPlant.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationPlant.java @@ -241,6 +241,7 @@ protected MultiblockTooltipBuilder createTooltip() { + EnumChatFormatting.ITALIC + "purification processes, and this multiblock is the heart of the operation.") .beginStructureBlock(7, 9, 8, false) + .addController("Front center") .addCasingInfoExactlyColored( "Superplasticizer-Treated High Strength Concrete", EnumChatFormatting.GRAY, @@ -272,7 +273,6 @@ protected MultiblockTooltipBuilder createTooltip() { 6, EnumChatFormatting.GOLD, false) - .addController("Front center") .addEnergyHatch(EnumChatFormatting.GOLD + "1", 1) .addMaintenanceHatch(EnumChatFormatting.GOLD + "1", 1) .addStructureInfo("Requires water to be placed in the tank.") diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitBaryonicPerfection.java b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitBaryonicPerfection.java index b510b4a3414..d6a3621d33e 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitBaryonicPerfection.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitBaryonicPerfection.java @@ -354,6 +354,7 @@ protected MultiblockTooltipBuilder createTooltip() { + EnumChatFormatting.ITALIC + "This ultimately creates both Stabilised Baryonic Matter and, most importantly, absolutely perfectly purified water.") .beginStructureBlock(17, 17, 17, false) + .addController("Front center") .addCasingInfoMinColored( "Quark Exclusion Casing", EnumChatFormatting.GRAY, @@ -384,7 +385,6 @@ protected MultiblockTooltipBuilder createTooltip() { 108, EnumChatFormatting.GOLD, false) - .addController("Front Center") .addInputBus("Any Quark Exclusion Casing. Stocking bus is blacklisted.", 1) .addInputHatch("Any Quark Exclusion Casing", 1) .addOutputBus("Any Quark Exclusion Casing", 1) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitClarifier.java b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitClarifier.java index bfb3f497fd5..2a237ad1652 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitClarifier.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitClarifier.java @@ -206,6 +206,7 @@ protected MultiblockTooltipBuilder createTooltip() { + EnumChatFormatting.ITALIC + "decreases so continual replacements must be supplied to maintain full function of the Clarifier.") .beginStructureBlock(11, 4, 11, false) + .addController("Front center") .addCasingInfoRangeColored( "Reinforced Sterile Water Plant Casing", EnumChatFormatting.GRAY, @@ -232,7 +233,6 @@ protected MultiblockTooltipBuilder createTooltip() { EnumChatFormatting.GOLD, false) .addCasingInfoExactlyColored("PTFE Pipe Casing", EnumChatFormatting.GRAY, 3, EnumChatFormatting.GOLD, false) - .addController("Front center") .addInputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1) .addOutputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1) .addInputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitDegasser.java b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitDegasser.java index bf503ed6a34..417b7af59b1 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitDegasser.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitDegasser.java @@ -460,6 +460,7 @@ protected MultiblockTooltipBuilder createTooltip() { + EnumChatFormatting.ITALIC + "detects in the water, it will request various materials to complete the processes listed above.") .beginStructureBlock(17, 25, 17, false) + .addController("Front center") .addCasingInfoRangeColored( "Heat-Resistant Trinium Plated Casing", EnumChatFormatting.GRAY, @@ -479,7 +480,6 @@ protected MultiblockTooltipBuilder createTooltip() { 124, EnumChatFormatting.GOLD, false) - .addController("Front center") .addOutputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+, Any Trinium Casing", 1) .addInputHatch(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+, Any Trinium Casing", 1) .addOtherStructurePart( @@ -722,6 +722,8 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a this.controlHatch = null; if (!checkPiece(STRUCTURE_PIECE_MAIN, STRUCTURE_X_OFFSET, STRUCTURE_Y_OFFSET, STRUCTURE_Z_OFFSET)) return false; if (casingCount < MIN_CASING) return false; + // Do not form without a valid control hatch + if (this.controlHatch == null || !this.controlHatch.isValid()) return false; return super.checkMachine(aBaseMetaTileEntity, aStack); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitFlocculation.java b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitFlocculation.java index aa561919f6e..32a7c5a1756 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitFlocculation.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitFlocculation.java @@ -320,6 +320,7 @@ protected MultiblockTooltipBuilder createTooltip() { + EnumChatFormatting.ITALIC + "of aggregating dispersed suspended particles from a solution into larger clumps for further filtration.") .beginStructureBlock(7, 4, 7, false) + .addController("Front center") .addCasingInfoRangeColored( "Slick Sterile Flocculation Casing", EnumChatFormatting.GRAY, @@ -357,7 +358,6 @@ protected MultiblockTooltipBuilder createTooltip() { 9, EnumChatFormatting.GOLD, false) - .addController("Front center") .addOutputBus(EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "+", 1) .addInputHatch( EnumChatFormatting.GOLD + "1" + EnumChatFormatting.GRAY + "-" + EnumChatFormatting.GOLD + "2", @@ -428,7 +428,8 @@ public float calculateFinalSuccessChance() { if (overflow > 0) { float overflowPct = (float) overflow / INPUT_CHEMICAL_PER_LEVEL; float penaltyMultiplier = (float) Math.pow(2.0f, overflowPct * -10.0); - return Math.max(0.0f, (this.currentRecipeChance + boost) * penaltyMultiplier); + // First cap to 100%, then apply penalty + return Math.max(0.0f, Math.min(100.0f, this.currentRecipeChance + boost) * penaltyMultiplier); } else { return Math.min(100.0f, this.currentRecipeChance + boost); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitOzonation.java b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitOzonation.java index 9ceb4f89581..1f26cd4c5fc 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitOzonation.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitOzonation.java @@ -213,6 +213,7 @@ protected MultiblockTooltipBuilder createTooltip() { + EnumChatFormatting.ITALIC + "sulfur, iron and manganese, creating insoluble oxide compounds which are then filtered out.") .beginStructureBlock(9, 10, 5, false) + .addController("Front center") .addCasingInfoRangeColored( "Inert Filtration Casing", EnumChatFormatting.GRAY, diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitPhAdjustment.java b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitPhAdjustment.java index 169266b8284..6fcc7258026 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitPhAdjustment.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitPhAdjustment.java @@ -405,6 +405,7 @@ protected MultiblockTooltipBuilder createTooltip() { + EnumChatFormatting.ITALIC + "materials. This necessitates the use of the corresponding neutralizing agents to pH balance the water.") .beginStructureBlock(7, 4, 7, false) + .addController("Front center") .addCasingInfoExactlyColored( "Stabilized Naquadah Water Plant Casing", EnumChatFormatting.GRAY, @@ -429,7 +430,6 @@ protected MultiblockTooltipBuilder createTooltip() { 67 * 2, EnumChatFormatting.GOLD, false) - .addController("Front center") .addOtherStructurePart("Input Hatch (Water)", EnumChatFormatting.GOLD + "1+", 1) .addOtherStructurePart("Output Hatch", EnumChatFormatting.GOLD + "1", 1) .addOtherStructurePart("pH Sensor Hatch", EnumChatFormatting.GOLD + "2", 2) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitPlasmaHeater.java b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitPlasmaHeater.java index b8a45b810af..68d3f3bd865 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitPlasmaHeater.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitPlasmaHeater.java @@ -363,6 +363,7 @@ protected MultiblockTooltipBuilder createTooltip() { + EnumChatFormatting.ITALIC + "supercritical while evaporating any remaining contaminants, ready for filtration.") .beginStructureBlock(23, 15, 15, false) + .addController("Front center") .addCasingInfoExactlyColored( "Reinforced Sterile Water Plant Casing", EnumChatFormatting.GRAY, @@ -394,7 +395,6 @@ protected MultiblockTooltipBuilder createTooltip() { 9, EnumChatFormatting.GOLD, false) - .addController("Front center") .addOtherStructurePart("Input Hatch (Water)", EnumChatFormatting.GOLD + "1+", 1) .addOtherStructurePart("Output Hatch", EnumChatFormatting.GOLD + "1", 1) .addOtherStructurePart("Input Hatch (Coolant)", EnumChatFormatting.GOLD + "1", 2) diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitUVTreatment.java b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitUVTreatment.java index 28c5c82c91a..25a31e90d7b 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitUVTreatment.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/purification/MTEPurificationUnitUVTreatment.java @@ -272,6 +272,7 @@ protected MultiblockTooltipBuilder createTooltip() { + EnumChatFormatting.ITALIC + "atoms themselves and pass through the walls of the tank, ensuring the water is perfectly electrically polar.") .beginStructureBlock(13, 9, 9, true) + .addController("Front center") .addCasingInfoRangeColored( "Naquadria-Reinforced Water Plant Casing", EnumChatFormatting.GRAY, @@ -297,7 +298,6 @@ protected MultiblockTooltipBuilder createTooltip() { 56, EnumChatFormatting.GOLD, false) - .addController("Front center") .addOtherStructurePart("Input Hatch, Output Hatch", EnumChatFormatting.GOLD + "1+", 1) .addOtherStructurePart("Lens Housing", EnumChatFormatting.GOLD + "1", 2) .addOtherStructurePart("Lens Indicator", EnumChatFormatting.GOLD + "1", 3) diff --git a/src/main/java/gregtech/common/tileentities/storage/MTEDigitalChestBase.java b/src/main/java/gregtech/common/tileentities/storage/MTEDigitalChestBase.java index d67240919a2..274856742de 100644 --- a/src/main/java/gregtech/common/tileentities/storage/MTEDigitalChestBase.java +++ b/src/main/java/gregtech/common/tileentities/storage/MTEDigitalChestBase.java @@ -294,7 +294,7 @@ public boolean onSolderingToolRightClick(ForgeDirection side, ForgeDirection wre @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { - if (getBaseMetaTileEntity().isServerSide() && getBaseMetaTileEntity().isAllowedToWork()) { + if (getBaseMetaTileEntity().isServerSide()) { if ((getItemCount() <= 0)) { setItemStack(null); setItemCount(0); diff --git a/src/main/java/gregtech/common/tools/GTTool.java b/src/main/java/gregtech/common/tools/GTTool.java index 436ec767a99..78fc28883f9 100644 --- a/src/main/java/gregtech/common/tools/GTTool.java +++ b/src/main/java/gregtech/common/tools/GTTool.java @@ -142,7 +142,7 @@ public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { return 0; } @@ -184,7 +184,7 @@ public float getMagicDamageAgainstEntity(float aOriginalDamage, Entity aEntity, } @Override - public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, + public float getMiningSpeed(Block aBlock, int aMetaData, float aDefault, EntityPlayer aPlayer, World worldObj, int aX, int aY, int aZ) { return aDefault; } diff --git a/src/main/java/gregtech/common/tools/ToolBranchCutter.java b/src/main/java/gregtech/common/tools/ToolBranchCutter.java index c9ad255a457..54a17c9f9c2 100644 --- a/src/main/java/gregtech/common/tools/ToolBranchCutter.java +++ b/src/main/java/gregtech/common/tools/ToolBranchCutter.java @@ -45,7 +45,7 @@ public boolean isGrafter() { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { if (aBlock.getMaterial() == Material.leaves) { aEvent.dropChance = Math.min( 1.0F, @@ -72,7 +72,7 @@ public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPla } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "grafter") || GTToolHarvestHelper.isAppropriateMaterial(aBlock, Material.leaves); } diff --git a/src/main/java/gregtech/common/tools/ToolButcheryKnife.java b/src/main/java/gregtech/common/tools/ToolButcheryKnife.java index 43323b84047..926a1440aaa 100644 --- a/src/main/java/gregtech/common/tools/ToolButcheryKnife.java +++ b/src/main/java/gregtech/common/tools/ToolButcheryKnife.java @@ -98,7 +98,7 @@ public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } } diff --git a/src/main/java/gregtech/common/tools/ToolBuzzSaw.java b/src/main/java/gregtech/common/tools/ToolBuzzSaw.java index 7e62ab7bb42..e47b1c00742 100644 --- a/src/main/java/gregtech/common/tools/ToolBuzzSaw.java +++ b/src/main/java/gregtech/common/tools/ToolBuzzSaw.java @@ -50,7 +50,7 @@ public String getMiningSound() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } diff --git a/src/main/java/gregtech/common/tools/ToolChainsawLV.java b/src/main/java/gregtech/common/tools/ToolChainsawLV.java index ad47ae2cdc0..6ed7918acc1 100644 --- a/src/main/java/gregtech/common/tools/ToolChainsawLV.java +++ b/src/main/java/gregtech/common/tools/ToolChainsawLV.java @@ -106,7 +106,7 @@ public void onToolCrafted(ItemStack aStack, EntityPlayer aPlayer) { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rAmount = 0; if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) { aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0); @@ -137,8 +137,8 @@ public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPla } @Override - public float getMiningSpeed(Block aBlock, byte aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, - int aX, int aY, int aZ) { + public float getMiningSpeed(Block aBlock, int aMetaData, float aDefault, EntityPlayer aPlayer, World aWorld, int aX, + int aY, int aZ) { if (aBlock.isWood(aPlayer.worldObj, aX, aY, aZ) && OrePrefixes.log.contains(new ItemStack(aBlock, 1, aMetaData))) { float rAmount = 1.0F; diff --git a/src/main/java/gregtech/common/tools/ToolCrowbar.java b/src/main/java/gregtech/common/tools/ToolCrowbar.java index db72d65a6dc..516c0138161 100644 --- a/src/main/java/gregtech/common/tools/ToolCrowbar.java +++ b/src/main/java/gregtech/common/tools/ToolCrowbar.java @@ -90,7 +90,7 @@ public boolean isWeapon() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { if (aBlock.getMaterial() == Material.circuits) { return true; } diff --git a/src/main/java/gregtech/common/tools/ToolDrillLV.java b/src/main/java/gregtech/common/tools/ToolDrillLV.java index 1c6dfd7de3c..db8d46addd0 100644 --- a/src/main/java/gregtech/common/tools/ToolDrillLV.java +++ b/src/main/java/gregtech/common/tools/ToolDrillLV.java @@ -90,7 +90,7 @@ public boolean isCrowbar() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "pickaxe", "shovel") || GTToolHarvestHelper.isAppropriateMaterial( aBlock, diff --git a/src/main/java/gregtech/common/tools/ToolFile.java b/src/main/java/gregtech/common/tools/ToolFile.java index 8e64dafdd21..6118f1597ea 100644 --- a/src/main/java/gregtech/common/tools/ToolFile.java +++ b/src/main/java/gregtech/common/tools/ToolFile.java @@ -85,7 +85,7 @@ public boolean isMiningTool() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "file"); } diff --git a/src/main/java/gregtech/common/tools/ToolHardHammer.java b/src/main/java/gregtech/common/tools/ToolHardHammer.java index a5b0a38ee56..323a1637c3e 100644 --- a/src/main/java/gregtech/common/tools/ToolHardHammer.java +++ b/src/main/java/gregtech/common/tools/ToolHardHammer.java @@ -120,7 +120,7 @@ public boolean isWeapon() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "hammer", "pickaxe") || GTToolHarvestHelper .isAppropriateMaterial(aBlock, Material.rock, Material.glass, Material.ice, Material.packedIce) @@ -129,7 +129,7 @@ public boolean isMinableBlock(Block aBlock, byte aMetaData) { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; GTRecipe tRecipe = RecipeMaps.hammerRecipes.findRecipeQuery() .items(new ItemStack(aBlock, 1, aMetaData)) diff --git a/src/main/java/gregtech/common/tools/ToolJackHammer.java b/src/main/java/gregtech/common/tools/ToolJackHammer.java index bc0a7ddcc0b..24c4815d00d 100644 --- a/src/main/java/gregtech/common/tools/ToolJackHammer.java +++ b/src/main/java/gregtech/common/tools/ToolJackHammer.java @@ -63,7 +63,7 @@ public float getMaxDurabilityMultiplier() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "pickaxe") // || GTToolHarvestHelper.isAppropriateMaterial( aBlock, // @@ -76,7 +76,7 @@ public boolean isMinableBlock(Block aBlock, byte aMetaData) { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { int rConversions = 0; GTRecipe tRecipe = RecipeMaps.hammerRecipes.findRecipeQuery() .items(new ItemStack(aBlock, 1, aMetaData)) diff --git a/src/main/java/gregtech/common/tools/ToolKnife.java b/src/main/java/gregtech/common/tools/ToolKnife.java index c5b8273d254..3005c746207 100644 --- a/src/main/java/gregtech/common/tools/ToolKnife.java +++ b/src/main/java/gregtech/common/tools/ToolKnife.java @@ -72,7 +72,7 @@ public boolean isWeapon() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "sword") || GTToolHarvestHelper.isAppropriateMaterial( aBlock, diff --git a/src/main/java/gregtech/common/tools/ToolMortar.java b/src/main/java/gregtech/common/tools/ToolMortar.java index e67e5924de6..c7223807ccc 100644 --- a/src/main/java/gregtech/common/tools/ToolMortar.java +++ b/src/main/java/gregtech/common/tools/ToolMortar.java @@ -85,7 +85,7 @@ public boolean isMiningTool() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } diff --git a/src/main/java/gregtech/common/tools/ToolPlunger.java b/src/main/java/gregtech/common/tools/ToolPlunger.java index 5cb9bcff482..422825833fe 100644 --- a/src/main/java/gregtech/common/tools/ToolPlunger.java +++ b/src/main/java/gregtech/common/tools/ToolPlunger.java @@ -45,7 +45,7 @@ public String getMiningSound() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "plunger"); } diff --git a/src/main/java/gregtech/common/tools/ToolRollingPin.java b/src/main/java/gregtech/common/tools/ToolRollingPin.java index 1af17f3072b..4e7cb251600 100644 --- a/src/main/java/gregtech/common/tools/ToolRollingPin.java +++ b/src/main/java/gregtech/common/tools/ToolRollingPin.java @@ -40,7 +40,7 @@ public float getBaseDamage() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } diff --git a/src/main/java/gregtech/common/tools/ToolSaw.java b/src/main/java/gregtech/common/tools/ToolSaw.java index ca1ec81b137..78942744cf1 100644 --- a/src/main/java/gregtech/common/tools/ToolSaw.java +++ b/src/main/java/gregtech/common/tools/ToolSaw.java @@ -79,7 +79,7 @@ public String getMiningSound() { @Override public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, - int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { + int aY, int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) { if ((aBlock.getMaterial() == Material.leaves) && ((aBlock instanceof IShearable))) { aPlayer.worldObj.setBlock(aX, aY, aZ, aBlock, aMetaData, 0); if (((IShearable) aBlock).isShearable(aStack, aPlayer.worldObj, aX, aY, aZ)) { @@ -101,7 +101,7 @@ public int convertBlockDrops(List aDrops, ItemStack aStack, EntityPla } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "axe", "saw") || GTToolHarvestHelper.isAppropriateMaterial( aBlock, diff --git a/src/main/java/gregtech/common/tools/ToolScoop.java b/src/main/java/gregtech/common/tools/ToolScoop.java index 6f740da95eb..1ab4c0f9fcf 100644 --- a/src/main/java/gregtech/common/tools/ToolScoop.java +++ b/src/main/java/gregtech/common/tools/ToolScoop.java @@ -87,7 +87,7 @@ public boolean isCrowbar() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "scoop") || GTToolHarvestHelper.isAppropriateMaterial(aBlock, sBeeHiveMaterial); } diff --git a/src/main/java/gregtech/common/tools/ToolScrewdriver.java b/src/main/java/gregtech/common/tools/ToolScrewdriver.java index b73f1371aab..6c772842d5a 100644 --- a/src/main/java/gregtech/common/tools/ToolScrewdriver.java +++ b/src/main/java/gregtech/common/tools/ToolScrewdriver.java @@ -117,7 +117,7 @@ public boolean isScrewdriver() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "screwdriver") || GTToolHarvestHelper.isAppropriateMaterial(aBlock, Material.circuits); } diff --git a/src/main/java/gregtech/common/tools/ToolSoftHammer.java b/src/main/java/gregtech/common/tools/ToolSoftHammer.java index 0cd3aa2eac6..9e812b59f1e 100644 --- a/src/main/java/gregtech/common/tools/ToolSoftHammer.java +++ b/src/main/java/gregtech/common/tools/ToolSoftHammer.java @@ -97,7 +97,7 @@ public boolean isWeapon() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "softhammer"); } diff --git a/src/main/java/gregtech/common/tools/ToolSolderingIron.java b/src/main/java/gregtech/common/tools/ToolSolderingIron.java index 9ae4fade4c7..b00e97bee63 100644 --- a/src/main/java/gregtech/common/tools/ToolSolderingIron.java +++ b/src/main/java/gregtech/common/tools/ToolSolderingIron.java @@ -112,7 +112,7 @@ public boolean isMiningTool() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "soldering_iron") || GTToolHarvestHelper.isAppropriateMaterial(aBlock, Material.circuits); } diff --git a/src/main/java/gregtech/common/tools/ToolTurbine.java b/src/main/java/gregtech/common/tools/ToolTurbine.java index ace22b06bac..ceb2eb6df20 100644 --- a/src/main/java/gregtech/common/tools/ToolTurbine.java +++ b/src/main/java/gregtech/common/tools/ToolTurbine.java @@ -16,7 +16,7 @@ public abstract class ToolTurbine extends GTTool { public abstract float getBaseDamage(); @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } diff --git a/src/main/java/gregtech/common/tools/ToolWireCutter.java b/src/main/java/gregtech/common/tools/ToolWireCutter.java index 6009504d804..edbf21c3b93 100644 --- a/src/main/java/gregtech/common/tools/ToolWireCutter.java +++ b/src/main/java/gregtech/common/tools/ToolWireCutter.java @@ -81,7 +81,7 @@ public boolean isCrowbar() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(aBlock, aMetaData, "cutter"); } diff --git a/src/main/java/gregtech/common/tools/ToolWrench.java b/src/main/java/gregtech/common/tools/ToolWrench.java index 3d2adf48962..cbab13b401e 100644 --- a/src/main/java/gregtech/common/tools/ToolWrench.java +++ b/src/main/java/gregtech/common/tools/ToolWrench.java @@ -126,7 +126,7 @@ public boolean isWrench() { } @Override - public boolean isMinableBlock(Block block, byte aMetaData) { + public boolean isMinableBlock(Block block, int aMetaData) { return GTToolHarvestHelper.isAppropriateTool(block, aMetaData, "wrench") || GTToolHarvestHelper.isAppropriateMaterial(block, Material.piston) || block instanceof AEBaseTileBlock @@ -194,7 +194,7 @@ public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase private boolean LastEventFromThis = false; @Override - public void onBreakBlock(@Nonnull EntityPlayer player, int x, int y, int z, @Nonnull Block block, byte metadata, + public void onBreakBlock(@Nonnull EntityPlayer player, int x, int y, int z, @Nonnull Block block, int metadata, TileEntity tile, @Nonnull BlockEvent.BreakEvent event) { if (tile instanceof IWrenchable wrenchable) { if (!wrenchable.wrenchCanRemove(player)) { @@ -246,7 +246,7 @@ public void onBreakBlock(@Nonnull EntityPlayer player, int x, int y, int z, @Non @Override public int convertBlockDrops(List drops, ItemStack Stack, EntityPlayer player, Block block, int x, int y, - int z, byte metaData, int fortune, boolean silkTouch, BlockEvent.HarvestDropsEvent event) { + int z, int metaData, int fortune, boolean silkTouch, BlockEvent.HarvestDropsEvent event) { ItemStack drop = null; int modified = 0; if (wrenchableDrop != null) { diff --git a/src/main/java/gregtech/common/tools/pocket/ToolPocketMultitool.java b/src/main/java/gregtech/common/tools/pocket/ToolPocketMultitool.java index e55671d486f..e4cc20be246 100644 --- a/src/main/java/gregtech/common/tools/pocket/ToolPocketMultitool.java +++ b/src/main/java/gregtech/common/tools/pocket/ToolPocketMultitool.java @@ -44,7 +44,7 @@ public float getBaseDamage() { } @Override - public boolean isMinableBlock(Block aBlock, byte aMetaData) { + public boolean isMinableBlock(Block aBlock, int aMetaData) { return false; } } diff --git a/src/main/java/gregtech/loaders/materials/MaterialsInit1.java b/src/main/java/gregtech/loaders/materials/MaterialsInit1.java index df57d074af4..f3391b040eb 100644 --- a/src/main/java/gregtech/loaders/materials/MaterialsInit1.java +++ b/src/main/java/gregtech/loaders/materials/MaterialsInit1.java @@ -567,7 +567,7 @@ public static void load() { Materials.Polydimethylsiloxane = new MaterialBuilder(633, TextureSet.SET_FLUID , "Polydimethylsiloxane").addDustItems().setRGB(245, 245, 245).setColor(Dyes.dyeWhite).setMaterialList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1), new MaterialStack(Silicon, 1)).addElectrolyzerRecipe().constructMaterial(); Materials.Silicone = new Materials( 471, TextureSet.SET_DULL , 3.0F, 128, 1, 1|2 |64|128 , 220, 220, 220, 0, "Silicone" , "Silicone Rubber" , 0, 0, 900, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Hydrogen, 6), new MaterialStack(Oxygen, 1), new MaterialStack(Silicon, 1)), Collections.singletonList(new TCAspects.TC_AspectStack(TCAspects.MOTUS, 2))); Materials.Polycaprolactam = new Materials( 472, TextureSet.SET_DULL , 3.0F, 32, 1, 1|2 |64|128 , 50, 50, 50, 0, "Polycaprolactam" , "Polycaprolactam" , 0, 0, 500, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Carbon, 6), new MaterialStack(Hydrogen, 11), new MaterialStack(Nitrogen, 1), new MaterialStack(Oxygen, 1)), Collections.singletonList(new TCAspects.TC_AspectStack(TCAspects.MOTUS, 2))); - Materials.Polytetrafluoroethylene = new Materials( 473, TextureSet.SET_DULL , 3.0F, 32, 1, 1|2 |64|128 , 100, 100, 100, 0, "Polytetrafluoroethylene" , "Polytetrafluoroethylene" , 0, 0, 1400, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Fluorine, 4)), Collections.singletonList(new TCAspects.TC_AspectStack(TCAspects.MOTUS, 2))); + Materials.Polytetrafluoroethylene = new Materials( 473, TextureSet.SET_DULL , 3.0F, 32, 1, 1|2 |64|128 , 100, 100, 100, 0, "Polytetrafluoroethylene" , "Polytetrafluoroethylene" , 0, 0, 600, 0, false, false, 1, 1, 1, Dyes.dyeWhite , 0, Arrays.asList(new MaterialStack(Carbon, 2), new MaterialStack(Fluorine, 4)), Collections.singletonList(new TCAspects.TC_AspectStack(TCAspects.MOTUS, 2))); Materials.Powellite = new Materials( 883, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 255, 255, 0, 0, "Powellite" , "Powellite" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeYellow , 2, Arrays.asList(new MaterialStack(Calcium, 1), new MaterialStack(Molybdenum, 1), new MaterialStack(Oxygen, 4))); Materials.Pumice = new Materials( 926, TextureSet.SET_DULL , 1.0F, 0, 2, 1 |8 , 230, 185, 185, 0, "Pumice" , "Pumice" , 0, 0, -1, 0, false, false, 1, 1, 1, Dyes.dyeGray , 2, Collections.singletonList(new MaterialStack(Stone, 1))); Materials.Pyrite = new Materials( 834, TextureSet.SET_ROUGH , 1.0F, 0, 1, 1 |8 , 150, 120, 40, 0, "Pyrite" , "Pyrite" , 0, 0, -1, 0, false, false, 2, 1, 1, Dyes.dyeOrange , 1, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Sulfur, 2))); @@ -895,11 +895,11 @@ public static void load() { Materials.EnergeticSilver = new Materials( 407, TextureSet.SET_METALLIC , 8.0F, 512, 3, 1|2 |64|128 , 149, 183, 205, 0, "EnergeticSilver" , "Energetic Silver" , 0, 0, -1, 2200, true, false, 4, 1, 1, Dyes.dyeLightBlue , 1, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(ConductiveIron, 1), new MaterialStack(BlackSteel, 1))).disableAutoGeneratedBlastFurnaceRecipes(); Materials.VividAlloy = new Materials( 408, TextureSet.SET_METALLIC , 12.0F, 768, 4, 1|2 |64|128 , 70, 188, 219, 0, "VividAlloy" , "Vivid Alloy" , 0, 0, 3300, 3300, true, false, 4, 1, 1, Dyes.dyeBlue , 1, Arrays.asList(new MaterialStack(EnergeticSilver, 1), new MaterialStack(EnderEye, 1), new MaterialStack(Chrome, 1))).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe(); Materials.Enderium = new Materials( 321, TextureSet.SET_DULL , 8.0F, 1500, 3, 1|2 |64|128 , 89, 145, 135, 0, "Enderium" , "Enderium" , 0, 0, 4500, 4500, true, false, 1, 1, 1, Dyes.dyeGreen , 1, Arrays.asList(new MaterialStack(EnderiumBase, 2), new MaterialStack(Thaumium, 1), new MaterialStack(EnderPearl, 1)), Arrays.asList(new TCAspects.TC_AspectStack(TCAspects.METALLUM, 2), new TCAspects.TC_AspectStack(TCAspects.ALIENIS, 1))).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe(); - Materials.Mithril = new Materials( 331, TextureSet.SET_SHINY , 32.0F, 64, 2, 1|2 |8 |64 , 255, 255, 210, 0, "Mithril" , "Mithril" , 0, 0, 6600, 6600, true, false, 4, 3, 2, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Thaumium, 1))).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(22, 1, 1); - Materials.BlueAlloy = new Materials( 309, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 100, 180, 255, 0, "BlueAlloy" , "Blue Alloy" , 0, 0, -1, 0, false, false, 3, 5, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Electrotine, 4)), Collections.singletonList(new TCAspects.TC_AspectStack(TCAspects.ELECTRUM, 3))); - Materials.ShadowIron = new Materials( 336, TextureSet.SET_METALLIC , 32.0F, 10240, 2, 1|2 |8 |64 , 120, 120, 120, 0, "ShadowIron" , "Shadow Iron" , 0, 0, 8400, 8400, true, false, 3, 4, 3, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(1, 76, 1); - Materials.ShadowSteel = new Materials( 337, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 90, 90, 90, 0, "ShadowSteel" , "Shadow Steel" , 0, 0, -1, 1700, true, false, 4, 4, 3, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); - Materials.AstralSilver = new Materials( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |64 , 230, 230, 255, 0, "AstralSilver" , "Astral Silver" , 0, 0, -1, 0, false, false, 4, 3, 2, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1))); + Materials.Mithril = new Materials( 331, TextureSet.SET_SHINY , 32.0F, 64, 2, 1|2 |8 |64 , 255, 255, 210, 0, "Mithril" , "Mithril" , 0, 0, 6600, 6600, true, false, 4, 1, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Platinum, 2), new MaterialStack(Thaumium, 1))).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(22, 1, 1); + Materials.BlueAlloy = new Materials( 309, TextureSet.SET_DULL , 1.0F, 0, 0, 1|2 , 100, 180, 255, 0, "BlueAlloy" , "Blue Alloy" , 0, 0, -1, 0, false, false, 3, 1, 1, Dyes.dyeLightBlue , 2, Arrays.asList(new MaterialStack(Silver, 1), new MaterialStack(Electrotine, 4)), Collections.singletonList(new TCAspects.TC_AspectStack(TCAspects.ELECTRUM, 3))); + Materials.ShadowIron = new Materials( 336, TextureSet.SET_METALLIC , 32.0F, 10240, 2, 1|2 |8 |64 , 120, 120, 120, 0, "ShadowIron" , "Shadow Iron" , 0, 0, 8400, 8400, true, false, 3, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Iron, 1), new MaterialStack(Thaumium, 3))).disableAutoGeneratedBlastFurnaceRecipes().setTurbineMultipliers(1, 76, 1); + Materials.ShadowSteel = new Materials( 337, TextureSet.SET_METALLIC , 6.0F, 768, 4, 1|2 |64 , 90, 90, 90, 0, "ShadowSteel" , "Shadow Steel" , 0, 0, -1, 1700, true, false, 4, 1, 1, Dyes.dyeBlack , 2, Arrays.asList(new MaterialStack(Steel, 1), new MaterialStack(Thaumium, 3))); + Materials.AstralSilver = new Materials( 333, TextureSet.SET_SHINY , 10.0F, 64, 2, 1|2 |64 , 230, 230, 255, 0, "AstralSilver" , "Astral Silver" , 0, 0, -1, 0, false, false, 4, 1, 1, Dyes.dyeWhite , 2, Arrays.asList(new MaterialStack(Silver, 2), new MaterialStack(Thaumium, 1))); Materials.InfinityCatalyst = new Materials( 394, TextureSet.SET_SHINY , 64.0F,1310720, 10, 1|2 |8 |64|128 , 255, 255, 255, 0, "InfinityCatalyst" , "Infinity Catalyst" , 5, 500000, 10800, 10800, true, false, 20, 1, 1, Dyes.dyeLightGray ).setProcessingMaterialTierEU(TierEU.RECIPE_UV).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe(); Materials.Infinity = new Materials( 397, new TextureSet("infinity", true), 256.0F,2621440, 17, 1|2|32|64|128 , 255, 255, 255, 0, "Infinity" , "Infinity" , 5, 5000000, 10800, 10800, true, false, 40, 1, 1, Dyes.dyeLightGray ).setProcessingMaterialTierEU(TierEU.RECIPE_UV).disableAutoGeneratedBlastFurnaceRecipes().disableAutoGeneratedVacuumFreezerRecipe().setHasCorrespondingPlasma(true); diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java index 5432aeaf0b9..984fcc6ef53 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingLog.java @@ -1,13 +1,7 @@ package gregtech.loaders.oreprocessing; import static gregtech.api.enums.Mods.Railcraft; -import static gregtech.api.recipe.RecipeMaps.assemblerRecipes; -import static gregtech.api.recipe.RecipeMaps.centrifugeRecipes; -import static gregtech.api.recipe.RecipeMaps.chemicalBathRecipes; -import static gregtech.api.recipe.RecipeMaps.cutterRecipes; -import static gregtech.api.recipe.RecipeMaps.extractorRecipes; -import static gregtech.api.recipe.RecipeMaps.latheRecipes; -import static gregtech.api.recipe.RecipeMaps.maceratorRecipes; +import static gregtech.api.recipe.RecipeMaps.*; import static gregtech.api.recipe.RecipeMaps.pyrolyseRecipes; import static gregtech.api.util.GTRecipeBuilder.SECONDS; import static gregtech.api.util.GTRecipeBuilder.TICKS; @@ -198,15 +192,14 @@ public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDic if (tStack != null) { ItemStack tPlanks = GTUtility.copyOrNull(tStack); if (tPlanks != null) { + tPlanks.stackSize = (tPlanks.stackSize * 3 / 2); GTValues.RA.stdBuilder() .itemInputs(GTUtility.copyAmount(1, aStack)) .itemOutputs( - GTUtility.copyAmount( - GTMod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, - tStack), - GTOreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L)) - .fluidInputs(Materials.Water.getFluid(Math.min(1000, 200 * 8 / 320))) - .duration(20 * SECONDS) + GTUtility.copyOrNull(tPlanks), + GTOreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L)) + .fluidInputs(Materials.Lubricant.getFluid(1L)) + .duration(10 * SECONDS) .eut(8) .addTo(cutterRecipes); GTValues.RA.stdBuilder() @@ -216,7 +209,7 @@ public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDic GTMod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L)) - .fluidInputs(GTModHandler.getDistilledWater(3)) + .fluidInputs(Materials.Water.getFluid(Math.min(1000, 200 * 8 / 320))) .duration(20 * SECONDS) .eut(8) .addTo(cutterRecipes); @@ -227,8 +220,8 @@ public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDic GTMod.gregtechproxy.mNerfedWoodPlank ? tStack.stackSize : tStack.stackSize * 5 / 4, tStack), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L)) - .fluidInputs(Materials.Lubricant.getFluid(1)) - .duration(10 * SECONDS) + .fluidInputs(GTModHandler.getDistilledWater(3)) + .duration(20 * SECONDS) .eut(8) .addTo(cutterRecipes); GTModHandler.removeRecipeDelayed(GTUtility.copyAmount(1, aStack)); @@ -251,6 +244,11 @@ public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDic } } + /** + * Add Pyrolyse Oven Recipes for Logs. + * Used in NHCoreMod. + */ + @SuppressWarnings("unused") public static void addPyrolyeOvenRecipes(ItemStack logStack) { GTValues.RA.stdBuilder() .itemInputs(GTUtility.copyAmount(16, logStack), GTUtility.getIntegratedCircuit(1)) diff --git a/src/main/java/gregtech/loaders/postload/PCBFactoryMaterialLoader.java b/src/main/java/gregtech/loaders/postload/PCBFactoryMaterialLoader.java index 0f6ab52a325..39cf8ff0384 100644 --- a/src/main/java/gregtech/loaders/postload/PCBFactoryMaterialLoader.java +++ b/src/main/java/gregtech/loaders/postload/PCBFactoryMaterialLoader.java @@ -15,5 +15,6 @@ public static void load() { PCBFactoryManager.addPlasticTier(Materials.EpoxidFiberReinforced, 5); PCBFactoryManager.addPlasticTier(Materials.Polybenzimidazole, 6); PCBFactoryManager.addPlasticTier(MaterialsKevlar.Kevlar, 7); + PCBFactoryManager.addPlasticTier(Materials.RadoxPolymer, 8); } } diff --git a/src/main/java/gregtech/loaders/postload/recipes/ChemicalRecipes.java b/src/main/java/gregtech/loaders/postload/recipes/ChemicalRecipes.java index 60fba5404a5..f7a4c4f09a1 100644 --- a/src/main/java/gregtech/loaders/postload/recipes/ChemicalRecipes.java +++ b/src/main/java/gregtech/loaders/postload/recipes/ChemicalRecipes.java @@ -4937,17 +4937,6 @@ public void multiblockOnly() { // 2CH3COOH = CH3COCH3 + CO2 + H - GTValues.RA.stdBuilder() - .itemInputs(GTUtility.copyAmount(0, Materials.Calcite.getDust(5)), GTUtility.getIntegratedCircuit(24)) - .fluidInputs(Materials.AceticAcid.getFluid(2000)) - .fluidOutputs( - Materials.Acetone.getFluid(1000), - Materials.CarbonDioxide.getGas(1000), - Materials.Water.getFluid(1000)) - .duration(20 * SECONDS) - .eut(TierEU.RECIPE_HV) - .addTo(multiblockChemicalReactorRecipes); - GTValues.RA.stdBuilder() .itemInputs(GTUtility.copyAmount(0, Materials.Calcium.getDust(1)), GTUtility.getIntegratedCircuit(24)) .fluidInputs(Materials.AceticAcid.getFluid(2000)) @@ -4959,17 +4948,6 @@ public void multiblockOnly() { .eut(TierEU.RECIPE_HV) .addTo(multiblockChemicalReactorRecipes); - GTValues.RA.stdBuilder() - .itemInputs(GTUtility.copyAmount(0, Materials.Quicklime.getDust(2)), GTUtility.getIntegratedCircuit(24)) - .fluidInputs(Materials.AceticAcid.getFluid(2000)) - .fluidOutputs( - Materials.Acetone.getFluid(1000), - Materials.CarbonDioxide.getGas(1000), - Materials.Water.getFluid(1000)) - .duration(20 * SECONDS) - .eut(TierEU.RECIPE_HV) - .addTo(multiblockChemicalReactorRecipes); - // C + 4H + O = CH3OH GTValues.RA.stdBuilder() diff --git a/src/main/java/gregtech/loaders/preload/LoaderGTBlockFluid.java b/src/main/java/gregtech/loaders/preload/LoaderGTBlockFluid.java index dfb1c39788b..22866098213 100644 --- a/src/main/java/gregtech/loaders/preload/LoaderGTBlockFluid.java +++ b/src/main/java/gregtech/loaders/preload/LoaderGTBlockFluid.java @@ -64,6 +64,7 @@ import gregtech.common.blocks.BlockCasings6; import gregtech.common.blocks.BlockCasings8; import gregtech.common.blocks.BlockCasings9; +import gregtech.common.blocks.BlockCasingsNH; import gregtech.common.blocks.BlockConcretes; import gregtech.common.blocks.BlockCyclotronCoils; import gregtech.common.blocks.BlockDrone; @@ -544,6 +545,7 @@ public void run() { GregTechAPI.sBlockCasings9 = new BlockCasings9(); GregTechAPI.sBlockCasings10 = new BlockCasings10(); GregTechAPI.sBlockCasings11 = new BlockCasings11(); + GregTechAPI.sBlockCasingsNH = new BlockCasingsNH(); GregTechAPI.sBlockGranites = new BlockGranites(); GregTechAPI.sBlockLongDistancePipes = new BlockLongDistancePipe(); GregTechAPI.sBlockConcretes = new BlockConcretes(); diff --git a/src/main/java/gregtech/loaders/preload/LoaderMetaTileEntities.java b/src/main/java/gregtech/loaders/preload/LoaderMetaTileEntities.java index c02c1d94dfc..b4bcce38d3d 100644 --- a/src/main/java/gregtech/loaders/preload/LoaderMetaTileEntities.java +++ b/src/main/java/gregtech/loaders/preload/LoaderMetaTileEntities.java @@ -1012,6 +1012,7 @@ import gregtech.common.tileentities.machines.basic.MTEMicrowaveEnergyTransmitter; import gregtech.common.tileentities.machines.basic.MTEMiner; import gregtech.common.tileentities.machines.basic.MTEMonsterRepellent; +import gregtech.common.tileentities.machines.basic.MTENameRemover; import gregtech.common.tileentities.machines.basic.MTEPotionBrewer; import gregtech.common.tileentities.machines.basic.MTEPump; import gregtech.common.tileentities.machines.basic.MTEReplicator; @@ -1022,6 +1023,9 @@ import gregtech.common.tileentities.machines.basic.MTEWorldAccelerator; import gregtech.common.tileentities.machines.long_distance.MTELongDistancePipelineFluid; import gregtech.common.tileentities.machines.long_distance.MTELongDistancePipelineItem; +import gregtech.common.tileentities.machines.multi.MTEAirFilter1; +import gregtech.common.tileentities.machines.multi.MTEAirFilter2; +import gregtech.common.tileentities.machines.multi.MTEAirFilter3; import gregtech.common.tileentities.machines.multi.MTEAssemblyLine; import gregtech.common.tileentities.machines.multi.MTEBrickedBlastFurnace; import gregtech.common.tileentities.machines.multi.MTECharcoalPit; @@ -12364,6 +12368,23 @@ private static void registerPlasmaGenerators() { 8).getStackForm(1L)); } + private static void registerNameRemover() { + ItemList.NameRemover + .set(new MTENameRemover(NAME_REMOVER.ID, "fix.name.remover", "Name Remover", 0).getStackForm(1L)); + } + + private static void registerAirFilters() { + ItemList.Machine_Multi_AirFilterT1.set( + new MTEAirFilter1(AIR_FILTER_CONTROLLER_T1.ID, "multimachine.airfilter.01", "Electric Air Filter T1") + .getStackForm(1L)); + ItemList.Machine_Multi_AirFilterT2.set( + new MTEAirFilter2(AIR_FILTER_CONTROLLER_T2.ID, "multimachine.airfilter.02", "Electric Air Filter T2") + .getStackForm(1L)); + ItemList.Machine_Multi_AirFilterT3.set( + new MTEAirFilter3(AIR_FILTER_CONTROLLER_T3.ID, "multimachine.airfilter.03", "Electric Air Filter T3") + .getStackForm(1L)); + } + private static void generateWiresAndPipes() { for (int meta = 0; meta < GregTechAPI.sGeneratedMaterials.length; meta++) { Materials material = GregTechAPI.sGeneratedMaterials[meta]; @@ -12931,6 +12952,8 @@ public void run() { registerUnpackager(); registerPrinter(); registerOven(); + registerNameRemover(); + registerAirFilters(); ItemList.AdvDebugStructureWriter.set( new MTEAdvDebugStructureWriter( diff --git a/src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java b/src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java index d2a1e34f99d..d8b04fc2463 100644 --- a/src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java +++ b/src/main/java/gtPlusPlus/api/interfaces/ILazyCoverable.java @@ -110,22 +110,22 @@ default IGregTechTileEntity getIGregTechTileEntityAtSideAndDistance(ForgeDirecti } @Override - default byte getMetaID(int arg0, int arg1, int arg2) { + default int getMetaID(int arg0, int arg1, int arg2) { return 0; } @Override - default byte getMetaIDOffset(int arg0, int arg1, int arg2) { + default int getMetaIDOffset(int arg0, int arg1, int arg2) { return 0; } @Override - default byte getMetaIDAtSide(ForgeDirection side) { + default int getMetaIDAtSide(ForgeDirection side) { return 0; } @Override - default byte getMetaIDAtSideAndDistance(ForgeDirection side, int arg1) { + default int getMetaIDAtSideAndDistance(ForgeDirection side, int arg1) { return 0; } diff --git a/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java b/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java index 064d59af879..0ac958df4f3 100644 --- a/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java +++ b/src/main/java/gtPlusPlus/api/recipe/GTPPRecipeMaps.java @@ -62,7 +62,7 @@ public class GTPPRecipeMaps { .build(); public static final RecipeMap vacuumFurnaceRecipes = RecipeMapBuilder.of("gtpp.recipe.vacfurnace") .maxIO(9, 9, 3, 3) - .minInputs(1, 0) + .minInputs(0, 1) .neiSpecialInfoFormatter(HeatingCoilSpecialValueFormatter.INSTANCE) .frontend(LargeNEIFrontend::new) .disableOptimize() diff --git a/src/main/java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java b/src/main/java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java index f89b69ec8b3..642b374a7f0 100644 --- a/src/main/java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java +++ b/src/main/java/gtPlusPlus/core/item/chemistry/MilledOreProcessing.java @@ -221,10 +221,9 @@ public boolean generateRecipes() { } private void addVacuumFurnaceRecipes() { - int aCircuitID = 1; GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(aCircuitID++)) + .itemInputs(GTUtility.getIntegratedCircuit(1)) .itemOutputs( GTOreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 64), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 64), @@ -241,7 +240,7 @@ private void addVacuumFurnaceRecipes() { .addTo(vacuumFurnaceRecipes); GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(aCircuitID++)) + .itemInputs(GTUtility.getIntegratedCircuit(1)) .itemOutputs( GTOreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 64), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 64), @@ -258,7 +257,6 @@ private void addVacuumFurnaceRecipes() { .addTo(vacuumFurnaceRecipes); GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(aCircuitID++)) .itemOutputs( GTOreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 64), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Nickel, 64), @@ -275,7 +273,6 @@ private void addVacuumFurnaceRecipes() { .addTo(vacuumFurnaceRecipes); GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(aCircuitID++)) .itemOutputs( PTMetallicPowder.get(OrePrefixes.dust, 64), PTMetallicPowder.get(OrePrefixes.dust, 64), @@ -290,7 +287,6 @@ private void addVacuumFurnaceRecipes() { .addTo(vacuumFurnaceRecipes); GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(aCircuitID++)) .itemOutputs( GTOreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 64), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Iron, 64), @@ -307,7 +303,6 @@ private void addVacuumFurnaceRecipes() { .addTo(vacuumFurnaceRecipes); GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(aCircuitID++)) .itemOutputs( GTOreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 64), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 64), @@ -325,7 +320,6 @@ private void addVacuumFurnaceRecipes() { .addTo(vacuumFurnaceRecipes); GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(aCircuitID++)) .itemOutputs( GTOreDictUnificator.get(OrePrefixes.dust, Materials.Manganese, 64), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Manganese, 64), @@ -342,7 +336,6 @@ private void addVacuumFurnaceRecipes() { .addTo(vacuumFurnaceRecipes); GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(aCircuitID++)) .itemOutputs( GTOreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 64), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Calcium, 64), @@ -359,7 +352,6 @@ private void addVacuumFurnaceRecipes() { .addTo(vacuumFurnaceRecipes); GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(aCircuitID++)) .itemOutputs( GTOreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 64), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 64), @@ -376,7 +368,6 @@ private void addVacuumFurnaceRecipes() { .addTo(vacuumFurnaceRecipes); GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(aCircuitID++)) .itemOutputs( GTOreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 64), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Magnesium, 46), @@ -392,7 +383,6 @@ private void addVacuumFurnaceRecipes() { .addTo(vacuumFurnaceRecipes); GTValues.RA.stdBuilder() - .itemInputs(GTUtility.getIntegratedCircuit(aCircuitID++)) .itemOutputs( GTOreDictUnificator.get(OrePrefixes.dust, Materials.Erbium, 64), GTOreDictUnificator.get(OrePrefixes.dust, Materials.Lanthanum, 32), diff --git a/src/main/java/gtPlusPlus/core/recipe/RecipesMachines.java b/src/main/java/gtPlusPlus/core/recipe/RecipesMachines.java index 775b5b80a30..81485d01760 100644 --- a/src/main/java/gtPlusPlus/core/recipe/RecipesMachines.java +++ b/src/main/java/gtPlusPlus/core/recipe/RecipesMachines.java @@ -7,6 +7,7 @@ import static gregtech.api.recipe.RecipeMaps.assemblerRecipes; import static gregtech.api.recipe.RecipeMaps.cutterRecipes; import static gregtech.api.recipe.RecipeMaps.distilleryRecipes; +import static gregtech.api.util.GTModHandler.getModItem; import static gregtech.api.util.GTRecipeBuilder.HOURS; import static gregtech.api.util.GTRecipeBuilder.INGOTS; import static gregtech.api.util.GTRecipeBuilder.MINUTES; @@ -1461,15 +1462,15 @@ private static void runModRecipes() { // Industrial Wire Factory RecipeUtils.addShapedGregtechRecipe( - "plateZeron100", - CI.machineCasing_IV, - "plateZeron100", - CI.circuitTier5, - IV_MACHINE_Wiremill, - CI.circuitTier5, - "plateZeron100", - CI.machineCasing_IV, - "plateZeron100", + "plateBlueSteel", + ItemList.Casing_IV.get(1L), + "plateBlueSteel", + "circuitElite", + ItemList.Machine_IV_Wiremill.get(1L), + "circuitElite", + "plateBlueSteel", + ItemList.Casing_IV.get(1L), + "plateBlueSteel", RECIPE_IndustrialWireFactoryController); // Tiered Tanks @@ -1529,15 +1530,15 @@ private static void runModRecipes() { CI.component_Plate[5], GregtechItemList.GTFluidTank_MV.get(1)); RecipeUtils.addShapedGregtechRecipe( - CI.circuitTier1, - CI.component_Plate[7], - CI.circuitTier1, - CI.component_Plate[8], - pipeTier4, - CI.component_Plate[8], - CI.circuitTier1, - CI.electricPump_MV, - CI.circuitTier1, + "circuitPrimitive", + "plateAluminium", + "circuitPrimitive", + "plateDarkSteel", + "pipeMediumSteel", + "plateDarkSteel", + "circuitPrimitive", + ItemList.Electric_Pump_MV.get(1L), + "circuitPrimitive", GregtechItemList.GTFluidTank_HV.get(1)); // Industrial Multi Tank @@ -2130,27 +2131,15 @@ private static void runModRecipes() { ItemStack centrifugeEV = ItemList.Machine_EV_Centrifuge.get(1); RecipeUtils.addShapedGregtechRecipe( - "craftingGeothermalGenerator", - centrifugeEV, - "craftingGeothermalGenerator", - "gearGtTitanium", - CI.getTieredCircuitOreDictName(6), - "gearGtTitanium", - "craftingGeothermalGenerator", - centrifugeEV, - "craftingGeothermalGenerator", - RECIPE_ThermalBoilerController); - - RecipeUtils.addShapedGregtechRecipe( - "craftingGeothermalGenerator", - centrifugeEV, - "craftingGeothermalGenerator", + getModItem(RemoteIO.ID, "tile.machine", 1, 1), + ItemList.Machine_HV_Centrifuge.get(1L), + getModItem(RemoteIO.ID, "tile.machine", 1, 1), "gearGtTungstenSteel", - CI.getTieredCircuitOreDictName(5), + "circuitElite", "gearGtTungstenSteel", - "craftingGeothermalGenerator", - centrifugeEV, - "craftingGeothermalGenerator", + getModItem(RemoteIO.ID, "tile.machine", 1, 1), + ItemList.Machine_HV_Centrifuge.get(1L), + getModItem(RemoteIO.ID, "tile.machine", 1, 1), RECIPE_ThermalBoilerController); RecipeUtils.addShapedGregtechRecipe( diff --git a/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java b/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java index 63a2d8329bf..5528c7bbaf2 100644 --- a/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java +++ b/src/main/java/gtPlusPlus/core/tileentities/base/TileEntityBase.java @@ -567,17 +567,17 @@ public final Block getBlockAtSideAndDistance(ForgeDirection side, int aDistance) } @Override - public final byte getMetaIDOffset(int aX, int aY, int aZ) { + public final int getMetaIDOffset(int aX, int aY, int aZ) { return this.getMetaID(this.xCoord + aX, this.yCoord + aY, this.zCoord + aZ); } @Override - public final byte getMetaIDAtSide(ForgeDirection side) { + public final int getMetaIDAtSide(ForgeDirection side) { return this.getMetaIDAtSideAndDistance(side, 1); } @Override - public final byte getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) { + public final int getMetaIDAtSideAndDistance(ForgeDirection side, int aDistance) { return this.getMetaID( this.getOffsetX(side, aDistance), this.getOffsetY(side, aDistance), @@ -750,10 +750,10 @@ public final Block getBlock(int aX, int aY, int aZ) { } @Override - public final byte getMetaID(int aX, int aY, int aZ) { + public final int getMetaID(int aX, int aY, int aZ) { return this.ignoreUnloadedChunks && this.crossedChunkBorder(aX, aZ) && !this.worldObj.blockExists(aX, aY, aZ) ? 0 - : (byte) this.worldObj.getBlockMetadata(aX, aY, aZ); + : this.worldObj.getBlockMetadata(aX, aY, aZ); } @Override diff --git a/src/main/java/gtPlusPlus/xmod/bop/blocks/BOPBlockRegistrator.java b/src/main/java/gtPlusPlus/xmod/bop/blocks/BOPBlockRegistrator.java index 0cb1852dee1..7d4275e0c56 100644 --- a/src/main/java/gtPlusPlus/xmod/bop/blocks/BOPBlockRegistrator.java +++ b/src/main/java/gtPlusPlus/xmod/bop/blocks/BOPBlockRegistrator.java @@ -1,25 +1,11 @@ package gtPlusPlus.xmod.bop.blocks; -import static gregtech.api.recipe.RecipeMaps.cutterRecipes; -import static gregtech.api.util.GTRecipeBuilder.SECONDS; -import static gregtech.loaders.oreprocessing.ProcessingLog.addPyrolyeOvenRecipes; - import net.minecraft.block.Block; import net.minecraft.init.Blocks; -import net.minecraft.init.Items; -import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import gregtech.GTMod; -import gregtech.api.enums.GTValues; -import gregtech.api.enums.Materials; -import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GTModHandler; -import gregtech.api.util.GTOreDictUnificator; -import gregtech.api.util.GTUtility; -import gtPlusPlus.core.recipe.common.CI; +import cpw.mods.fml.common.registry.GameRegistry; import gtPlusPlus.core.util.minecraft.ItemUtils; -import gtPlusPlus.core.util.minecraft.RecipeUtils; import gtPlusPlus.xmod.bop.blocks.pine.LeavesPineTree; import gtPlusPlus.xmod.bop.blocks.pine.LogPineTree; import gtPlusPlus.xmod.bop.blocks.pine.SaplingPineTree; @@ -62,111 +48,15 @@ private static void registerTree_Pine() { public static void recipes() { // Rainforest Oak - addLogRecipes(ItemUtils.getSimpleStack(log_Rainforest)); + addRecipeLogsToPlanks(ItemUtils.getSimpleStack(log_Rainforest)); // Pine - addLogRecipes(ItemUtils.getSimpleStack(log_Pine)); + addRecipeLogsToPlanks(ItemUtils.getSimpleStack(log_Pine)); } - public static void addLogRecipes(final ItemStack aStack) { - RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[] { aStack }, - ItemUtils - .getSimpleStack(Item.getItemFromBlock(Blocks.planks), GTMod.gregtechproxy.mNerfedWoodPlank ? 2 : 4)); - RecipeUtils.recipeBuilder( - CI.craftingToolSaw, - null, - null, - aStack, - null, - null, - null, - null, - null, - ItemUtils.getSimpleStack(Item.getItemFromBlock(Blocks.planks), 4)); - GTModHandler.addCraftingRecipe( - GTOreDictUnificator.get(OrePrefixes.stickLong, Materials.Wood, 2L), - GTModHandler.RecipeBits.DO_NOT_CHECK_FOR_COLLISIONS | GTModHandler.RecipeBits.BUFFERED, - new Object[] { "sLf", 'L', GTUtility.copyAmount(1L, aStack) }); - - final short aMeta = (short) aStack.getItemDamage(); - if (GTUtility.areStacksEqual( - GTModHandler.getSmeltingOutput(GTUtility.copyAmount(1L, aStack), false, null), - new ItemStack(Items.coal, 1, 1))) { - addPyrolyeOvenRecipes(aStack); - GTModHandler.removeFurnaceSmelting(GTUtility.copyAmount(1L, aStack)); - } - if (aMeta == 32767) { - for (int i = 0; i < 32767; ++i) { - if (GTUtility.areStacksEqual( - GTModHandler.getSmeltingOutput(new ItemStack(aStack.getItem(), 1, i), false, null), - new ItemStack(Items.coal, 1, 1))) { - addPyrolyeOvenRecipes(aStack); - GTModHandler.removeFurnaceSmelting(new ItemStack(aStack.getItem(), 1, i)); - } - final ItemStack tStack = GTModHandler.getRecipeOutput(new ItemStack(aStack.getItem(), 1, i)); - if (tStack == null) { - if (i >= 16) { - break; - } - } else { - final ItemStack tPlanks = GTUtility.copy(tStack); - tPlanks.stackSize = tPlanks.stackSize * 3 / 2; - GTValues.RA.stdBuilder() - .itemInputs(new ItemStack(aStack.getItem(), 1, i)) - .itemOutputs( - GTUtility.copyAmount( - GTMod.gregtechproxy.mNerfedWoodPlank ? ((long) tStack.stackSize) - : (((long) tStack.stackSize) * 5L / 4), - tStack), - GTOreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L)) - .duration(10 * SECONDS) - .eut(8) - .addTo(cutterRecipes); - GTModHandler.removeRecipe(new ItemStack(aStack.getItem(), 1, i)); - GTModHandler.addCraftingRecipe( - GTUtility.copyAmount( - GTMod.gregtechproxy.mNerfedWoodPlank ? ((long) tStack.stackSize) - : (((long) tStack.stackSize) * 5L / 4), - tStack), - new Object[] { "s", "L", 'L', new ItemStack(aStack.getItem(), 1, i) }); - GTModHandler.addShapelessCraftingRecipe( - GTUtility.copyAmount(tStack.stackSize / (GTMod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack), - new Object[] { new ItemStack(aStack.getItem(), 1, i) }); - } - } - } else { - final ItemStack tStack2 = GTModHandler.getRecipeOutput(GTUtility.copyAmount(1L, aStack)); - if (tStack2 != null) { - final ItemStack tPlanks2 = GTUtility.copy(tStack2); - tPlanks2.stackSize = tPlanks2.stackSize * 3 / 2; - GTValues.RA.stdBuilder() - .itemInputs(GTUtility.copyAmount(1L, aStack)) - .itemOutputs( - GTUtility.copyAmount( - GTMod.gregtechproxy.mNerfedWoodPlank ? ((long) tStack2.stackSize) - : (((long) tStack2.stackSize) * 5L / 4), - tStack2), - GTOreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 2L)) - .duration(10 * SECONDS) - .eut(8) - .addTo(cutterRecipes); - GTModHandler.removeRecipe(GTUtility.copyAmount(1L, aStack)); - GTModHandler.addCraftingRecipe( - GTUtility.copyAmount( - GTMod.gregtechproxy.mNerfedWoodPlank ? ((long) tStack2.stackSize) - : (((long) tStack2.stackSize) * 5L / 4), - tStack2), - new Object[] { "s", "L", 'L', GTUtility.copyAmount(1L, aStack) }); - GTModHandler.addShapelessCraftingRecipe( - GTUtility.copyAmount(tStack2.stackSize / (GTMod.gregtechproxy.mNerfedWoodPlank ? 2 : 1), tStack2), - new Object[] { GTUtility.copyAmount(1L, aStack) }); - } - } - if (GTUtility.areStacksEqual( - GTModHandler.getSmeltingOutput(GTUtility.copyAmount(1L, aStack), false, null), - new ItemStack(Items.coal, 1, 1))) { - addPyrolyeOvenRecipes(aStack); - GTModHandler.removeFurnaceSmelting(GTUtility.copyAmount(1L, aStack)); - } + public static void addRecipeLogsToPlanks(ItemStack aStack) { + // add normal recipes like vanilla, so oredict recipe handlers will add recipes from logs to planks. + // other recipes are also processed by oredict recipe handlers. + GameRegistry.addShapelessRecipe(new ItemStack(Blocks.planks, 4), aStack); } + } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/HandlerGT.java b/src/main/java/gtPlusPlus/xmod/gregtech/HandlerGT.java index c42061478db..15ed5c2abc0 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/HandlerGT.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/HandlerGT.java @@ -22,6 +22,7 @@ import gtPlusPlus.xmod.gregtech.loaders.misc.AddCustomMachineToPA; import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoaderMolecularTransformer; import gtPlusPlus.xmod.gregtech.loaders.recipe.RecipeLoaderTreeFarm; +import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechAdvancedBoilers; import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits; public class HandlerGT { @@ -61,6 +62,7 @@ public static void postInit() { // Add recipes CokeAndPyrolyseOven.postInit(); + GregtechAdvancedBoilers.addRecipes(); // Register custom singles to the PA AddCustomMachineToPA.register(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IToolStats.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IToolStats.java index 1a61814f559..5e37c0cb649 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IToolStats.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IToolStats.java @@ -156,7 +156,7 @@ public interface IToolStats extends gregtech.api.interfaces.IToolStats { * check. */ @Override - boolean isMinableBlock(Block aBlock, byte aMetaData); + boolean isMinableBlock(Block aBlock, int aMetaData); /** * This lets you modify the Drop List, when this type of Tool has been used. @@ -165,7 +165,7 @@ public interface IToolStats extends gregtech.api.interfaces.IToolStats { */ @Override int convertBlockDrops(List aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, - int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); + int aZ, int aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent); /** * @return Returns a broken Version of the Item. diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/GTMetaTool.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/GTMetaTool.java index f47ef56e9a9..f1efe117a59 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/items/GTMetaTool.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/items/GTMetaTool.java @@ -78,7 +78,7 @@ public GTMetaTool(final String aUnlocalized) { */ @Override public void onHarvestBlockEvent(final ArrayList aDrops, final ItemStack aStack, - final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, + final EntityPlayer aPlayer, final Block aBlock, final int aX, final int aY, final int aZ, final int aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { final gregtech.api.interfaces.IToolStats tStats = this.getToolStats(aStack); if (this.isItemStackUsable(aStack) && (this.getDigSpeed(aStack, aBlock, aMetaData) > 0.0F)) { @@ -441,7 +441,7 @@ public float getDigSpeed(final ItemStack aStack, final Block aBlock, final int a if ((tStats == null) || (Math.max(0, this.getHarvestLevel(aStack, "")) < aBlock.getHarvestLevel(aMetaData))) { return 0.0F; } - return tStats.isMinableBlock(aBlock, (byte) aMetaData) + return tStats.isMinableBlock(aBlock, aMetaData) ? Math.max(Float.MIN_NORMAL, tStats.getSpeedMultiplier() * getPrimaryMaterial(aStack).mToolSpeed) : 0.0F; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GTPPMultiBlockBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GTPPMultiBlockBase.java index 22f0ec2701c..94def08fabd 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GTPPMultiBlockBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GTPPMultiBlockBase.java @@ -987,7 +987,7 @@ public boolean onPlungerRightClick(EntityPlayer aPlayer, ForgeDirection side, fl @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { if (aPlayer.isSneaking()) { batchMode = !batchMode; if (batchMode) { @@ -1002,7 +1002,7 @@ public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrench @Override public boolean onSolderingToolRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { if (supportsVoidProtection() && wrenchingSide == getBaseMetaTileEntity().getFrontFacing()) { Set allowed = getAllowedVoidingModes(); setVoidingMode(getVoidingMode().nextInCollection(allowed)); @@ -1011,7 +1011,7 @@ public boolean onSolderingToolRightClick(ForgeDirection side, ForgeDirection wre StatCollector.translateToLocal("GT5U.gui.button.voiding_mode") + " " + StatCollector.translateToLocal(getVoidingMode().getTransKey())); return true; - } else return super.onSolderingToolRightClick(side, wrenchingSide, aPlayer, aX, aY, aZ); + } else return super.onSolderingToolRightClick(side, wrenchingSide, aPlayer, aX, aY, aZ, aTool); } // Only support to use meta to tier diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java index d68653e73af..63b0357d1b2 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java @@ -45,10 +45,10 @@ public GregtechMetaCasingBlocks4() { @Override public IIcon getIcon(final int ordinalSide, final int aMeta) { - return getStaticIcon((byte) ordinalSide, (byte) aMeta); + return getStaticIcon((byte) ordinalSide, aMeta); } - public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { + public static IIcon getStaticIcon(final byte aSide, final int aMeta) { // Texture ID's. case 0 == ID[57] if ((aMeta >= 0) && (aMeta < 16)) { switch (aMeta) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java index 38d9146e65d..a6ec678456b 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java @@ -86,10 +86,10 @@ public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoo @Override public IIcon getIcon(final int ordinalSide, final int aMeta) { - return getStaticIcon((byte) ordinalSide, (byte) aMeta); + return getStaticIcon((byte) ordinalSide, aMeta); } - public static IIcon getStaticIcon(final int ordinalSide, final byte aMeta) { + public static IIcon getStaticIcon(final int ordinalSide, final int aMeta) { return switch (aMeta) { case 0 -> TexturesGtBlock.Casing_Redox_1.getIcon(); case 1 -> Textures.BlockIcons.MACHINE_CASING_TURBINE_STEEL.getIcon(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java index 4f348112895..39ac2184410 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java @@ -75,15 +75,15 @@ public GregtechMetaSpecialMultiCasings2() { @SideOnly(Side.CLIENT) public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int ordinalSide) { - return getStaticIcon((byte) ordinalSide, (byte) aWorld.getBlockMetadata(xCoord, yCoord, zCoord)); + return getStaticIcon((byte) ordinalSide, aWorld.getBlockMetadata(xCoord, yCoord, zCoord)); } @Override public IIcon getIcon(final int ordinalSide, final int aMeta) { - return getStaticIcon((byte) ordinalSide, (byte) aMeta); + return getStaticIcon((byte) ordinalSide, aMeta); } - public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { + public static IIcon getStaticIcon(final byte aSide, final int aMeta) { return switch (aMeta) { case 0 -> TexturesGtBlock.Casing_Resonance_1.getIcon(); case 1 -> TexturesGtBlock.Casing_Resonance_2.getIcon(); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java index cf300f9f3d6..080ea972d6f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java @@ -133,7 +133,7 @@ public static IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final ForgeDirection side, final GregtechMetaSpecialMultiCasings i) { final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); - return GregtechMetaSpecialMultiCasings.getStaticIcon(side.ordinal(), (byte) tMeta); + return GregtechMetaSpecialMultiCasings.getStaticIcon(side.ordinal(), tMeta); } } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTEElectricAutoWorkbench.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTEElectricAutoWorkbench.java index 73233b7938f..5a9ff884c82 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTEElectricAutoWorkbench.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/MTEElectricAutoWorkbench.java @@ -700,7 +700,7 @@ private ArrayList benchContent() { @Override public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side, ItemStack aStack) { - return mMode == 0 ? aIndex >= 10 : aIndex >= 18; + return mMode == 0 ? aIndex >= 9 : aIndex >= 18; } @Override diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMolecularTransformer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMolecularTransformer.java index bf41b25802f..ecf777f08fb 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMolecularTransformer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialMolecularTransformer.java @@ -67,7 +67,7 @@ protected MultiblockTooltipBuilder createTooltip() { .beginStructureBlock(7, 7, 7, false) .addController("Top Center") .addCasingInfoMin("Robust Tungstensteel Machine Casing", 40, false) - .addCasingInfoMin("Tungstensteel Coils", 16, false) + .addCasingInfoMin("TPV-Alloy Coils", 16, false) .addCasingInfoMin("Molecular Containment Casing", 52, false) .addCasingInfoMin("High Voltage Current Capacitor", 32, false) .addCasingInfoMin("Particle Containment Casing", 4, false) diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWashPlant.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWashPlant.java index 8ce813727f2..daa8f16ddd3 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWashPlant.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/MTEIndustrialWashPlant.java @@ -313,7 +313,6 @@ public boolean checkForWater() { for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { for (int h = 0; h < 2; ++h) { Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); if (tBlock == Blocks.air || tBlock == Blocks.flowing_water || tBlock == Blocks.water) { if (this.getStoredFluids() != null) { for (FluidStack stored : this.getStoredFluids()) { diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvDistillationTower.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvDistillationTower.java index 2adf1d1dd72..3719d02bd17 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvDistillationTower.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/MTEAdvDistillationTower.java @@ -183,6 +183,8 @@ protected MultiblockTooltipBuilder createTooltip() { .addInfo("Distillery Mode: Tower Tier * (4*InputTier)") .addInfo("Distillery Mode require a full height tower") .addPollutionAmount(getPollutionPerSecond(null)) + .beginVariableStructureBlock(3, 3, 3, 12, 3, 3, true) + .addController("Front bottom") .addCasingInfoMin("Clean Stainless Steel Machine Casing", 7, false) .addInputBus("Bottom Casing", 1) .addOutputBus("Bottom Casing", 1) diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialFishingPond.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialFishingPond.java index ee84fbcd0e9..d61800b139f 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialFishingPond.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEIndustrialFishingPond.java @@ -326,7 +326,7 @@ private boolean checkForWater() { for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { for (int h = 0; h < 2; h++) { Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); if (isNotStaticWater(tBlock, tMeta)) { if (this.getStoredFluids() != null) { for (FluidStack stored : this.getStoredFluids()) { @@ -360,7 +360,7 @@ private boolean checkForWater() { return tAmount >= 60; } - private boolean isNotStaticWater(Block block, byte meta) { + private boolean isNotStaticWater(Block block, int meta) { return block == Blocks.air || block == Blocks.flowing_water || block == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater) || (cofhWater != null && cofhWater.isAssignableFrom(block.getClass()) && meta != 0); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEQuantumForceTransformer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEQuantumForceTransformer.java index d86395368f8..58525e1d806 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEQuantumForceTransformer.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/MTEQuantumForceTransformer.java @@ -553,6 +553,11 @@ private int findProgrammedCircuitNumber() { } return -1; } else { + for (ItemStack stack : inputItems) { + if (GTUtility.isAnyIntegratedCircuit(stack)) { + return stack.getItemDamage() - 1; + } + } final ItemStack controllerStack = getControllerSlot(); return GTUtility.isAnyIntegratedCircuit(controllerStack) ? controllerStack.getItemDamage() - 1 : -1; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/MTEAlgaePondBase.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/MTEAlgaePondBase.java index bbab18b73a0..3f22b85c59d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/MTEAlgaePondBase.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/MTEAlgaePondBase.java @@ -60,7 +60,6 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import ic2.core.init.BlocksItems; import ic2.core.init.InternalName; -import tectech.thing.casing.TTCasingsContainer; public class MTEAlgaePondBase extends GTPPMultiBlockBase implements ISurvivalConstructable { @@ -155,7 +154,7 @@ public IStructureDefinition getStructureDefinition() { onElementPass( x -> ++x.mCasing, addTieredBlock( - TTCasingsContainer.sBlockCasingsNH, + GregTechAPI.sBlockCasingsNH, MTEAlgaePondBase::setMeta, MTEAlgaePondBase::getMeta, 10, @@ -272,7 +271,7 @@ public boolean checkForWater() { for (int j = mOffsetZ_Lower + 1; j <= mOffsetZ_Upper - 1; ++j) { for (int h = 0; h < 2; h++) { Block tBlock = aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j); - byte tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); + int tMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + i, h, zDir + j); if (isNotStaticWater(tBlock, tMeta)) { if (this.getStoredFluids() != null) { for (FluidStack stored : this.getStoredFluids()) { @@ -311,7 +310,7 @@ public boolean checkForWater() { } } - private boolean isNotStaticWater(Block block, byte meta) { + private boolean isNotStaticWater(Block block, int meta) { return block == Blocks.air || block == Blocks.flowing_water || block == BlocksItems.getFluidBlock(InternalName.fluidDistilledWater) || (cofhWater != null && cofhWater.isAssignableFrom(block.getClass()) && meta != 0); @@ -377,7 +376,7 @@ private int getCasingTier() { aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(xDir, -1, zDir); aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir, -1, zDir); if (aInitStructureCheck == GregTechAPI.sBlockCasings1 - || aInitStructureCheck == TTCasingsContainer.sBlockCasingsNH) { + || aInitStructureCheck == GregTechAPI.sBlockCasingsNH) { return aInitStructureCheckMeta; } return 0; diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/MTEMegaAlloyBlastSmelter.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/MTEMegaAlloyBlastSmelter.java index 0d57fb78a95..af25a0feed5 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/MTEMegaAlloyBlastSmelter.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/mega/MTEMegaAlloyBlastSmelter.java @@ -306,6 +306,11 @@ protected MultiblockTooltipBuilder createTooltip() { + EnumChatFormatting.GRAY) .addPollutionAmount(getPollutionPerSecond(null)) .beginStructureBlock(11, 20, 11, false) + .addController("Mid of the fourth layer") + .addCasingInfoExactly("Blast Smelter Casing Block", 218, false) + .addCasingInfoExactly("Blast Smelter Heat Containment Coil", 56, false) + .addCasingInfoExactly("Coil", 360, true) + .addCasingInfoExactly("Borosilicate Glass", 339, true) .addMaintenanceHatch("Around the controller", 2) .addOtherStructurePart("Input Bus, Output Bus, Input Hatch, Output Bus, Energy Hatch", "Bottom Casing", 1) .addMufflerHatch("1 in the center of the top layer", 3) @@ -439,7 +444,7 @@ public final void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPla @Override public boolean onWireCutterRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { batchMode = !batchMode; if (batchMode) { GTUtility.sendChatToPlayer(aPlayer, StatCollector.translateToLocal("misc.BatchModeTextOn")); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java index 01aaf05b4f8..24b1b0ec4d1 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java @@ -172,7 +172,7 @@ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlaye private void checkMachineProblem(String msg, int xOff, int yOff, int zOff) { final IGregTechTileEntity te = this.getBaseMetaTileEntity(); final Block tBlock = te.getBlockOffset(xOff, yOff, zOff); - final byte tMeta = te.getMetaIDOffset(xOff, yOff, zOff); + final int tMeta = te.getMetaIDOffset(xOff, yOff, zOff); String name = tBlock.getLocalizedName(); String problem = msg + ": (" + xOff + ", " + yOff + ", " + zOff + ") " + name + ":" + tMeta; checkMachineProblem(problem); diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java index fceebe62d37..4e0510bf333 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/redstone/MTERedstoneCircuitBlock.java @@ -380,7 +380,7 @@ public Block getBlockAtSide(ForgeDirection side) { } @Override - public byte getMetaIDAtSide(ForgeDirection side) { + public int getMetaIDAtSide(ForgeDirection side) { return getBaseMetaTileEntity().getMetaIDAtSide(side); } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/ToolAngleGrinder.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/ToolAngleGrinder.java index f65b3162f8a..65d2fa09152 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/ToolAngleGrinder.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/ToolAngleGrinder.java @@ -115,14 +115,14 @@ public boolean isWeapon() { } @Override - public boolean isMinableBlock(final Block aBlock, final byte aMetaData) { + public boolean isMinableBlock(final Block aBlock, final int aMetaData) { final String tTool = aBlock.getHarvestTool(aMetaData); return (tTool != null) && (tTool.equals("sword") || tTool.equals("file")); } @Override public int convertBlockDrops(final List aDrops, final ItemStack aStack, final EntityPlayer aPlayer, - final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune, + final Block aBlock, final int aX, final int aY, final int aZ, final int aMetaData, final int aFortune, final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) { return 0; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoaderChemicalSkips.java b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoaderChemicalSkips.java index f998b3c765e..f3b35b7e66d 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoaderChemicalSkips.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoaderChemicalSkips.java @@ -223,7 +223,8 @@ private static void quantumTransformerRecipes() { Materials.TungstenSteel.getDust(64), Materials.Tantalum.getDust(64), Materials.Indium.getDust(64), - Materials.Niobium.getDust(64)) + Materials.Niobium.getDust(64), + MaterialsElements.getInstance().HAFNIUM.getDust(64)) .duration(20 * SECONDS) .eut(TierEU.RECIPE_UV) .metadata(QFT_FOCUS_TIER, 1) diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java index 2e076e7fbe1..18889ab0167 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechAdvancedBoilers.java @@ -3,6 +3,8 @@ import static gregtech.api.enums.MetaTileEntityIDs.Boiler_Advanced_HV; import static gregtech.api.enums.MetaTileEntityIDs.Boiler_Advanced_LV; import static gregtech.api.enums.MetaTileEntityIDs.Boiler_Advanced_MV; +import static gregtech.api.enums.Mods.IronTanks; +import static gregtech.api.util.GTModHandler.getModItem; import net.minecraft.item.ItemStack; @@ -10,10 +12,9 @@ import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.util.GTModHandler; +import gregtech.api.util.GTOreDictUnificator; import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.core.material.MaterialsAlloy; -import gtPlusPlus.core.recipe.RecipesMachineComponents; -import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.item.ModItems; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.tileentities.generators.MTEBoilerHV; import gtPlusPlus.xmod.gregtech.common.tileentities.generators.MTEBoilerLV; @@ -34,73 +35,63 @@ private static void run1() { .set(new MTEBoilerMV(Boiler_Advanced_MV.ID, "Advanced Boiler [MV]", 2).getStackForm(1L)); GregtechItemList.Boiler_Advanced_HV .set(new MTEBoilerHV(Boiler_Advanced_HV.ID, "Advanced Boiler [HV]", 3).getStackForm(1L)); + } - ItemStack chassisT1 = ItemUtils - .getItemStackWithMeta(true, "miscutils:itemBoilerChassis", "Boiler_Chassis_T1", 0, 1); - ItemStack chassisT2 = ItemUtils - .getItemStackWithMeta(true, "miscutils:itemBoilerChassis", "Boiler_Chassis_T1", 1, 1); - ItemStack chassisT3 = ItemUtils - .getItemStackWithMeta(true, "miscutils:itemBoilerChassis", "Boiler_Chassis_T1", 2, 1); - - // Make the Coil in each following recipe a hammer and a Screwdriver. + public static void addRecipes() { // Chassis Recipes GTModHandler.addCraftingRecipe( - chassisT1, - GTModHandler.RecipeBits.DISMANTLEABLE | GTModHandler.RecipeBits.NOT_REMOVABLE - | GTModHandler.RecipeBits.REVERSIBLE + new ItemStack(ModItems.itemBoilerChassis, 1, 0), + GTModHandler.RecipeBits.NOT_REMOVABLE | GTModHandler.RecipeBits.REVERSIBLE | GTModHandler.RecipeBits.BUFFERED, - new Object[] { "WCW", "GMG", "WPW", 'M', ItemList.Hull_ULV, 'P', - OrePrefixes.pipeLarge.get(Materials.Bronze), 'C', OrePrefixes.circuit.get(Materials.ULV), 'W', - OrePrefixes.plate.get(Materials.Lead), 'G', OrePrefixes.pipeSmall.get(Materials.Copper) }); - + new Object[] { "DSD", "BTB", "DSD", 'D', + GTOreDictUnificator.get(OrePrefixes.plateDouble, Materials.Lead, 1L), 'S', + GTOreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Steel, 1L), 'B', + GTOreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Bronze, 1L), 'T', + getModItem(IronTanks.ID, "silverTank", 1, 0) }); GTModHandler.addCraftingRecipe( - chassisT2, - GTModHandler.RecipeBits.DISMANTLEABLE | GTModHandler.RecipeBits.NOT_REMOVABLE - | GTModHandler.RecipeBits.REVERSIBLE + new ItemStack(ModItems.itemBoilerChassis, 1, 1), + GTModHandler.RecipeBits.NOT_REMOVABLE | GTModHandler.RecipeBits.REVERSIBLE | GTModHandler.RecipeBits.BUFFERED, - new Object[] { "WCW", "GMG", "WPW", 'M', ItemList.Hull_LV, 'P', OrePrefixes.pipeLarge.get(Materials.Steel), - 'C', OrePrefixes.circuit.get(Materials.LV), 'W', OrePrefixes.plate.get(Materials.Steel), 'G', - OrePrefixes.pipeSmall.get(Materials.Bronze) }); - + new Object[] { "DSD", "BTB", "DSD", 'D', + GTOreDictUnificator.get(OrePrefixes.plateDouble, Materials.StainlessSteel, 1L), 'S', + GTOreDictUnificator.get(OrePrefixes.pipeMedium, Materials.StainlessSteel, 1L), 'B', + GTOreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Steel, 1L), 'T', + getModItem(IronTanks.ID, "stainlesssteelTank", 1, 0) }); GTModHandler.addCraftingRecipe( - chassisT3, - GTModHandler.RecipeBits.DISMANTLEABLE | GTModHandler.RecipeBits.NOT_REMOVABLE - | GTModHandler.RecipeBits.REVERSIBLE + new ItemStack(ModItems.itemBoilerChassis, 1, 2), + GTModHandler.RecipeBits.NOT_REMOVABLE | GTModHandler.RecipeBits.REVERSIBLE | GTModHandler.RecipeBits.BUFFERED, - new Object[] { "WCW", "GMG", "WPW", 'M', ItemList.Hull_MV, 'P', - OrePrefixes.pipeLarge.get(Materials.StainlessSteel), 'C', OrePrefixes.circuit.get(Materials.MV), 'W', - OrePrefixes.plate.get(Materials.Aluminium), 'G', OrePrefixes.pipeSmall.get(Materials.Steel) }); - - ItemStack pipeTier1 = ItemUtils.getItemStackOfAmountFromOreDict(RecipesMachineComponents.pipeTier7, 1); - ItemStack pipeTier2 = ItemUtils.getItemStackOfAmountFromOreDict(RecipesMachineComponents.pipeTier8, 1); - ItemStack pipeTier3 = ItemUtils.getItemStackOfAmountFromOreDict(RecipesMachineComponents.pipeTier9, 1); + new Object[] { "DSD", "BTB", "DSD", 'D', + GTOreDictUnificator.get(OrePrefixes.plateDouble, Materials.Titanium, 1L), 'S', + GTOreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Titanium, 1L), 'B', + GTOreDictUnificator.get(OrePrefixes.pipeMedium, Materials.StainlessSteel, 1L), 'T', + getModItem(IronTanks.ID, "titaniumTank", 1, 0) }); // Boiler Recipes GTModHandler.addCraftingRecipe( - GregtechItemList.Boiler_Advanced_LV.get(1L), - GTModHandler.RecipeBits.DISMANTLEABLE | GTModHandler.RecipeBits.NOT_REMOVABLE - | GTModHandler.RecipeBits.REVERSIBLE + GregtechItemList.Boiler_Advanced_LV.get(1), + GTModHandler.RecipeBits.NOT_REMOVABLE | GTModHandler.RecipeBits.REVERSIBLE | GTModHandler.RecipeBits.BUFFERED, - new Object[] { "dCw", "WMW", "GPG", 'M', ItemList.Hull_LV, 'P', pipeTier1, 'C', - OrePrefixes.circuit.get(Materials.LV), 'W', chassisT1, 'G', OrePrefixes.gear.get(Materials.Steel) }); - + new Object[] { "EXE", "CMC", "PBP", 'E', ItemList.Electric_Pump_LV.get(1L), 'X', "circuitBasic", 'C', + new ItemStack(ModItems.itemBoilerChassis, 1, 0), 'M', ItemList.Casing_LV.get(1L), 'P', + GTOreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Steel, 1L), 'B', + ItemList.Machine_Steel_Boiler.get(1L) }); GTModHandler.addCraftingRecipe( - GregtechItemList.Boiler_Advanced_MV.get(1L), - GTModHandler.RecipeBits.DISMANTLEABLE | GTModHandler.RecipeBits.NOT_REMOVABLE - | GTModHandler.RecipeBits.REVERSIBLE + GregtechItemList.Boiler_Advanced_MV.get(1), + GTModHandler.RecipeBits.NOT_REMOVABLE | GTModHandler.RecipeBits.REVERSIBLE | GTModHandler.RecipeBits.BUFFERED, - new Object[] { "dCw", "WMW", "GPG", 'M', ItemList.Hull_MV, 'P', pipeTier2, 'C', - OrePrefixes.circuit.get(Materials.MV), 'W', chassisT2, 'G', - MaterialsAlloy.SILICON_CARBIDE.getGear(1) }); - + new Object[] { "EXE", "CMC", "PBP", 'E', ItemList.Electric_Pump_MV.get(1L), 'X', "circuitGood", 'C', + new ItemStack(ModItems.itemBoilerChassis, 1, 1), 'M', ItemList.Casing_MV.get(1L), 'P', + GTOreDictUnificator.get(OrePrefixes.pipeHuge, Materials.StainlessSteel, 1L), 'B', + ItemList.Machine_Steel_Boiler.get(1L) }); GTModHandler.addCraftingRecipe( - GregtechItemList.Boiler_Advanced_HV.get(1L), - GTModHandler.RecipeBits.DISMANTLEABLE | GTModHandler.RecipeBits.NOT_REMOVABLE - | GTModHandler.RecipeBits.REVERSIBLE + GregtechItemList.Boiler_Advanced_HV.get(1), + GTModHandler.RecipeBits.NOT_REMOVABLE | GTModHandler.RecipeBits.REVERSIBLE | GTModHandler.RecipeBits.BUFFERED, - new Object[] { "dCw", "WMW", "GPG", 'M', ItemList.Hull_HV, 'P', pipeTier3, 'C', - OrePrefixes.circuit.get(Materials.HV), 'W', chassisT3, 'G', - MaterialsAlloy.SILICON_CARBIDE.getGear(1) }); + new Object[] { "EXE", "CMC", "PBP", 'E', ItemList.Electric_Pump_HV.get(1L), 'X', "circuitAdvanced", 'C', + new ItemStack(ModItems.itemBoilerChassis, 1, 2), 'M', ItemList.Casing_HV.get(1L), 'P', + GTOreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Titanium, 1L), 'B', + ItemList.Machine_Steel_Boiler.get(1L) }); } } diff --git a/src/main/java/gtnhlanth/common/register/WerkstoffMaterialPool.java b/src/main/java/gtnhlanth/common/register/WerkstoffMaterialPool.java index 7000bf86ec4..c4cb6f459e0 100644 --- a/src/main/java/gtnhlanth/common/register/WerkstoffMaterialPool.java +++ b/src/main/java/gtnhlanth/common/register/WerkstoffMaterialPool.java @@ -225,7 +225,7 @@ public class WerkstoffMaterialPool implements Runnable { public static final Werkstoff NitratedRareEarthMonaziteConcentrate = new Werkstoff( new short[] { 250, 223, 173 }, "Nitrogenated Monazite Rare Earth Concentrate", - subscriptNumbers("??LaNd??"), + subscriptNumbers("????"), new Werkstoff.Stats(), Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable() @@ -236,7 +236,7 @@ public class WerkstoffMaterialPool implements Runnable { public static final Werkstoff NitricMonaziteLeachedConcentrate = new Werkstoff( new short[] { 244, 202, 22 }, "Nitric Monazite Leached Concentrate", - subscriptNumbers("??LaNd??"), + subscriptNumbers("????"), new Werkstoff.Stats(), Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable() @@ -416,7 +416,7 @@ public class WerkstoffMaterialPool implements Runnable { public static final Werkstoff SamaricResidue = new Werkstoff( new short[] { 248, 243, 231 }, "Samaric Residue", - subscriptNumbers("??SmGd??"), + subscriptNumbers("Sm2Gd"), new Werkstoff.Stats(), Werkstoff.Types.MIXTURE, new Werkstoff.GenerationFeatures().disable() diff --git a/src/main/java/gtnhlanth/common/tileentity/MTEDigester.java b/src/main/java/gtnhlanth/common/tileentity/MTEDigester.java index e8d673debe0..fce9adffcf2 100644 --- a/src/main/java/gtnhlanth/common/tileentity/MTEDigester.java +++ b/src/main/java/gtnhlanth/common/tileentity/MTEDigester.java @@ -209,7 +209,12 @@ protected MultiblockTooltipBuilder createTooltip() { .addInfo("Input ores and fluid, output water.") .addInfo("Performs perfect overclocks") .addPollutionAmount(getPollutionPerSecond(null)) + .beginStructureBlock(7, 7, 4, true) .addController("Front bottom") + .addCasingInfoExactly("Robust Tungstensteel Machine Casing", 52, false) + .addCasingInfoExactly("Heat Proof Machine Casing", 16, false) + .addCasingInfoExactly("Clean Stainless Steel Machine Casing", 9, false) + .addCasingInfoExactly("Coil", 16, true) .addInputHatch("Hint block with dot 1") .addInputBus("Hint block with dot 1") .addOutputHatch("Hint block with dot 1") diff --git a/src/main/java/gtnhlanth/common/tileentity/MTEDissolutionTank.java b/src/main/java/gtnhlanth/common/tileentity/MTEDissolutionTank.java index 59b76c502ba..d6964edcf33 100644 --- a/src/main/java/gtnhlanth/common/tileentity/MTEDissolutionTank.java +++ b/src/main/java/gtnhlanth/common/tileentity/MTEDissolutionTank.java @@ -239,7 +239,11 @@ protected MultiblockTooltipBuilder createTooltip() { tt.addMachineType("Dissolution Tank") .addInfo("Input Water and Fluid, output Fluid") .addInfo("You must input the Fluids at the correct Ratio") + .beginStructureBlock(5, 5, 5, true) .addController("Front bottom") + .addCasingInfoExactly("Clean Stainless Steel Machine Casing", 42, false) + .addCasingInfoExactly("Titanium Reinforced Borosilicate Glass", 24, false) + .addCasingInfoExactly("Heat Proof Machine Casing", 9, false) .addInputHatch("Hint block with dot 1") .addInputBus("Hint block with dot 1") .addOutputHatch("Hint block with dot 1") diff --git a/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java b/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java index 8fb3a54e921..fa760dda9df 100644 --- a/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java +++ b/src/main/java/gtnhlanth/common/tileentity/MTELINAC.java @@ -25,6 +25,8 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import org.jetbrains.annotations.NotNull; + import com.gtnewhorizon.structurelib.StructureLib; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -40,6 +42,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase; import gregtech.api.metatileentity.implementations.MTEHatchEnergy; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; @@ -246,8 +250,9 @@ private boolean addBeamLineOutputHatch(IGregTechTileEntity te, int casingIndex) return false; } + @NotNull @Override - public boolean checkRecipe(ItemStack itemStack) { + public CheckRecipeResult checkProcessing() { float tempFactor = 0; // Focus as determined by multi properties @@ -277,7 +282,7 @@ public boolean checkRecipe(ItemStack itemStack) { if (tFluidInputs.isEmpty()) { this.doRandomMaintenanceDamage(); // Penalise letting coolant run dry this.stopMachine(SimpleShutDownReason.ofCritical("gtnhlanth.nocoolant")); - return false; + return CheckRecipeResultRegistry.NO_RECIPE; } // Coolant input @@ -291,12 +296,12 @@ public boolean checkRecipe(ItemStack itemStack) { this.mEfficiencyIncrease = 10000; if (this.getInputInformation() == null) { - return false; + return CheckRecipeResultRegistry.NO_RECIPE; } if (this.getInputInformation() .getEnergy() == 0) { - return false; + return CheckRecipeResultRegistry.NO_RECIPE; } particleId = this.getInputInformation() @@ -305,7 +310,7 @@ public boolean checkRecipe(ItemStack itemStack) { if (!inputParticle.canAccelerate()) { stopMachine(SimpleShutDownReason.ofCritical("gtnhlanth.noaccel")); - return false; + return CheckRecipeResultRegistry.NO_RECIPE; } mMaxProgresstime = 1 * TickTime.SECOND; @@ -364,7 +369,7 @@ public boolean checkRecipe(ItemStack itemStack) { if (Util.coolantFluidCheck(primFluid, fluidConsumed)) { this.stopMachine(SimpleShutDownReason.ofCritical("gtnhlanth.inscoolant")); - return false; + return CheckRecipeResultRegistry.NO_RECIPE; } @@ -374,17 +379,17 @@ public boolean checkRecipe(ItemStack itemStack) { primFluid.getFluid() .getName()); - if (Objects.isNull(fluidOutput)) return false; + if (Objects.isNull(fluidOutput)) return CheckRecipeResultRegistry.NO_RECIPE; FluidStack fluidOutputStack = new FluidStack(fluidOutput, fluidConsumed); - if (Objects.isNull(fluidOutputStack)) return false; + if (Objects.isNull(fluidOutputStack)) return CheckRecipeResultRegistry.NO_RECIPE; this.addFluidOutputs(new FluidStack[] { fluidOutputStack }); outputAfterRecipe(); - return true; + return CheckRecipeResultRegistry.SUCCESSFUL; } private void outputAfterRecipe() { @@ -402,18 +407,7 @@ private void outputAfterRecipe() { } @Override - public void stopMachine() { - - outputFocus = 0; - outputEnergy = 0; - outputParticle = 0; - outputRate = 0; - machineTemp = 0; - super.stopMachine(); - } - - @Override - public void stopMachine(ShutDownReason reason) { + public void stopMachine(@NotNull ShutDownReason reason) { outputFocus = 0; outputEnergy = 0; diff --git a/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java b/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java index 5c69bae5a8f..4e05e4220ea 100644 --- a/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java +++ b/src/main/java/gtnhlanth/common/tileentity/MTESourceChamber.java @@ -22,6 +22,8 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; +import org.jetbrains.annotations.NotNull; + import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; import com.gtnewhorizon.structurelib.structure.ISurvivalBuildEnvironment; @@ -35,9 +37,12 @@ import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase; import gregtech.api.metatileentity.implementations.MTEHatchEnergy; import gregtech.api.recipe.RecipeMap; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; +import gregtech.api.util.shutdown.ShutDownReason; import gregtech.api.util.shutdown.SimpleShutDownReason; import gtnhlanth.common.beamline.BeamInformation; import gtnhlanth.common.beamline.BeamLinePacket; @@ -155,8 +160,9 @@ private boolean addBeamLineOutputHatch(IGregTechTileEntity te, int casingIndex) return false; } + @NotNull @Override - public boolean checkRecipe(ItemStack itemStack) { + public CheckRecipeResult checkProcessing() { // No input particle, so no input quantities @@ -176,15 +182,17 @@ public boolean checkRecipe(ItemStack itemStack) { .voltage(tVoltageActual) .find(); - if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, new FluidStack[] {}, tItems)) return false; // Consumes - // input - // item + if (tRecipe == null || !tRecipe.isRecipeInputEqual(true, new FluidStack[] {}, tItems)) { + return CheckRecipeResultRegistry.NO_RECIPE; // Consumes input item + } this.mEfficiency = (10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; this.mMaxProgresstime = tRecipe.mDuration; - if (mMaxProgresstime == Integer.MAX_VALUE - 1 && this.mEUt == Integer.MAX_VALUE - 1) return false; + if (mMaxProgresstime == Integer.MAX_VALUE - 1 && this.mEUt == Integer.MAX_VALUE - 1) { + return CheckRecipeResultRegistry.NO_RECIPE; + } mEUt = (int) -tVoltageActual; if (this.mEUt > 0) this.mEUt = (-this.mEUt); @@ -203,7 +211,7 @@ public boolean checkRecipe(ItemStack itemStack) { if (outputEnergy <= 0) { stopMachine(SimpleShutDownReason.ofCritical("gtnhlanth.scerror")); - return false; + return CheckRecipeResultRegistry.NO_RECIPE; } outputFocus = tRecipe.focus; @@ -214,7 +222,7 @@ public boolean checkRecipe(ItemStack itemStack) { outputAfterRecipe(); - return true; + return CheckRecipeResultRegistry.SUCCESSFUL; } @Override @@ -238,12 +246,12 @@ private void outputAfterRecipe() { } @Override - public void stopMachine() { + public void stopMachine(@NotNull ShutDownReason reason) { outputFocus = 0; outputEnergy = 0; outputParticle = 0; outputRate = 0; - super.stopMachine(); + super.stopMachine(reason); } @Override diff --git a/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java b/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java index 2d8f0c2f08f..c9e0cf75b96 100644 --- a/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java +++ b/src/main/java/gtnhlanth/common/tileentity/MTESynchrotron.java @@ -28,6 +28,8 @@ import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; +import org.jetbrains.annotations.NotNull; + import com.google.common.collect.ImmutableMap; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; import com.gtnewhorizon.structurelib.structure.IStructureDefinition; @@ -44,6 +46,8 @@ import gregtech.api.metatileentity.implementations.MTEExtendedPowerMultiBlockBase; import gregtech.api.metatileentity.implementations.MTEHatch; import gregtech.api.metatileentity.implementations.MTEHatchEnergy; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.ExoticEnergyInputHelper; import gregtech.api.util.GTUtility; @@ -445,7 +449,7 @@ public class MTESynchrotron extends MTEExtendedPowerMultiBlockBase getRecipeMap() { return BeamlineRecipeAdder2.instance.TargetChamberRecipes; } + @NotNull @Override - public boolean checkRecipe(ItemStack itemStack) { + public CheckRecipeResult checkProcessing() { inputEnergy = 0; inputRate = 0; @@ -270,27 +276,29 @@ public boolean checkRecipe(ItemStack itemStack) { && !(inputInfo.getEnergy() < recipeTc.minEnergy || inputInfo.getEnergy() > recipeTc.maxEnergy)); }) + .cachedRecipe(this.lastRecipe) .find(); - if (tRecipe == null) return false; + if (tRecipe == null) return CheckRecipeResultRegistry.NO_RECIPE; BeamInformation inputInfo = this.getInputInformation(); - if (inputInfo == null) return false; + if (inputInfo == null) return CheckRecipeResultRegistry.NO_RECIPE; inputEnergy = inputInfo.getEnergy(); inputRate = inputInfo.getRate(); inputParticle = inputInfo.getParticleId(); inputFocus = inputInfo.getFocus(); - if (inputEnergy < tRecipe.minEnergy || inputEnergy > tRecipe.maxEnergy) return false; + if (inputEnergy < tRecipe.minEnergy || inputEnergy > tRecipe.maxEnergy) + return CheckRecipeResultRegistry.NO_RECIPE; - if (inputFocus < tRecipe.minFocus) return false; + if (inputFocus < tRecipe.minFocus) return CheckRecipeResultRegistry.NO_RECIPE; - if (inputParticle != tRecipe.particleId) return false; + if (inputParticle != tRecipe.particleId) return CheckRecipeResultRegistry.NO_RECIPE; if (tRecipe.focusItem != null) { - if (tRecipe.focusItem.getItem() != tFocusItem.getItem()) return false; + if (tRecipe.focusItem.getItem() != tFocusItem.getItem()) return CheckRecipeResultRegistry.NO_RECIPE; } int focusDurabilityDepletion = 1; @@ -321,13 +329,16 @@ public boolean checkRecipe(ItemStack itemStack) { // over the rate. E.g., 100a, 10r // would equal 50 seconds - if (this.mMaxProgresstime == Integer.MAX_VALUE - 1 && this.mEUt == Integer.MAX_VALUE - 1) return false; + if (this.mMaxProgresstime == Integer.MAX_VALUE - 1 && this.mEUt == Integer.MAX_VALUE - 1) + return CheckRecipeResultRegistry.NO_RECIPE; double maxParallel = tRecipe .maxParallelCalculatedByInputs(batchAmount, new FluidStack[] {}, tItemsWithFocusItemArray); if (maxParallel < 1) // Insufficient items - return false; + return CheckRecipeResultRegistry.NO_RECIPE; + + if (!tRecipe.equals(this.lastRecipe)) this.lastRecipe = tRecipe; if (batchAmount > maxParallel) batchAmount = (int) maxParallel; @@ -358,7 +369,7 @@ public boolean checkRecipe(ItemStack itemStack) { this.updateSlots(); - return true; + return CheckRecipeResultRegistry.SUCCESSFUL; } private BeamInformation getInputInformation() { @@ -393,6 +404,8 @@ public boolean checkMachine(IGregTechTileEntity arg0, ItemStack arg1) { mInputBeamline.clear(); mInputFocus.clear(); + this.lastRecipe = null; + if (!checkPiece("base", 2, 4, 0)) return false; return this.mInputBeamline.size() == 1 && this.mMaintenanceHatches.size() == 1 diff --git a/src/main/java/kekztech/common/blocks/BlockTFFTStorageField.java b/src/main/java/kekztech/common/blocks/BlockTFFTStorageField.java index 47e4cf57c67..bf9f0e20d97 100644 --- a/src/main/java/kekztech/common/blocks/BlockTFFTStorageField.java +++ b/src/main/java/kekztech/common/blocks/BlockTFFTStorageField.java @@ -13,10 +13,7 @@ import net.minecraft.util.ResourceLocation; import cpw.mods.fml.common.registry.GameRegistry; -import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GTUtility; import kekztech.KekzCore; import kekztech.common.itemBlocks.ItemBlockTFFTStorageField; import kekztech.common.tileentities.MTETankTFFT; @@ -47,13 +44,6 @@ public ResourceLocation getTextureFile() { } } - // I guess glodblock won't mind - static { - GTUtility.addTexturePage((byte) 12); - Textures.BlockIcons - .setCasingTexture((byte) 12, (byte) 127, TextureFactory.of(BlockTFFTStorageField.TFFTCasingIcon.INSTANCE)); - } - private BlockTFFTStorageField() { super(Material.iron); } diff --git a/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java b/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java index 4ae99ac3638..4c2da0c2a22 100644 --- a/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java +++ b/src/main/java/kekztech/common/tileentities/MTELapotronicSuperCapacitor.java @@ -42,6 +42,8 @@ import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import org.jetbrains.annotations.NotNull; + import com.google.common.collect.ImmutableList; import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.constructable.ChannelDataAccessor; @@ -77,6 +79,8 @@ import gregtech.api.metatileentity.implementations.MTEHatchDynamo; import gregtech.api.metatileentity.implementations.MTEHatchEnergy; import gregtech.api.metatileentity.implementations.MTEHatchMaintenance; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.api.util.IGTHatchAdder; @@ -552,12 +556,12 @@ public boolean isCorrectMachinePart(ItemStack stack) { } @Override - public boolean checkRecipe(ItemStack stack) { + public @NotNull CheckRecipeResult checkProcessing() { this.mProgresstime = 1; this.mMaxProgresstime = 1; this.mEUt = 0; this.mEfficiencyIncrease = 10000; - return true; + return CheckRecipeResultRegistry.SUCCESSFUL; } @Override @@ -1155,7 +1159,7 @@ && getBaseMetaTileEntity().wasShutdown())) .setTextAlignment(Alignment.CenterLeft) .setDefaultColor(COLOR_TEXT_WHITE.get()) .setEnabled(widget -> isActiveCache)) - .widget(new FakeSyncWidget.LongSyncer(() -> energyInputValues.avgLong(), val -> avgInCache = val)) + .widget(new FakeSyncWidget.LongSyncer(energyInputValues::avgLong, val -> avgInCache = val)) .widget( new TextWidget() .setStringSupplier( @@ -1167,7 +1171,7 @@ && getBaseMetaTileEntity().wasShutdown())) .setTextAlignment(Alignment.CenterLeft) .setDefaultColor(COLOR_TEXT_WHITE.get()) .setEnabled(widget -> isActiveCache)) - .widget(new FakeSyncWidget.LongSyncer(() -> energyOutputValues.avgLong(), val -> avgOutCache = val)) + .widget(new FakeSyncWidget.LongSyncer(energyOutputValues::avgLong, val -> avgOutCache = val)) .widget( new TextWidget().setStringSupplier(() -> EnumChatFormatting.WHITE + timeToCache) .setTextAlignment(Alignment.CenterLeft) @@ -1229,11 +1233,6 @@ public void loadNBTData(NBTTagCompound nbt) { super.loadNBTData(nbt); } - @Override - public boolean isGivingInformation() { - return true; - } - @Override public int getMaxEfficiency(ItemStack stack) { return 10000; diff --git a/src/main/java/kekztech/common/tileentities/MTETankTFFT.java b/src/main/java/kekztech/common/tileentities/MTETankTFFT.java index f19cd5fabfd..e9be7ea069f 100644 --- a/src/main/java/kekztech/common/tileentities/MTETankTFFT.java +++ b/src/main/java/kekztech/common/tileentities/MTETankTFFT.java @@ -33,6 +33,8 @@ import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.FluidTankInfo; +import org.jetbrains.annotations.NotNull; + import com.gtnewhorizon.structurelib.StructureLibAPI; import com.gtnewhorizon.structurelib.alignment.constructable.ChannelDataAccessor; import com.gtnewhorizon.structurelib.alignment.constructable.ISurvivalConstructable; @@ -52,6 +54,8 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase; import gregtech.api.metatileentity.implementations.MTEHatchOutput; +import gregtech.api.recipe.check.CheckRecipeResult; +import gregtech.api.recipe.check.CheckRecipeResultRegistry; import gregtech.api.render.TextureFactory; import gregtech.api.util.GTUtility; import gregtech.api.util.IGTHatchAdder; @@ -439,12 +443,13 @@ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack a } @Override - public boolean checkRecipe(ItemStack itemStack) { + public @NotNull CheckRecipeResult checkProcessing() { mEfficiency = getCurrentEfficiency(null); mEfficiencyIncrease = 10000; mEUt = this.runningCost; mMaxProgresstime = 20; + ItemStack itemStack = getControllerSlot(); this.fluidSelector = (itemStack != null && itemStack.getItem() instanceof ItemIntegratedCircuit) ? (byte) itemStack.getItemDamage() : -1; @@ -511,7 +516,7 @@ public boolean checkRecipe(ItemStack itemStack) { if (this.mEUt > 0) this.mEUt = -this.mEUt; - return true; + return CheckRecipeResultRegistry.SUCCESSFUL; } @Override @@ -589,11 +594,6 @@ public void loadNBTData(NBTTagCompound aNBT) { super.loadNBTData(aNBT); } - @Override - public boolean isGivingInformation() { - return true; - } - @Override public int getMaxEfficiency(ItemStack stack) { return 10000; diff --git a/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEExtremeEntityCrusher.java b/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEExtremeEntityCrusher.java index 4d1a31929c4..2a6e8600348 100644 --- a/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEExtremeEntityCrusher.java +++ b/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEExtremeEntityCrusher.java @@ -410,12 +410,12 @@ public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, f @Override public boolean onSolderingToolRightClick(ForgeDirection side, ForgeDirection wrenchingSide, EntityPlayer aPlayer, - float aX, float aY, float aZ) { + float aX, float aY, float aZ, ItemStack aTool) { if (wrenchingSide == getBaseMetaTileEntity().getFrontFacing()) { mAnimationEnabled = !mAnimationEnabled; GTUtility.sendChatToPlayer(aPlayer, "Animations are " + (mAnimationEnabled ? "enabled" : "disabled")); return true; - } else return super.onSolderingToolRightClick(side, wrenchingSide, aPlayer, aX, aY, aZ); + } else return super.onSolderingToolRightClick(side, wrenchingSide, aPlayer, aX, aY, aZ, aTool); } @SuppressWarnings("unused") diff --git a/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEMegaIndustrialApiary.java b/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEMegaIndustrialApiary.java index ae8ab881199..bbf71a01f6e 100644 --- a/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEMegaIndustrialApiary.java +++ b/src/main/java/kubatech/tileentity/gregtech/multiblock/MTEMegaIndustrialApiary.java @@ -162,7 +162,7 @@ public class MTEMegaIndustrialApiary extends KubaTechGTMultiBlockBase clazz = Class.forName("com.dreammaster.gthandler.casings.GT_Container_CasingsNH"); - TTCasingsContainer.sBlockCasingsNH = (Block) clazz.getField("sBlockCasingsNH") - .get(null); - - if (TTCasingsContainer.sBlockCasingsNH == null) { - throw new NullPointerException("sBlockCasingsNH Is not set at this time"); - } - } catch (Exception e) { - throw new Error("Unable to get NH casings", e); - } - } - - progressBarPostLoad.step("Recipes"); new BaseRecipeLoader().run(); TecTech.LOGGER.info("Recipe Init Done"); } diff --git a/src/main/java/tectech/thing/CustomItemList.java b/src/main/java/tectech/thing/CustomItemList.java index 5788b822591..28ba4d2a6f2 100644 --- a/src/main/java/tectech/thing/CustomItemList.java +++ b/src/main/java/tectech/thing/CustomItemList.java @@ -13,42 +13,6 @@ public enum CustomItemList implements IItemContainer { - Casing_UEV, - Casing_UIV, - Casing_UMV, - Casing_UXV, - Casing_MAXV, - Hull_UEV, - Hull_UIV, - Hull_UMV, - Hull_UXV, - Hull_MAXV, - Transformer_UEV_UHV, - Transformer_UIV_UEV, - Transformer_UMV_UIV, - Transformer_UXV_UMV, - Transformer_MAXV_UXV, - WetTransformer_LV_ULV, - WetTransformer_MV_LV, - WetTransformer_HV_MV, - WetTransformer_EV_HV, - WetTransformer_IV_EV, - WetTransformer_LuV_IV, - WetTransformer_ZPM_LuV, - WetTransformer_UV_ZPM, - WetTransformer_UHV_UV, - WetTransformer_UEV_UHV, - WetTransformer_UIV_UEV, - WetTransformer_UMV_UIV, - WetTransformer_UXV_UMV, - WetTransformer_MAXV_UXV, - - Transformer_HA_UEV_UHV, - Transformer_HA_UIV_UEV, - Transformer_HA_UMV_UIV, - Transformer_HA_UXV_UMV, - Transformer_HA_MAXV_UXV, - hatch_CreativeMaintenance, hatch_CreativeData, hatch_CreativeUncertainty, diff --git a/src/main/java/tectech/thing/casing/BlockGTCasingsNH.java b/src/main/java/tectech/thing/casing/BlockGTCasingsNH.java deleted file mode 100644 index 26c7097391a..00000000000 --- a/src/main/java/tectech/thing/casing/BlockGTCasingsNH.java +++ /dev/null @@ -1,59 +0,0 @@ -package tectech.thing.casing; - -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import gregtech.api.enums.Textures; -import gregtech.api.objects.GTCopiedBlockTexture; -import gregtech.api.util.GTLanguageManager; -import gregtech.common.blocks.BlockCasingsAbstract; -import gregtech.common.blocks.MaterialCasings; -import tectech.TecTech; -import tectech.thing.CustomItemList; - -/** - * Created by danie_000 on 03.10.2016. - */ -public class BlockGTCasingsNH extends BlockCasingsAbstract { - - public static boolean mConnectedMachineTextures = true; - - public BlockGTCasingsNH() { - super(ItemCasingsNH.class, "gt.blockcasingsNH", MaterialCasings.INSTANCE); - setCreativeTab(TecTech.creativeTabTecTech); - - for (byte b = 0; b < 16; b = (byte) (b + 1)) { - Textures.BlockIcons.casingTexturePages[8][b + 64] = new GTCopiedBlockTexture(this, 6, b); - /* IMPORTANT for block recoloring */ - } - - GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "UEV Machine Casing"); // adding - GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "UIV Machine Casing"); // adding - GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "UMV Machine Casing"); // adding - GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".13.name", "UXV Machine Casing"); // adding - GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".14.name", "MAX Machine Casing"); // adding - - CustomItemList.Casing_UEV.set(new ItemStack(this, 1, 10)); - CustomItemList.Casing_UIV.set(new ItemStack(this, 1, 11)); - CustomItemList.Casing_UMV.set(new ItemStack(this, 1, 12)); - CustomItemList.Casing_UXV.set(new ItemStack(this, 1, 13)); - CustomItemList.Casing_MAXV.set(new ItemStack(this, 1, 14)); - } - - @Override - public void registerBlockIcons(IIconRegister aIconRegister) { - // super.registerBlockIcons(aIconRegister); - } - - @Override - public IIcon getIcon(int ordinalSide, int aMeta) { - if (ordinalSide == 0) { - return tectech.thing.metaTileEntity.Textures.MACHINECASINGS_BOTTOM_TT[aMeta].getIcon(); - } - if (ordinalSide == 1) { - return tectech.thing.metaTileEntity.Textures.MACHINECASINGS_TOP_TT[aMeta].getIcon(); - } - return tectech.thing.metaTileEntity.Textures.MACHINECASINGS_SIDE_TT[aMeta].getIcon(); - } -} diff --git a/src/main/java/tectech/thing/casing/TTCasingsContainer.java b/src/main/java/tectech/thing/casing/TTCasingsContainer.java index 170439e2bc4..883ab5e4bf4 100644 --- a/src/main/java/tectech/thing/casing/TTCasingsContainer.java +++ b/src/main/java/tectech/thing/casing/TTCasingsContainer.java @@ -14,7 +14,6 @@ public final class TTCasingsContainer { public static Block sBlockCasingsBA0; - public static Block sBlockCasingsNH; public static Block TimeAccelerationFieldGenerator; public static Block SpacetimeCompressionFieldGenerators; public static Block StabilisationFieldGenerators; diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEDataBank.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEDataBank.java index 87c77e4afbe..a53d8271c71 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEDataBank.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEDataBank.java @@ -132,6 +132,10 @@ public MultiblockTooltipBuilder createTooltip() { // wireless mode .addTecTechHatchInfo() .beginStructureBlock(5, 3, 3, false) + .addController("Front center") + .addCasingInfoExactly("Computer Heat Vent", 18, false) + .addCasingInfoExactly("High Power Casing", 7, false) + .addCasingInfoMin("Computer Casing", 3, false) .addOtherStructurePart( translateToLocal("tt.keyword.Structure.DataAccessHatch"), translateToLocal("tt.keyword.Structure.AnyComputerCasing"), diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEMicrowave.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEMicrowave.java index 63be95eaa52..c6b225b976a 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEMicrowave.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEMicrowave.java @@ -37,6 +37,7 @@ import gregtech.api.util.GTUtility; import gregtech.api.util.MultiblockTooltipBuilder; import gregtech.api.util.shutdown.ShutDownReason; +import gregtech.api.util.shutdown.ShutDownReasonRegistry; import tectech.Reference; import tectech.loader.MainLoader; import tectech.recipe.TTRecipeAdder; @@ -167,34 +168,34 @@ public void outputAfterRecipe_EM() { boolean inside = true; do { - for (Object entity : mte.getWorld() + for (Entity entity : mte.getWorld() .getEntitiesWithinAABBExcludingEntity(null, aabb)) { - if (entity instanceof Entity) { - if (tickedStuff.add((Entity) entity)) { - if (inside && entity instanceof EntityItem) { - GTRecipe tRecipe = RecipeMaps.microwaveRecipes.findRecipeQuery() - .items(((EntityItem) entity).getEntityItem()) - .voltage(128) - .notUnificated(true) - .find(); - if (tRecipe == null || tRecipe.mInputs.length == 0 || tRecipe.mInputs[0].stackSize != 1) { - itemsToOutput.add(((EntityItem) entity).getEntityItem()); - } else { - ItemStack newStuff = tRecipe.getOutput(0) - .copy(); - newStuff.stackSize = ((EntityItem) entity).getEntityItem().stackSize; - itemsToOutput.add(newStuff); - } - ((EntityItem) entity).delayBeforeCanPickup = 2; - ((EntityItem) entity).setDead(); - } else if (entity instanceof EntityLivingBase) { - if (!GTUtility.isWearingFullElectroHazmat((EntityLivingBase) entity)) { - ((EntityLivingBase) entity).attackEntityFrom(MainLoader.microwaving, damagingFactor); - } + + if (tickedStuff.add(entity)) { + if (inside && entity instanceof EntityItem) { + GTRecipe tRecipe = RecipeMaps.microwaveRecipes.findRecipeQuery() + .items(((EntityItem) entity).getEntityItem()) + .voltage(128) + .notUnificated(true) + .find(); + if (tRecipe == null || tRecipe.mInputs.length == 0 || tRecipe.mInputs[0].stackSize != 1) { + itemsToOutput.add(((EntityItem) entity).getEntityItem()); + } else { + ItemStack newStuff = tRecipe.getOutput(0) + .copy(); + newStuff.stackSize = ((EntityItem) entity).getEntityItem().stackSize; + itemsToOutput.add(newStuff); + } + ((EntityItem) entity).delayBeforeCanPickup = 2; + entity.setDead(); + } else if (entity instanceof EntityLivingBase) { + if (!GTUtility.isWearingFullElectroHazmat((EntityLivingBase) entity)) { + entity.attackEntityFrom(MainLoader.microwaving, damagingFactor); } } } } + aabb.offset(xyzOffsets.get0(), xyzOffsets.get1(), xyzOffsets.get2()); aabb = aabb.expand(xyzExpansion.get0() * 1.5, xyzExpansion.get1() * 1.5, xyzExpansion.get2() * 1.5); inside = false; @@ -206,7 +207,7 @@ public void outputAfterRecipe_EM() { if (remainingTime.get() <= 0) { mte.getWorld() .playSoundEffect(xPos, yPos, zPos, Reference.MODID + ":microwave_ding", 1, 1); - stopMachine(); + stopMachine(ShutDownReasonRegistry.NONE); } } @@ -320,18 +321,8 @@ public String[] getStructureDescription(ItemStack stackSize) { return description; } - @Override - public boolean isPowerPassButtonEnabled() { - return true; - } - @Override public boolean isSafeVoidButtonEnabled() { return false; } - - @Override - public boolean isAllowedToWorkButtonEnabled() { - return true; - } } diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/MTEQuantumComputer.java b/src/main/java/tectech/thing/metaTileEntity/multi/MTEQuantumComputer.java index 7893298514b..da72e374e9e 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/MTEQuantumComputer.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/MTEQuantumComputer.java @@ -263,7 +263,7 @@ protected CheckRecipeResult checkProcessing_EM() { return SimpleCheckRecipeResult.ofFailure("no_computing"); } if (overclock.getStatus(true).isOk && overvolt.getStatus(true).isOk) { - float eut = V[7] * (float) overClockRatio * (float) overVoltageRatio; + float eut = Math.max(V[6], V[7] * (float) overClockRatio * (float) overVoltageRatio); if (eut < Integer.MAX_VALUE - 7) { mEUt = -(int) eut; } else { diff --git a/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java b/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java index 911ae722aaf..aaf223479c4 100644 --- a/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java +++ b/src/main/java/tectech/thing/metaTileEntity/multi/base/TTMultiblockBase.java @@ -671,7 +671,7 @@ public float getExcessMassPerTick_EM(ItemStack itemStack) { * should do it */ protected void notAllowedToWork_stopMachine_EM() { - stopMachine(); + stopMachine(ShutDownReasonRegistry.NONE); } /** diff --git a/src/main/resources/assets/bartworks/lang/en_US.lang b/src/main/resources/assets/bartworks/lang/en_US.lang index 4e50c9b4d53..fea705b7131 100644 --- a/src/main/resources/assets/bartworks/lang/en_US.lang +++ b/src/main/resources/assets/bartworks/lang/en_US.lang @@ -3,10 +3,18 @@ item.GT_Rockcutter_Item_LV.name=Rockcutter LV item.GT_Rockcutter_Item_MV.name=Rockcutter MV item.GT_Rockcutter_Item_HV.name=Rockcutter HV item.GT_Teslastaff_Item.name=Teslastaff +BW_ItemBlocks.name=Etched Lapis Cell BW_ItemBlocks.0.name=Etched Lapis Cell BW_ItemBlocks.1.name=Plated Lapis Cell +GT_LESU_CASING.name=LESU Casing GT_LESU_CASING.0.name=LESU Casing +bw.blockores.01.name=Ore +bw.blockores.02.name=Small Ore +bw.werkstoffblocks.01.name=Block +bw.werkstoffblockscasing.01.name=Bolted Casing +bw.werkstoffblockscasingadvanced.01.name=Rebolted Casing + GT5U.gui.text.no_imprint=Missing imprint GT5U.gui.text.not_enough_length=Multiblock Too Short GT5U.gui.text.wrong_sievert_exactly=§7Wrong sievert. Requires exactly: %s §7Sv @@ -45,12 +53,14 @@ GT5U.gui.config.general.rossruinmetas.ev.generators=Generators GT5U.gui.config.general.rossruinmetas.ev.machines=Machines itemGroup.bartworks=BartWorks Inter Temporal +BW_Machinery_Casings.name=Machine Casing BW_Machinery_Casings.0.name=Nickel-Zinc Ferrite Block BW_Machinery_Casings.1.name=Transformer-Winding Block item.BW_PaperRotor.name=Primitive Paper Rotor (Wind only) item.BW_LeatherRotor.name=Primitive Leather Rotor (Wind only) item.BW_WoolRotor.name=Primitive Wool Rotor (Wind only) item.BW_CombinedRotor.name=Combined Primitive Rotor (Wind only) +tile.BWRotorBlock.name=Primitive Kinetic Shaftbox tile.BWRotorBlock.0.name=Primitive Kinetic Shaftbox item.grindstone_top.name=Grindstone Top Piece item.grindstone_bottom.name=Grindstone Bottom Piece @@ -60,6 +70,7 @@ item.rotors.woolParts.name=Wool Covered Wood Frame item.rotors.paperParts.name=Paper Covered Wood Frame item.rotors.combinedParts.name=Multiple Material Covered Wood Frame item.BW_SimpleWindMeter.name=Simple Wind Meter +tile.BWHeatedWaterPump.name=Simple Stirling Water Pump tile.BWHeatedWaterPump.0.name=Simple Stirling Water Pump item.BWrawtube.name=Elongated Glass Tube item.BWmotor.name=Simple Stirling Motor @@ -81,6 +92,7 @@ labModule.item.PCRThermoclyclingModule.name=PCR Thermocycle Module labModule.item.PlasmidSynthesisModule.name=Plasmid Synthesis Module labModule.item.TransformationModule.name=Transformation Module labModule.item.ClonalCellularSynthesisModule.name=Clonal Cellular Synthesis Module +BW_GlasBlocks.name=Borosilicate Glass Block BW_GlasBlocks.0.name=Borosilicate Glass Block BW_GlasBlocks.1.name=Titanium Reinforced Borosilicate Glass Block BW_GlasBlocks.2.name=Tungstensteel Reinforced Borosilicate Glass Block @@ -97,6 +109,7 @@ BW_GlasBlocks.12.name=Thorium Yttrium Glass Block BW_GlasBlocks.13.name=Neutronium Reinforced Borosilicate Glass Block BW_GlasBlocks.14.name=Cosmic Neutronium Reinforced Borosilicate Glass Block BW_GlasBlocks.15.name=Infinity Reinforced Borosilicate Glass Block +BW_GlasBlocks2.name=Borosilicate Glass Block BW_GlasBlocks2.0.name=Transcendentally Reinforced Borosilicate Glass Block tooltip.glass_tier.0.name=Glass-Tier: diff --git a/src/main/resources/assets/goodgenerator/lang/en_US.lang b/src/main/resources/assets/goodgenerator/lang/en_US.lang index 0efeaac8af1..20d1aaa156d 100644 --- a/src/main/resources/assets/goodgenerator/lang/en_US.lang +++ b/src/main/resources/assets/goodgenerator/lang/en_US.lang @@ -1,24 +1,40 @@ #This is the lang file for GoodGenerator! #Blocks +MAR_Casing.name=Field Restriction Casing MAR_Casing.0.name=Field Restriction Casing +radiationProtectionSteelFrame.name=Radiation Proof Steel Frame Box radiationProtectionSteelFrame.0.name=Radiation Proof Steel Frame Box +fieldRestrictingGlass.name=Field Restriction Glass fieldRestrictingGlass.0.name=Field Restriction Glass +FRF_Coil_1.name=Field Restriction Coil FRF_Coil_1.0.name=Field Restriction Coil +FRF_Coil_2.name=Advanced Field Restriction Coil FRF_Coil_2.0.name=Advanced Field Restriction Coil +FRF_Coil_3.name=Ultimate Field Restriction Coil FRF_Coil_3.0.name=Ultimate Field Restriction Coil +FRF_Coil_4.name=Temporal Field Restriction Coil FRF_Coil_4.0.name=Temporal Field Restriction Coil +FRF_Casing.name=Naquadah Fuel Refinery Casing FRF_Casing.0.name=Naquadah Fuel Refinery Casing +rawCylinder.name=Raw Cylinder rawCylinder.0.name=Raw Cylinder +titaniumPlatedCylinder.name=Titanium Plated Cylinder titaniumPlatedCylinder.0.name=Titanium Plated Cylinder +magicCasing.name=Magic Casing magicCasing.0.name=Magic Casing +essentiaCell.name=Essentia Diffusion Cell essentiaCell.0.name=Novice Essentia Diffusion Cell essentiaCell.1.name=Adept Essentia Diffusion Cell essentiaCell.2.name=Master Essentia Diffusion Cell essentiaCell.3.name=Grandmaster Essentia Diffusion Cell +essentiaHatch.name=Essentia Input Hatch essentiaHatch.0.name=Essentia Input Hatch +speedingPipe.name=Speeding Pipe Casing speedingPipe.0.name=Speeding Pipe Casing +yottaFluidTankCasing.name=YOTTank Casing yottaFluidTankCasing.0.name=YOTTank Casing +yottaFluidTankCell.name=Fluid Cell Block yottaFluidTankCell.0.name=Fluid Cell Block T1 yottaFluidTankCell.1.name=Fluid Cell Block T2 yottaFluidTankCell.2.name=Fluid Cell Block T3 @@ -29,21 +45,30 @@ yottaFluidTankCell.6.name=Fluid Cell Block T7 yottaFluidTankCell.7.name=Fluid Cell Block T8 yottaFluidTankCell.8.name=Fluid Cell Block T9 yottaFluidTankCell.9.name=Fluid Cell Block T10 +supercriticalFluidTurbineCasing.name=SC Turbine Casing supercriticalFluidTurbineCasing.0.name=SC Turbine Casing +pressureResistantWalls.name=Pressure Resistant Wall pressureResistantWalls.0.name=Pressure Resistant Wall +impreciseUnitCasing.name=Imprecise Electronic Unit Casing impreciseUnitCasing.0.name=Imprecise Electronic Unit Casing +preciseUnitCasing.name=Precise Electronic Unit Casing preciseUnitCasing.0.name=Precise Electronic Unit Casing MK-I preciseUnitCasing.1.name=Precise Electronic Unit Casing MK-II preciseUnitCasing.2.name=Precise Electronic Unit Casing MK-III preciseUnitCasing.3.name=Precise Electronic Unit Casing MK-IV +compactFusionCoil.name=Compact Fusion Coil compactFusionCoil.0.name=Ameliorated Superconduct Coil compactFusionCoil.1.name=Compact Fusion Coil compactFusionCoil.2.name=Advanced Compact Fusion Coil compactFusionCoil.3.name=Compact Fusion Coil MK-II Prototype compactFusionCoil.4.name=Compact Fusion Coil MK-II Finaltype +essentiaFilterCasing.name=Essentia Filter Casing essentiaFilterCasing.0.name=Essentia Filter Casing +essentiaOutputHatch.name=Essentia Output Hatch essentiaOutputHatch.0.name=Essentia Output Hatch +essentiaOutputHatch_ME.name=Essentia Output Hatch (ME) essentiaOutputHatch_ME.0.name=Essentia Output Hatch (ME) +componentAssemblyLineCasing.name=Component Assembly Line Casing componentAssemblyLineCasing.0.name=Component Assembly Line Casing (LV) componentAssemblyLineCasing.1.name=Component Assembly Line Casing (MV) componentAssemblyLineCasing.2.name=Component Assembly Line Casing (HV) @@ -58,11 +83,17 @@ componentAssemblyLineCasing.10.name=Component Assembly Line Casing (UIV) componentAssemblyLineCasing.11.name=Component Assembly Line Casing (UMV) componentAssemblyLineCasing.12.name=Component Assembly Line Casing (UXV) componentAssemblyLineCasing.13.name=Component Assembly Line Casing (MAX) +magneticFluxCasing.name=Magnetic Flux Casing magneticFluxCasing.0.name=Magnetic Flux Casing +gravityStabilizationCasing.name=Gravity Stabilization Casing gravityStabilizationCasing.0.name=Gravity Stabilization Casing +antimatterContainmentCasing.name=Antimatter Containment Casing antimatterContainmentCasing.0.name=Antimatter Containment Casing +protomatterActivationCoil.name=Protomatter Activation Coil protomatterActivationCoil.0.name=Protomatter Activation Coil +antimatterAnnihilationMatrix.name=Antimatter Annihilation Matrix antimatterAnnihilationMatrix.0.name=Antimatter Annihilation Matrix +tile.gg.antimatterRender.name=Antimatter Render #Items item.radiationProtectionPlate.name=Radiation Proof Plate @@ -116,6 +147,7 @@ item.rodLiquidPlutonium.name=Fuel Rod (Excited Plutonium) item.rodLiquidPlutonium2.name=Dual Fuel Rod (Excited Plutonium) item.rodLiquidPlutonium4.name=Quad Fuel Rod (Excited Plutonium) item.advancedFuelRod.name=Advanced Fuel Rod (Empty) +item.fluidCore.name=Fluid Storage Core item.fluidCore.0.name=Fluid Storage Core T1 item.fluidCore.1.name=Fluid Storage Core T2 item.fluidCore.2.name=Fluid Storage Core T3 @@ -126,6 +158,7 @@ item.fluidCore.6.name=Fluid Storage Core T7 item.fluidCore.7.name=Fluid Storage Core T8 item.fluidCore.8.name=Fluid Storage Core T9 item.fluidCore.9.name=Fluid Storage Core T10 +item.upgradeEssentia.name=Essentia Generator item.upgradeEssentia.0.name=Essentia Generator: Empty item.upgradeEssentia.1.name=§eEssentia Generator: Air§r item.upgradeEssentia.2.name=§cEssentia Generator: Thermal§r @@ -136,14 +169,18 @@ item.upgradeEssentia.6.name=§bEssentia Generator: Mechanics§r item.upgradeEssentia.7.name=§6Essentia Generator: Spirit§r item.upgradeEssentia.8.name=§aEssentia Generator: Radiation§r item.upgradeEssentia.9.name=§3Essentia Generator: Electric§r +item.highEnergyMixture.name=High Energy Mixture item.highEnergyMixture.0.name=High Energy Mixture +item.saltyRoot.name=Salty Root item.saltyRoot.0.name=Salty Root +item.huiCircuit.name=Hi-Computation Station item.huiCircuit.0.name=Hi-Computation Station MK-I item.huiCircuit.1.name=Hi-Computation Station MK-II item.huiCircuit.2.name=Hi-Computation Station MK-III item.huiCircuit.3.name=Hi-Computation Station MK-IV Prototype item.huiCircuit.4.name=Hi-Computation Station MK-V Finaltype item.nuclearStar.name=Nuclear Star +item.circuitWrap.name=Wrap of Circuits item.circuitWrap.0.name=Wrap of ULV Circuits item.circuitWrap.1.name=Wrap of LV Circuits item.circuitWrap.2.name=Wrap of MV Circuits @@ -324,7 +361,7 @@ gui.AntimatterForge.2=Active Consumption gui.AntimatterForge.3=Antimatter Change gui.AntimatterGenerator.0=EU Produced gui.AntimatterGenerator.1=Efficiency -gt.blockmachines.LargeFusionComputerPP.cfgi.0=Batch Size +batch_mode.cfgi.0=Batch Size gt.blockmachines.YottaFluidTank.cfgi.0=Tick rate (Update I/O every x ticks) # RecipeMaps diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index 78ea8d1d537..db2397df1d6 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -10,10 +10,52 @@ itemGroup.GregTech.Materials=Materials itemGroup.GregTech.Ores=Ores item.gt.advancedsensorcard.name=GregTech Advanced Sensor Card +gt.blackholerenderer.name=Black Hole Renderer +gt.block.longdistancepipe.name=Long Distance Pipeline Pipe +gt.blockcasings.cyclotron_coils.name=Solenoid Superconductor Coil +gt.blockcasings.name=Machine Casing +gt.blockcasings2.name=Machine Casing +gt.blockcasings3.name=Machine Casing +gt.blockcasings4.name=Machine Casing +gt.blockcasings5.name=Machine Casing +gt.blockcasings6.name=Machine Casing +gt.blockcasings8.name=Machine Casing +gt.blockcasings9.name=Machine Casing +gt.blockcasings10.name=Machine Casing +gt.blockcasings11.name=Machine Casing +gt.blockcasingsNH.name=Machine Casing +gt.blockconcretes.name=Concrete +gt.blockframes.name=Frame +gt.blockgem1.name=Block +gt.blockgem2.name=Block +gt.blockgem3.name=Block +gt.blockglass1.name=Glass +gt.blockgranites.name=Granite +gt.blockmachines.name=Machine +gt.blockmetal1.name=Block +gt.blockmetal2.name=Block +gt.blockmetal3.name=Block +gt.blockmetal4.name=Block +gt.blockmetal5.name=Block +gt.blockmetal6.name=Block +gt.blockmetal7.name=Block +gt.blockmetal8.name=Block +gt.blockmetal9.name=Block +gt.blockores.name=Ore +gt.blockreinforced.name=Reinforced Block +gt.blockstones.name=Stone +gt.blocktintedglass.name=Tinted Industrial Glass +gt.wormholerenderer.name=Wormhole Renderer +item.gt.comb.name=Comb +item.gt.drop.name=Drop +item.gt.pollen.name=Pollen +item.gt.propolis.name=Propolis +tile.gt.dronerender.name=Drone Renderer GT5U.autoplace.error.no_hatch=§cSuggested to place hatch §4%s§c but none was found GT5U.autoplace.error.no_mte.id=§cSuggested to place machine with meta ID §4%s§c but none was found GT5U.autoplace.error.no_mte.class_name=§cSuggested to place machine with class name §4%d§c but none was found +GT5U.providesfullhazmatprotection=Provides full hazmat protection. # Multiblock Tooltip Builder Keywords # Context can be found in the class gregtech.api.util.MultiblockTooltipBuilder @@ -520,6 +562,7 @@ GT5U.gui.text.crash=§4Machine turned off due to crash. Refer to the log for mor GT5U.gui.text.no_fuel=§7No valid fuel found GT5U.gui.text.no_turbine=§7No valid turbine found GT5U.gui.text.no_lubricant=§7No lubricant found +GT5U.gui.text.no_coolant=§7No coolant found GT5U.gui.text.cycle_idle=§6Waiting for cycle to start GT5U.gui.text.fuel_quality_too_high=§7Fuel quality too high to run without boost GT5U.gui.text.no_data_sticks=§7No Data Sticks found @@ -1658,6 +1701,9 @@ gt.cover.info.button.tick_rate.2=Left click to increase, right click to decrease gt.cover.info.button.tick_rate.3=Hold Ctrl to adjust by more steps per click gt.cover.info.button.bounds_notification.minimum=§7 (minimum)§r gt.cover.info.button.bounds_notification.maximum=§7 (maximum)§r +gt.cover.wirelessdetector.redstone.tooltip=Changes this covers Redstone output behavior +gt.cover.wirelessdetector.redstone.0=Only a wireless signal +gt.cover.wirelessdetector.redstone.1=Wireless signal & direct Redstone gt.time.tick.singular=tick gt.time.tick.plural=ticks gt.time.second.singular=second diff --git a/src/main/resources/assets/gregtech/lang/zh_CN.lang b/src/main/resources/assets/gregtech/lang/zh_CN.lang index fa5afed4ffe..ea567d2aa03 100644 --- a/src/main/resources/assets/gregtech/lang/zh_CN.lang +++ b/src/main/resources/assets/gregtech/lang/zh_CN.lang @@ -12,6 +12,7 @@ itemGroup.GregTech.Ores=矿石 GT5U.autoplace.error.no_hatch=§c建议放置仓室 §4%s§c ,但未在库存中找到 GT5U.autoplace.error.no_mte.id=§c建议放置meta-ID为 §4%s§c 的方块,但未在库存中找到 GT5U.autoplace.error.no_mte.class_name=§c建议放置class名为 §4%d§c 的方块,但未在库存中找到 +GT5U.providesfullhazmatprotection=防化效果与单件防化服一致 # Multiblock Tooltip Builder Keywords # Context can be found in the class gregtech.api.util.GT_Multiblock_Tooltip_Builder diff --git a/src/main/resources/assets/gregtech/textures/gui/progressbar/name_remover.png b/src/main/resources/assets/gregtech/textures/gui/progressbar/name_remover.png new file mode 100644 index 00000000000..b902ddf029c Binary files /dev/null and b/src/main/resources/assets/gregtech/textures/gui/progressbar/name_remover.png differ diff --git a/src/main/resources/assets/gtnhlanth/lang/en_US.lang b/src/main/resources/assets/gtnhlanth/lang/en_US.lang index 7bc43c8d5c1..c13cecb1f4f 100644 --- a/src/main/resources/assets/gtnhlanth/lang/en_US.lang +++ b/src/main/resources/assets/gtnhlanth/lang/en_US.lang @@ -159,6 +159,7 @@ beamline.pipe.desc.1=Signal does not cross or bend tile.recipe.tc=Target Chamber tile.recipe.sc=Source Chamber +item.particle.name=Particle particle.electron=Electron particle.photon=Photon particle.alpha=Alpha diff --git a/src/main/resources/assets/kekztech/lang/en_US.lang b/src/main/resources/assets/kekztech/lang/en_US.lang index 30666033cb6..4c41a9ecfac 100644 --- a/src/main/resources/assets/kekztech/lang/en_US.lang +++ b/src/main/resources/assets/kekztech/lang/en_US.lang @@ -23,6 +23,7 @@ tile.kekztech_gdcceramicelectrolyteunit_block.name=GDC Ceramic Electrolyte Unit tile.kekztech_yszceramicelectrolyteunit_block.name=YSZ Ceramic Electrolyte Unit # -------- Fuel Cell: Crafting Components +item.kekztech_crafting_item.name=Crafting Component item.kekztech_crafting_item.9.name=YSZ Ceramic Dust item.kekztech_crafting_item.10.name=GDC Ceramic Dust item.kekztech_crafting_item.11.name=Yttria Dust @@ -32,6 +33,7 @@ item.kekztech_crafting_item.14.name=YSZ Ceramic Plate item.kekztech_crafting_item.15.name=GDC Ceramic Plate # -------- TFFT: Structure Blocks +tile.kekztech_tfftstoragefield_block.name=T.F.F.T Casing/Storage Field Block tile.kekztech_tfftstoragefield_block.0.name=T.F.F.T Casing tile.kekztech_tfftstoragefield_block.1.name=T.F.F.T Storage Field Block (Tier I) tile.kekztech_tfftstoragefield_block.2.name=T.F.F.T Storage Field Block (Tier II) @@ -50,6 +52,7 @@ tile.kekztech_tfftstoragefield_block.hint.3=Hint 3 Dot: EV+ Tier Glass, T.F.F.T tile.kekztech_tfftstoragefield_block.hint.4=Hint 4 Dot: EV+ Tier Glass # -------- Lapotronic Super Capacitor: Structure Blocks +tile.kekztech_lapotronicenergyunit_block.name=Lapotronic Casing/Capacitor tile.kekztech_lapotronicenergyunit_block.0.name=Lapotronic Super Capacitor Casing tile.kekztech_lapotronicenergyunit_block.1.name=Lapotronic Capacitor (IV) tile.kekztech_lapotronicenergyunit_block.2.name=Lapotronic Capacitor (LuV) @@ -64,6 +67,7 @@ tile.kekztech_lapotronicenergyunit_block.10.name=Mega Ultimate Capacitor (UMV) tile.kekztech_lapotronicenergyunit_block.desc=Part of the Lapotronic Super Capacitor # -------- Thaumium Reinforced Jar: Block +tile.kekztech_thaumiumreinforcedjar_block.name=Thaumium Reinforced Jar tile.kekztech_thaumiumreinforcedjar_block.0.name=Thaumium Reinforced Jar tile.kekztech_thaumiumreinforcedjar_block.3.name=Thaumium Reinforced Void Jar @@ -77,6 +81,7 @@ kekztech.research_page.THAUMIUMREINFORCEDJAR.0=You have heard your fellow Thauma kekztech.research_page.THAUMIUMREINFORCEDJAR.1=Compressing this much Essentia in such a tiny space causes some volatility. Picking up reinforced jars is probably a bad idea...

You imagine that you could get even more out of your jars if only you had some kind of material harder than even diamond or any of the other magical metal you have seen so far. # -------- Ichor Jar: Block +tile.kekztech_ichorjar_block.name=Ichor Jar tile.kekztech_ichorjar_block.0.name=Ichor Jar tile.kekztech_ichorjar_block.3.name=Ichor Void Jar diff --git a/src/main/resources/assets/kubatech/lang/en_US.lang b/src/main/resources/assets/kubatech/lang/en_US.lang index b7241bf3713..fcf0a3dfcc0 100644 --- a/src/main/resources/assets/kubatech/lang/en_US.lang +++ b/src/main/resources/assets/kubatech/lang/en_US.lang @@ -42,9 +42,11 @@ kubablock.tea_acceptor.name=§4§lTea Acceptor kubablock.tea_storage.name=§4§lTea Storage Extender #DEFC Casings +defc.casing.name=Fusion Casing defc.casing.tip=Draconic Evolution Fusion Crafter Casing, Tier %d #Items +item.kubaitems.name=Tea / Tea Leaf kubaitem.fromcollection=This item is from kubaitem.notyours=It looks like that item is not yours kubaitem.defc_schematic_t1.name=Draconic Core Schematic diff --git a/src/main/resources/assets/miscutils/lang/en_US.lang b/src/main/resources/assets/miscutils/lang/en_US.lang index 05e443640a5..8dd51ff728a 100644 --- a/src/main/resources/assets/miscutils/lang/en_US.lang +++ b/src/main/resources/assets/miscutils/lang/en_US.lang @@ -38,6 +38,7 @@ item.itemFuelRod_Uranium.name=Uranium Fuel Rod item.itemFuelRod_Plutonium.name=Plutonium Fuel Rod # Entities +item.BasicMetaSpawnEgg.name=Spawn Staballoy Construct entity.constructStaballoy.name=Staballoy Construct entity.sickBlaze.name=Infected Zealot @@ -181,6 +182,14 @@ item.itemMagnaliumRotorBlade.name=Magnalium Rotor Blade item.itemUltimetRotorBlade.name=Ultimet Blade item.itemMagnaliumShaft.name=Magnalium Shaft item.itemUltimetShaft.name=Ultimet Shaft +ic2.itemArmorHazmatChestplateEx.name=Advanced Hazmat Suit +ic2.itemArmorHazmatHelmetEx.name=Advanced Hazmat Helmet +ic2.itemArmorHazmatLeggingsEx.name=Advanced Hazmat Leggings +ic2.itemArmorRubBootsEx.name=Advanced Hazmat Boots +ic2.itemEnergeticRotor.name=Kinetic Gearbox Rotor (Energetic Alloy) +ic2.itemIridiumRotor.name=Kinetic Gearbox Rotor (Iridium) +ic2.itemTungstenSteelRotor.name=Kinetic Gearbox Rotor (TungstenSteel) +ic2.itemVibrantRotor.name=Kinetic Gearbox Rotor (Vibrant Alloy) # Misc Items @@ -188,8 +197,14 @@ item.itemPLACEHOLDER_Circuit.name=Quark Manipulator (UV) item.itemPlateEnrichedSoularium.name=Enriched Soularium Plate item.itemHeliumBlob.name=Mysterious Hydrogen Substance item.itemAlkalusDisk.name=Alkalus Disk +item.dummyResearch.name=Dummy Research +item.item.empty.name=Empty +item.itemGenericToken.name=BitCoin +item.MiscUtils.bucket.name=Bucket +item.MiscUtils.material.name=Material # Misc Blocks +tile.blockCompressedObsidian.name=Compressed Obsidian tile.blockCompressedObsidian.0.name=Compressed Obsidian (9) tile.blockCompressedObsidian.1.name=Double Compressed Obsidian (81) tile.blockCompressedObsidian.2.name=Triple Compressed Obsidian (729) @@ -202,26 +217,42 @@ tile.blockCompressedObsidian.8.name=Triple Compressed Glowstone (729) tile.blockCompressedObsidian.9.name=Quadruple Compressed Glowstone (6561) tile.blockCompressedObsidian.10.name=Quintuple Compressed Glowstone (59049) tile.blockNet.name=Net +gtplusplus.blockcasings.2.name=Machine Casing +gtplusplus.blockcasings.3.name=Machine Casing +gtplusplus.blockcasings.4.name=Machine Casing +gtplusplus.blockcasings.5.name=Machine Casing +gtplusplus.blockcasings.6.name=Machine Casing +gtplusplus.blockcasings.pipesgears.name=Machine Casing +gtplusplus.blockspecialcasings.1.name=Machine Casing +gtplusplus.blockspecialcasings.2.name=Machine Casing +gtplusplus.blockspecialcasings.3.name=Machine Casing +gtplusplus.blocktieredcasings.1.name=Machine Casing +miscutils.blockcasings.name=Machine Casing +MU-metatool.01.name=Hand Pump # Fuel Blocks +tile.blockCactusCharcoal.name=Cactus Charcoal tile.blockCactusCharcoal.0.name=Cactus Charcoal tile.blockCactusCharcoal.1.name=Compressed Cactus Charcoal tile.blockCactusCharcoal.2.name=Double Compressed Cactus Charcoal tile.blockCactusCharcoal.3.name=Triple Compressed Cactus Charcoal tile.blockCactusCharcoal.4.name=Quadruple Compressed Cactus Charcoal tile.blockCactusCharcoal.5.name=Quintuple Compressed Cactus Charcoal +tile.blockCactusCoke.name=Cactus Coke tile.blockCactusCoke.0.name=Cactus Coke tile.blockCactusCoke.1.name=Compressed Cactus Coke tile.blockCactusCoke.2.name=Double Compressed Cactus Coke tile.blockCactusCoke.3.name=Triple Compressed Cactus Coke tile.blockCactusCoke.4.name=Quadruple Compressed Cactus Coke tile.blockCactusCoke.5.name=Quintuple Compressed Cactus Coke +tile.blockSugarCharcoal.name=Sugar Charcoal tile.blockSugarCharcoal.0.name=Sugar Charcoal tile.blockSugarCharcoal.1.name=Compressed Sugar Charcoal tile.blockSugarCharcoal.2.name=Double Compressed Sugar Charcoal tile.blockSugarCharcoal.3.name=Triple Compressed Sugar Charcoal tile.blockSugarCharcoal.4.name=Quadruple Compressed Sugar Charcoal tile.blockSugarCharcoal.5.name=Quintuple Compressed Sugar Charcoal +tile.blockSugarCoke.name=Sugar Coke tile.blockSugarCoke.0.name=Sugar Coke tile.blockSugarCoke.1.name=Compressed Sugar Coke tile.blockSugarCoke.2.name=Double Compressed Sugar Coke @@ -1655,6 +1686,7 @@ item.itemDustUN32Fertiliser.name=UN-32 Fertiliser Dust item.itemDustSmallUN32Fertiliser.name=Small Pile of UN-32 Fertiliser Dust item.itemDustTinyUN32Fertiliser.name=Tiny Pile of UN-32 Fertiliser Dust item.itemCustomMetaCover.miscutils.GtMachineCasings=%s Machine Plate Cover +item.itemCustomMetaCover.miscutils.GtMachineCasings.name=Machine Plate Cover item.itemGregtechPump.tooltip.0=Cannot drain any other standard fluid container block item.itemGregtechPump.tooltip.1=Cannot be emptied via RMB, use inside a tank with GUI item.itemGregtechPump.tooltip.2=This is technically just a fancy fluid cell @@ -1837,6 +1869,7 @@ item.itemFoilUranium235.name=Uranium 235 Foil item.itemBoilerChassis_0.name=Advanced Boiler Chassis [Tier 1] item.itemDehydratorCoilWire_0.name=Coil Wire [EV] item.itemDehydratorCoil_0.name=Dehydrator Coil [EV] +item.itemAirFilter.name=Air Filter item.itemAirFilter_0.name=Air Filter item.itemAirFilter_1.name=Air Filter item.itemDragonJar.name=Dragon Capture Jar @@ -2069,6 +2102,144 @@ tile.Trinium Naquadah Carbonite Frame Box.name=Trinium Naquadah Carbonite Frame tile.Block of Quantum.name=Block of Quantum tile.Quantum Frame Box.name=Quantum Frame Box +block.AbyssalAlloy.frame.name=Abyssal Alloy Frame Box +block.AbyssalAlloy.standard.name=Block of Abyssal Alloy +block.AdvancedNitinol.standard.name=Block of Advanced Nitinol +block.AncientGranite.standard.name=Block of Ancient Granite +block.Arcanite.frame.name=Arcanite Frame Box +block.Arcanite.standard.name=Block of Arcanite +block.ArceusAlloy2B.frame.name=Arceus Alloy 2B Frame Box +block.ArceusAlloy2B.standard.name=Block of Arceus Alloy 2B +block.AstralTitanium.frame.name=Astral Titanium Frame Box +block.AstralTitanium.standard.name=Block of Astral Titanium +block.BabbitAlloy.standard.name=Block of Babbit Alloy +block.BlackMetal.frame.name=Black Metal Frame Box +block.BlackMetal.standard.name=Block of Black Metal +block.BlackTitanium.standard.name=Block of Black Titanium +block.BloodSteel.frame.name=Blood Steel Frame Box +block.BloodSteel.standard.name=Block of Blood Steel +block.Botmium.frame.name=Botmium Frame Box +block.Botmium.standard.name=Block of Botmium +block.CelestialTungsten.frame.name=Celestial Tungsten Frame Box +block.CelestialTungsten.standard.name=Block of Celestial Tungsten +block.ChromaticGlass.frame.name=Chromatic Glass Frame Box +block.ChromaticGlass.standard.name=Block of Chromatic Glass +block.CinobiteA243.frame.name=Cinobite A243 Frame Box +block.CinobiteA243.standard.name=Block of Cinobite A243 +block.Curium.standard.name=Block of Curium +block.Dragonblood.frame.name=Dragonblood Frame Box +block.Dragonblood.standard.name=Block of Dragonblood +block.EglinSteel.frame.name=Eglin Steel Frame Box +block.EglinSteel.standard.name=Block of Eglin Steel +block.EnergyCrystal.frame.name=Energy Crystal Frame Box +block.EnergyCrystal.standard.name=Block of Energy Crystal +block.Fermium.standard.name=Block of Fermium +block.Germanium.frame.name=Germanium Frame Box +block.Germanium.standard.name=Block of Germanium +block.Grisium.frame.name=Grisium Frame Box +block.Grisium.standard.name=Block of Grisium +block.HastelloyC276.frame.name=Hastelloy-C276 Frame Box +block.HastelloyC276.standard.name=Block of Hastelloy-C276 +block.HastelloyN.frame.name=Hastelloy-N Frame Box +block.HastelloyN.standard.name=Block of Hastelloy-N +block.HastelloyW.frame.name=Hastelloy-W Frame Box +block.HastelloyW.standard.name=Block of Hastelloy-W +block.HastelloyX.frame.name=Hastelloy-X Frame Box +block.HastelloyX.standard.name=Block of Hastelloy-X +block.HeLiCoPtEr.frame.name=HeLiCoPtEr Frame Box +block.HeLiCoPtEr.standard.name=Block of HeLiCoPtEr +block.HS188A.frame.name=HS188-A Frame Box +block.HS188A.standard.name=Block of HS188-A +block.Hypogen.frame.name=Hypogen Frame Box +block.Hypogen.standard.name=Block of Hypogen +block.Incoloy020.frame.name=Incoloy-020 Frame Box +block.Incoloy020.standard.name=Block of Incoloy-020 +block.IncoloyDS.frame.name=Incoloy-DS Frame Box +block.IncoloyDS.standard.name=Block of Incoloy-DS +block.IncoloyMA956.frame.name=Incoloy-MA956 Frame Box +block.IncoloyMA956.standard.name=Block of Incoloy-MA956 +block.Inconel625.frame.name=Inconel-625 Frame Box +block.Inconel625.standard.name=Block of Inconel-625 +block.Inconel690.frame.name=Inconel-690 Frame Box +block.Inconel690.standard.name=Block of Inconel-690 +block.Inconel792.frame.name=Inconel-792 Frame Box +block.Inconel792.standard.name=Block of Inconel-792 +block.Indalloy140.standard.name=Block of Indalloy 140 +block.Iodine.frame.name=Iodine Frame Box +block.Iodine.standard.name=Block of Iodine +block.LafiumCompound.frame.name=Lafium Compound Frame Box +block.LafiumCompound.standard.name=Block of Lafium Compound +block.Laurenium.frame.name=Laurenium Frame Box +block.Laurenium.standard.name=Block of Laurenium +block.Lithium7.standard.name=Block of Lithium 7 +block.MaragingSteel250.frame.name=Maraging Steel 250 Frame Box +block.MaragingSteel250.standard.name=Block of Maraging Steel 250 +block.MaragingSteel300.frame.name=Maraging Steel 300 Frame Box +block.MaragingSteel300.standard.name=Block of Maraging Steel 300 +block.MaragingSteel350.frame.name=Maraging Steel 350 Frame Box +block.MaragingSteel350.standard.name=Block of Maraging Steel 350 +block.Neptunium.standard.name=Block of Neptunium +block.NiobiumCarbide.frame.name=Niobium Carbide Frame Box +block.NiobiumCarbide.standard.name=Block of Niobium Carbide +block.Nitinol60.frame.name=Nitinol 60 Frame Box +block.Nitinol60.standard.name=Block of Nitinol 60 +block.Octiron.frame.name=Octiron Frame Box +block.Octiron.standard.name=Block of Octiron +block.Pikyonium64B.frame.name=Pikyonium 64B Frame Box +block.Pikyonium64B.standard.name=Block of Pikyonium 64B +block.Plutonium238.standard.name=Block of Plutonium-238 +block.Polonium.standard.name=Block of Polonium +block.Potin.frame.name=Potin Frame Box +block.Potin.standard.name=Block of Potin +block.Protactinium.standard.name=Block of Protactinium +block.Quantum.frame.name=Quantum Frame Box +block.Quantum.standard.name=Block of Quantum +block.Radium.standard.name=Block of Radium +block.Rhenium.frame.name=Rhenium Frame Box +block.Rhenium.standard.name=Block of Rhenium +block.Rhugnor.standard.name=Block of Rhugnor +block.Runite.standard.name=Block of Runite +block.Selenium.frame.name=Selenium Frame Box +block.Selenium.standard.name=Block of Selenium +block.SiliconCarbide.frame.name=Silicon Carbide Frame Box +block.SiliconCarbide.standard.name=Block of Silicon Carbide +block.Staballoy.frame.name=Staballoy Frame Box +block.Staballoy.standard.name=Block of Staballoy +block.Stellite.frame.name=Stellite Frame Box +block.Stellite.standard.name=Block of Stellite +block.Talonite.frame.name=Talonite Frame Box +block.Talonite.standard.name=Block of Talonite +block.Tantalloy60.frame.name=Tantalloy-60 Frame Box +block.Tantalloy60.standard.name=Block of Tantalloy-60 +block.Tantalloy61.frame.name=Tantalloy-61 Frame Box +block.Tantalloy61.standard.name=Block of Tantalloy-61 +block.TantalumCarbide.frame.name=Tantalum Carbide Frame Box +block.TantalumCarbide.standard.name=Block of Tantalum Carbide +block.Teflon.standard.name=Block of Teflon +block.Thallium.frame.name=Thallium Frame Box +block.Thallium.standard.name=Block of Thallium +block.Titansteel.frame.name=Titansteel Frame Box +block.Titansteel.standard.name=Block of Titansteel +block.TriniumNaquadahAlloy.standard.name=Block of Trinium Naquadah Alloy +block.TriniumNaquadahCarbonite.frame.name=Trinium Naquadah Carbonite Frame Box +block.TriniumNaquadahCarbonite.standard.name=Block of Trinium Naquadah Carbonite +block.TriniumTitaniumAlloy.frame.name=Trinium Titanium Alloy Frame Box +block.TriniumTitaniumAlloy.standard.name=Block of Trinium Titanium Alloy +block.Tumbaga.frame.name=Tumbaga Frame Box +block.Tumbaga.standard.name=Block of Tumbaga +block.TungstenTitaniumCarbide.frame.name=Tungsten Titanium Carbide Frame Box +block.TungstenTitaniumCarbide.standard.name=Block of Tungsten Titanium Carbide +block.Uranium232.standard.name=Block of Uranium 232 +block.Uranium233.standard.name=Block of Uranium 233 +block.WatertightSteel.frame.name=Watertight Steel Frame Box +block.WatertightSteel.standard.name=Block of Watertight Steel +block.WhiteMetal.frame.name=White Metal Frame Box +block.WhiteMetal.standard.name=Block of White Metal +block.Zeron100.frame.name=Zeron-100 Frame Box +block.Zeron100.standard.name=Block of Zeron-100 +block.ZirconiumCarbide.frame.name=Zirconium Carbide Frame Box +block.ZirconiumCarbide.standard.name=Block of Zirconium Carbide + # Ores tile.OreFluoriteF.name=Fluorite (F) Ore tile.OreCrocoite.name=Crocoite Ore @@ -2879,9 +3050,13 @@ tile.playerDoorWood.name=Wooden Auto-Door # Added 4/2/19 item.GTPP.BattPack.06.name=Charge Pack [LuV] +item.GTPP.BattPack.06.name.name=Charge Pack [LuV] item.GTPP.BattPack.07.name=Charge Pack [ZPM] +item.GTPP.BattPack.07.name.name=Charge Pack [ZPM] item.GTPP.BattPack.08.name=Charge Pack [UV] +item.GTPP.BattPack.08.name.name=Charge Pack [UV] item.GTPP.BattPack.09.name=Charge Pack [UHV] +item.GTPP.BattPack.09.name.name=Charge Pack [UHV] # Added 13/3/19 @@ -2969,6 +3144,13 @@ item.itemNuggetDragonblood.name=Shard of Dragonblood item.itemPlateDragonblood.name=Dragon Metal Plate item.itemPlateDoubleDragonblood.name=Double Dragon Metal Plate item.itemCellDragonblood.name=Dragonblood Cell +item.itemBoltDragonblood.name=Dragonblood Bolt +item.itemHotIngotDragonblood.name=Hot Dragonblood Ingot +item.itemRingDragonblood.name=Dragonblood Ring +item.itemRodDragonblood.name=Dragonblood Rod +item.itemRodLongDragonblood.name=Long Dragonblood Rod +item.itemRotorDragonblood.name=Dragonblood Rotor +item.itemScrewDragonblood.name=Dragonblood Screw tile.Block of Dragonblood.name=Block of Dragon Metal item.itemIngotBlackTitanium.name=Black Titanium Ingot @@ -3067,16 +3249,244 @@ item.itemPlateDoubleRhugnor.name=Double Rhugnor Plate item.itemCellRhugnor.name=Rhugnor Cell tile.Block of Rhugnor.name=Block of Rhugnor +item.itemCellAceticAnhydride.name=Acetic Anhydride Cell +item.itemCellChloroaceticAcid.name=Chloroacetic Acid Cell +item.itemCellChloroaceticMixture.name=Chloroacetic Mixture Cell +item.itemCellCyanoacrylatePolymer.name=Cyanoacrylate Polymer Cell +item.itemCellDichloroaceticAcid.name=Dichloroacetic Acid Cell +item.itemCellEthylCyanoacetate.name=Ethyl Cyanoacetate Cell +item.itemCellEthylCyanoacrylateSuperGlue.name=Ethyl Cyanoacrylate (Super Glue) Cell +item.itemCellFluorinatedUraniumHexafluorideFUF6.name=Fluorinated Uranium Hexafluoride (F-UF6) Cell +item.itemCellFluorineSpargedTBSalt.name=Fluorine Sparged TB Salt Cell +item.itemCellFluorineSpargedTSalt.name=Fluorine Sparged T Salt Cell +item.itemCellForce.name=Force Cell +item.itemCellHeliumSpargedUSalt.name=Helium Sparged U Salt Cell +item.itemCellHydrogenChlorideMix.name=Hydrogen Chloride Mix Cell +item.itemCellIndalloy140.name=Indalloy 140 Cell +item.itemCellLFTRFuel1.name=LFTR Fuel 1 Cell +item.itemCellLFTRFuel2.name=LFTR Fuel 2 Cell +item.itemCellLFTRFuel3.name=LFTR Fuel 3 Cell +item.itemCellLFTRFuelBase.name=LFTR Fuel Base Cell +item.itemCellLithiumTetrafluoroberyllateLFTB.name=Lithium Tetrafluoroberyllate (LFTB) Cell +item.itemCellMutatedLivingSolder.name=Mutated Living Solder Cell +item.itemCellPhosphorousUraniumHexafluoridePUF6.name=Phosphorous Uranium Hexafluoride (P-UF6) Cell +item.itemCellSolarSaltCold.name=Solar Salt (Cold) Cell +item.itemCellSolarSaltHot.name=Solar Salt (Hot) Cell +item.itemCellSolidAcidCatalystMixture.name=Solid Acid Catalyst Mixture Cell +item.itemCellStableMoltenSaltBase.name=Stable Molten Salt Base Cell +item.itemCellThoriumBerylliumDepletedMoltenSaltTBSalt.name=Thorium-Beryllium Depleted Molten Salt (TB Salt) Cell +item.itemCellThoriumDepletedMoltenSaltTSalt.name=Thorium Depleted Molten Salt (T Salt) Cell +item.itemCellTrichloroaceticAcid.name=Trichloroacetic Acid Cell +item.itemCellUraniumDepletedMoltenSaltUSalt.name=Uranium Depleted Molten Salt (U Salt) Cell + +item.itemCellPlasmaAdvancedNitinol.name=Advanced Nitinol Plasma Cell +item.itemCellPlasmaAstralTitanium.name=Astral Titanium Plasma Cell +item.itemCellPlasmaBromine.name=Bromine Plasma Cell +item.itemCellPlasmaCalifornium.name=Californium Plasma Cell +item.itemCellPlasmaCelestialTungsten.name=Celestial Tungsten Plasma Cell +item.itemCellPlasmaChromaticGlass.name=Chromatic Glass Plasma Cell +item.itemCellPlasmaCurium.name=Curium Plasma Cell +item.itemCellPlasmaDragonblood.name=Dragonblood Plasma Cell +item.itemCellPlasmaFermium.name=Fermium Plasma Cell +item.itemCellPlasmaForce.name=Force Plasma Cell +item.itemCellPlasmaGermanium.name=Germanium Plasma Cell +item.itemCellPlasmaHafnium.name=Hafnium Plasma Cell +item.itemCellPlasmaHypogen.name=Hypogen Plasma Cell +item.itemCellPlasmaIodine.name=Iodine Plasma Cell +item.itemCellPlasmaKrypton.name=Krypton Plasma Cell +item.itemCellPlasmaNeon.name=Neon Plasma Cell +item.itemCellPlasmaNeptunium.name=Neptunium Plasma Cell +item.itemCellPlasmaPlutonium238.name=Plutonium-238 Plasma Cell +item.itemCellPlasmaPolonium.name=Polonium Plasma Cell +item.itemCellPlasmaProtactinium.name=Protactinium Plasma Cell +item.itemCellPlasmaRadium.name=Radium Plasma Cell +item.itemCellPlasmaRhenium.name=Rhenium Plasma Cell +item.itemCellPlasmaRhodium.name=Rhodium Plasma Cell +item.itemCellPlasmaRhugnor.name=Rhugnor Plasma Cell +item.itemCellPlasmaRunite.name=Runite Plasma Cell +item.itemCellPlasmaRuthenium.name=Ruthenium Plasma Cell +item.itemCellPlasmaSelenium.name=Selenium Plasma Cell +item.itemCellPlasmaTechnetium.name=Technetium Plasma Cell +item.itemCellPlasmaThallium.name=Thallium Plasma Cell +item.itemCellPlasmaThorium232.name=Thorium 232 Plasma Cell +item.itemCellPlasmaUranium232.name=Uranium 232 Plasma Cell +item.itemCellPlasmaUranium233.name=Uranium 233 Plasma Cell +item.itemCellPlasmaXenon.name=Xenon Plasma Cell +item.itemCellPlasmaZirconium.name=Zirconium Plasma Cell + +item.itemDustAmmoniumNitrate.name=Ammonium Nitrate Dust +item.itemDustCopperIISulfate.name=Copper(II) Sulfate Dust +item.itemDustCopperIISulfatePentahydrate.name=Copper(II) Sulfate Pentahydrate Dust +item.itemDustCyanoaceticAcid.name=Cyanoacetic Acid Dust +item.itemDustDirt.name=Dried Earth Dust +item.itemDustFormaldehydeCatalyst.name=Formaldehyde Catalyst Dust +item.itemDustIndalloy140.name=Indalloy 140 Dust +item.itemDustLFTRFuel1.name=LFTR Fuel 1 Dust +item.itemDustLFTRFuel2.name=LFTR Fuel 2 Dust +item.itemDustLFTRFuel3.name=LFTR Fuel 3 Dust +item.itemDustManureByproducts.name=Manure Byproduct Dust +item.itemDustMixTumbaga.name=Tumbaga Mix Dust +item.itemDustOrganicFertilizer.name=Organic Fertilizer Dust +item.itemDustPotassiumNitrate.name=Potassium Nitrate Dust +item.itemDustSodiumCyanide.name=Sodium Cyanide Dust +item.itemDustSodiumFluoride.name=Sodium Fluoride Dust +item.itemDustSodiumNitrate.name=Sodium Nitrate Dust +item.itemDustStrontiumHydroxide.name=Strontium Hydroxide Dust +item.itemDustStrontiumOxide.name=Strontium Oxide Dust +item.itemDustWood'sGlass.name=Wood's Glass Dust + +item.itemDustSmallAmmoniumNitrate.name=Small Pile of Ammonium Nitrate Dust +item.itemDustSmallCopperIISulfate.name=Small Pile of Copper(II) Sulfate Dust +item.itemDustSmallCopperIISulfatePentahydrate.name=Small Pile of Copper(II) Sulfate Pentahydrate Dust +item.itemDustSmallCyanoaceticAcid.name=Small Pile of Cyanoacetic Acid Dust +item.itemDustSmallDirt.name=Small Pile of Dried Earth Dust +item.itemDustSmallFormaldehydeCatalyst.name=Small Pile of Formaldehyde Catalyst Dust +item.itemDustSmallIndalloy140.name=Small Pile of Indalloy 140 Dust +item.itemDustSmallLFTRFuel1.name=Small Pile of LFTR Fuel 1 Dust +item.itemDustSmallLFTRFuel2.name=Small Pile of LFTR Fuel 2 Dust +item.itemDustSmallLFTRFuel3.name=Small Pile of LFTR Fuel 3 Dust +item.itemDustSmallManureByproducts.name=Small Pile of Manure Byproduct Dust +item.itemDustSmallMixTumbaga.name=Small Pile of Tumbaga Mix Dust +item.itemDustSmallOrganicFertilizer.name=Small Pile of Organic Fertilizer Dust +item.itemDustSmallPotassiumNitrate.name=Small Pile of Potassium Nitrate Dust +item.itemDustSmallSodiumCyanide.name=Small Pile of Sodium Cyanide Dust +item.itemDustSmallSodiumFluoride.name=Small Pile of Sodium Fluoride Dust +item.itemDustSmallSodiumNitrate.name=Small Pile of Sodium Nitrate Dust +item.itemDustSmallStrontiumHydroxide.name=Small Pile of Strontium Hydroxide Dust +item.itemDustSmallStrontiumOxide.name=Small Pile of Strontium Oxide Dust +item.itemDustSmallWood'sGlass.name=Small Pile of Wood's Glass Dust + +item.itemDustTinyAmmoniumNitrate.name=Tiny Pile of Ammonium Nitrate Dust +item.itemDustTinyCopperIISulfate.name=Tiny Pile of Copper(II) Sulfate Dust +item.itemDustTinyCopperIISulfatePentahydrate.name=Tiny Pile of Copper(II) Sulfate Pentahydrate Dust +item.itemDustTinyCyanoaceticAcid.name=Tiny Pile of Cyanoacetic Acid Dust +item.itemDustTinyDirt.name=Tiny Pile of Dried Earth Dust +item.itemDustTinyFormaldehydeCatalyst.name=Tiny Pile of Formaldehyde Catalyst Dust +item.itemDustTinyIndalloy140.name=Tiny Pile of Indalloy 140 Dust +item.itemDustTinyLFTRFuel1.name=Tiny Pile of LFTR Fuel 1 Dust +item.itemDustTinyLFTRFuel2.name=Tiny Pile of LFTR Fuel 2 Dust +item.itemDustTinyLFTRFuel3.name=Tiny Pile of LFTR Fuel 3 Dust +item.itemDustTinyManureByproducts.name=Tiny Pile of Manure Byproduct Dust +item.itemDustTinyMixTumbaga.name=Tiny Pile of Tumbaga Mix Dust +item.itemDustTinyOrganicFertilizer.name=Tiny Pile of Organic Fertilizer Dust +item.itemDustTinyPotassiumNitrate.name=Tiny Pile of Potassium Nitrate Dust +item.itemDustTinySodiumCyanide.name=Tiny Pile of Sodium Cyanide Dust +item.itemDustTinySodiumFluoride.name=Tiny Pile of Sodium Fluoride Dust +item.itemDustTinySodiumNitrate.name=Tiny Pile of Sodium Nitrate Dust +item.itemDustTinyStrontiumHydroxide.name=Tiny Pile of Strontium Hydroxide Dust +item.itemDustTinyStrontiumOxide.name=Tiny Pile of Strontium Oxide Dust +item.itemDustTinyWood'sGlass.name=Tiny Pile of Wood's Glass Dust + +item.itemFineWireChromaticGlass.name=Fine Chromatic Glass Wire +item.itemFineWireHypogen.name=Fine Hypogen Wire + +item.itemFoilAdvancedNitinol.name=Advanced Nitinol Foil +item.itemFoilArceusAlloy2B.name=Arceus Alloy 2B Foil +item.itemFoilAstralTitanium.name=Astral Titanium Foil +item.itemFoilBlackTitanium.name=Black Titanium Foil +item.itemFoilBotmium.name=Botmium Foil +item.itemFoilCelestialTungsten.name=Celestial Tungsten Foil +item.itemFoilChromaticGlass.name=Chromatic Glass Foil +item.itemFoilCinobiteA243.name=Cinobite A243 Foil +item.itemFoilHypogen.name=Hypogen Foil +item.itemFoilLafiumCompound.name=Lafium Compound Foil +item.itemFoilLaurenium.name=Laurenium Foil +item.itemFoilNitinol60.name=Nitinol 60 Foil +item.itemFoilPikyonium64B.name=Pikyonium 64B Foil +item.itemFoilQuantum.name=Quantum Foil +item.itemFoilRhugnor.name=Rhugnor Foil +item.itemFoilTitansteel.name=Titansteel Foil +item.itemFoilWhiteMetal.name=White Metal Foil + +item.itemGearDragonblood.name=Dragonblood Gear +item.itemGearRhugnor.name=Rhugnor Gear + +item.itemIngotIndalloy140.name=Indalloy 140 Ingot + +item.itemNuggetIndalloy140.name=Indalloy 140 Nugget + +item.itemPlateDenseAbyssalAlloy.name=Dense Abyssal Alloy Plate +item.itemPlateDenseArcanite.name=Dense Arcanite Plate +item.itemPlateDenseArceusAlloy2B.name=Dense Arceus Alloy 2B Plate +item.itemPlateDenseAstralTitanium.name=Dense Astral Titanium Plate +item.itemPlateDenseBlackMetal.name=Dense Black Metal Plate +item.itemPlateDenseBloodSteel.name=Dense Blood Steel Plate +item.itemPlateDenseBotmium.name=Dense Botmium Plate +item.itemPlateDenseCelestialTungsten.name=Dense Celestial Tungsten Plate +item.itemPlateDenseChromaticGlass.name=Dense Chromatic Glass Plate +item.itemPlateDenseCinobiteA243.name=Dense Cinobite A243 Plate +item.itemPlateDenseDragonblood.name=Dense Dragonblood Plate +item.itemPlateDenseEglinSteel.name=Dense Eglin Steel Plate +item.itemPlateDenseEnergyCrystal.name=Dense Energy Crystal Plate +item.itemPlateDenseGermanium.name=Dense Germanium Plate +item.itemPlateDenseGrisium.name=Dense Grisium Plate +item.itemPlateDenseHastelloyC276.name=Dense Hastelloy-C276 Plate +item.itemPlateDenseHastelloyN.name=Dense Hastelloy-N Plate +item.itemPlateDenseHastelloyW.name=Dense Hastelloy-W Plate +item.itemPlateDenseHastelloyX.name=Dense Hastelloy-X Plate +item.itemPlateDenseHeLiCoPtEr.name=Dense HeLiCoPtEr Plate +item.itemPlateDenseHS188A.name=Dense HS188-A Plate +item.itemPlateDenseHypogen.name=Dense Hypogen Plate +item.itemPlateDenseIncoloy020.name=Dense Incoloy-020 Plate +item.itemPlateDenseIncoloyDS.name=Dense Incoloy-DS Plate +item.itemPlateDenseIncoloyMA956.name=Dense Incoloy-MA956 Plate +item.itemPlateDenseInconel625.name=Dense Inconel-625 Plate +item.itemPlateDenseInconel690.name=Dense Inconel-690 Plate +item.itemPlateDenseInconel792.name=Dense Inconel-792 Plate +item.itemPlateDenseIodine.name=Dense Iodine Plate +item.itemPlateDenseLafiumCompound.name=Dense Lafium Compound Plate +item.itemPlateDenseLaurenium.name=Dense Laurenium Plate +item.itemPlateDenseMaragingSteel250.name=Dense Maraging Steel 250 Plate +item.itemPlateDenseMaragingSteel300.name=Dense Maraging Steel 300 Plate +item.itemPlateDenseMaragingSteel350.name=Dense Maraging Steel 350 Plate +item.itemPlateDenseNiobiumCarbide.name=Dense Niobium Carbide Plate +item.itemPlateDenseNitinol60.name=Dense Nitinol 60 Plate +item.itemPlateDenseOctiron.name=Dense Octiron Plate +item.itemPlateDensePikyonium64B.name=Dense Pikyonium 64B Plate +item.itemPlateDensePotin.name=Dense Potin Plate +item.itemPlateDenseQuantum.name=Dense Quantum Plate +item.itemPlateDenseRhenium.name=Dense Rhenium Plate +item.itemPlateDenseSelenium.name=Dense Selenium Plate +item.itemPlateDenseSiliconCarbide.name=Dense Silicon Carbide Plate +item.itemPlateDenseStaballoy.name=Dense Staballoy Plate +item.itemPlateDenseStellite.name=Dense Stellite Plate +item.itemPlateDenseTalonite.name=Dense Talonite Plate +item.itemPlateDenseTantalloy60.name=Dense Tantalloy-60 Plate +item.itemPlateDenseTantalloy61.name=Dense Tantalloy-61 Plate +item.itemPlateDenseTantalumCarbide.name=Dense Tantalum Carbide Plate +item.itemPlateDenseThallium.name=Dense Thallium Plate +item.itemPlateDenseTitansteel.name=Dense Titansteel Plate +item.itemPlateDenseTriniumNaquadahCarbonite.name=Dense Trinium Naquadah Carbonite Plate +item.itemPlateDenseTriniumTitaniumAlloy.name=Dense Trinium Titanium Alloy Plate +item.itemPlateDenseTumbaga.name=Dense Tumbaga Plate +item.itemPlateDenseTungstenTitaniumCarbide.name=Dense Tungsten Titanium Carbide Plate +item.itemPlateDenseWatertightSteel.name=Dense Watertight Steel Plate +item.itemPlateDenseWhiteMetal.name=Dense White Metal Plate +item.itemPlateDenseZeron100.name=Dense Zeron-100 Plate +item.itemPlateDenseZirconiumCarbide.name=Dense Zirconium Carbide Plate + +item.itemPlateDoubleGermanium.name=Double Germanium Plate +item.itemPlateDoubleIndalloy140.name=Double Indalloy 140 Plate + +item.itemPlateIndalloy140.name=Indalloy 140 Plate + +item.itemRodLongGermanium.name=Long Germanium Rod + # Added 13/5/19 item.GTPP.BattPack.01.name=Charge Pack [LV] +item.GTPP.BattPack.01.name.name=Charge Pack [LV] item.GTPP.BattPack.02.name=Charge Pack [MV] +item.GTPP.BattPack.02.name.name=Charge Pack [MV] item.GTPP.BattPack.03.name=Charge Pack [HV] +item.GTPP.BattPack.03.name.name=Charge Pack [HV] item.GTPP.BattPack.04.name=Charge Pack [EV] +item.GTPP.BattPack.04.name.name=Charge Pack [EV] item.GTPP.BattPack.05.name=Charge Pack [IV] +item.GTPP.BattPack.05.name.name=Charge Pack [IV] item.IndustrialDiamondExquisite.name=Exquisite Industrial Diamond item.itemSpringCelestialTungsten.name=Celestial Tungsten Spring @@ -3120,6 +3530,7 @@ item.itemHeavyPlateBlackMetal.name=Heavy Black Metal Plate item.itemHeavyPlateAncientGranite.name=Heavy Ancient Granite Plate item.GTPP.bauble.fireprotection.0.name=Supreme Pizza Gloves +item.GTPP.bauble.fireprotection.0.name.name=Supreme Pizza Gloves # Added 16/5/19 @@ -3207,6 +3618,7 @@ item.ureamix.name=Cell of Urea Mix item.liquidresin.name=Cell of Liquid Resin item.propionicacid.name=Propionic Acid Cell item.aceticacid.name=Acetic Acid Cell +item.BasicAgrichemItem.name=Agrichemical Item item.BasicAgrichemItem.0.name=Algae Biomass item.BasicAgrichemItem.1.name=Green Algae Biomass item.BasicAgrichemItem.2.name=Brown Algae Biomass @@ -3257,6 +3669,7 @@ item.BasicAgrichemItem.23.name=Clean Aluminium Mix # Added 12/12/19 +item.BasicGenericChemItem.name=Metal Catalyst item.BasicGenericChemItem.0.name=Red Metal Catalyst item.BasicGenericChemItem.1.name=Yellow Metal Catalyst item.BasicGenericChemItem.2.name=Blue Metal Catalyst @@ -3270,6 +3683,7 @@ item.liquid_toluene.name=Toluene Cell item.BasicGenericChemItem.6.name=Pink Metal Catalyst # Added 23/03/20 +item.BasicMetaFood.name=Meat item.BasicMetaFood.0.name=Raw Human Meat item.BasicMetaFood.1.name=Cooked Human Meat item.BasicMetaFood.2.name=Raw Horse Meat diff --git a/src/main/resources/assets/tectech/lang/en_US.lang b/src/main/resources/assets/tectech/lang/en_US.lang index df5d9fa8166..64d7f2b145d 100644 --- a/src/main/resources/assets/tectech/lang/en_US.lang +++ b/src/main/resources/assets/tectech/lang/en_US.lang @@ -18,6 +18,11 @@ tile.reactorSim.name=Reactor Simulator tile.reactorSim.desc.0=Fission Reaction Uncertainty Resolver 9001 tile.reactorSim.desc.1=Explodes, but not as much... +gt.spacetime_compression_field_generator.name=Spacetime Compression Field Generator +gt.time_acceleration_field_generator.name=Time Dilation Field Generator + +tile.Forge of the Gods Renderer.name=Forge of the Gods Renderer + #Items item.em.programmer.name=AVR programmer item.em.programmer.desc.0=Current PC @@ -67,6 +72,7 @@ item.em.parametrizerMemoryCard.desc.1=Use on Multiblock Controller to configure item.em.parametrizerMemoryCard.desc.2=Use on Multiblock Controller to store parameters item.em.parametrizerMemoryCard.desc.3=Sneak right click to lock/unlock +item.tm.teslaCoilCapacitor.name=Tesla Capacitor item.tm.teslaCoilCapacitor.0.name=LV Tesla Capacitor item.tm.teslaCoilCapacitor.1.name=MV Tesla Capacitor item.tm.teslaCoilCapacitor.2.name=HV Tesla Capacitor @@ -80,10 +86,12 @@ item.tm.teslaCoilCapacitor.desc.2=Yeet this broken item into some spicy water! item.tm.teslaCoilCapacitor.desc.3=Insert into a Capacitor hatch of a Tesla Tower item.tm.teslaCoilCapacitor.desc.4=Capacitors are the same thing as batteries, right? +item.tm.itemTeslaComponent.name=Tesla Windings item.tm.itemTeslaComponent.0.name=Electrum Tesla Windings item.tm.itemTeslaComponent.1.name=Superconductive Tesla Windings item.tm.itemTeslaComponent.desc=Tesla bois need these! +item.tm.teslaCover.name=Tesla Coil Cover item.tm.teslaCover.0.name=Tesla Coil Cover item.tm.teslaCover.1.name=Tesla Coil Cover Rich Edition item.tm.teslaCover.desc.0=Tesla-Enables Machines! @@ -111,6 +119,8 @@ item.tm.itemAstralArrayFabricator.desc1=Device capable of enhancing the Eye of H item.tm.itemAstralArrayFabricator.desc2=reaching into the space beyond. item.tm.itemAstralArrayFabricator.desc3=Allows for recipe parallelism. +item.tm.fakeItemQGP.name=Fake Item + #Death Messages death.attack.microwaving=%1$s was dehydrated by radiation. death.attack.microwaving.player=%1$s was dehydrated by radiation while fighting %2$s. @@ -546,6 +556,7 @@ gt.blockmachines.hatch.capacitor.desc.0=For Tesla Tower gt.blockmachines.hatch.capacitor.desc.1=Stores 'nergy! (for a while) #Casings +gt.godforgecasing.name=Machine Casing gt.blockcasingsNH.10.name=UEV Machine Casing gt.blockcasingsNH.11.name=UIV Machine Casing gt.blockcasingsNH.12.name=UMV Machine Casing @@ -575,6 +586,7 @@ gt.blockhintTT.desc.4=Make sure it does not contain Air material. gt.blockhintTT.15.name=Hint error gt.blockhintTT.desc.5=ERROR, what did u expect? +gt.blockcasingsTT.name=Machine Casing gt.blockcasingsTT.0.name=High Power Casing gt.blockcasingsTT.0.desc.0=Well suited for high power applications. gt.blockcasingsTT.0.desc.1=The power levels are rising! @@ -624,6 +636,7 @@ gt.blockcasingsTT.15.name=Debug Sides gt.blockcasingsTT.15.desc.0=Lazy man way of determining sides. gt.blockcasingsTT.15.desc.1=0, 1, 2, 3, 4, 5, 6?! +gt.blockcasingsBA0.name=Primary Tesla Windings gt.blockcasingsBA0.0.name=Redstone Alloy Primary Tesla Windings gt.blockcasingsBA0.1.name=MV Superconductor Primary Tesla Windings gt.blockcasingsBA0.2.name=HV Superconductor Primary Tesla Windings