diff options
Diffstat (limited to 'src/main/java/gregtech')
40 files changed, 951 insertions, 470 deletions
diff --git a/src/main/java/gregtech/api/enums/FluidState.java b/src/main/java/gregtech/api/enums/FluidState.java index ad27047a1c..a6e81ab43d 100644 --- a/src/main/java/gregtech/api/enums/FluidState.java +++ b/src/main/java/gregtech/api/enums/FluidState.java @@ -6,5 +6,12 @@ public enum FluidState { MOLTEN, PLASMA, SLURRY; - public static final FluidState[] VALUES = new FluidState[] {SLURRY, LIQUID, GAS, PLASMA, MOLTEN}; + + public static final FluidState[] VALID_STATES = new FluidState[] {SLURRY, LIQUID, GAS, PLASMA, MOLTEN}; + + public static FluidState fromValue(int stateValue) { + return stateValue >= 0 && stateValue < FluidState.VALID_STATES.length + ? FluidState.VALID_STATES[stateValue] + : FluidState.LIQUID; + } } diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java index b94a57d360..418116297d 100644 --- a/src/main/java/gregtech/api/enums/Materials.java +++ b/src/main/java/gregtech/api/enums/Materials.java @@ -1566,8 +1566,8 @@ public class Materials implements IColorModulationContainer, ISubTagContainer { RockSalt.setOreMultiplier(2).setSmeltingMultiplier(2); Scheelite.setOreMultiplier(2).setSmeltingMultiplier(2); Tungstate.setOreMultiplier(2).setSmeltingMultiplier(2); - Cassiterite.setOreMultiplier(6).setSmeltingMultiplier(2); - CassiteriteSand.setOreMultiplier(6).setSmeltingMultiplier(2); + Cassiterite.setOreMultiplier(2).setSmeltingMultiplier(2); + CassiteriteSand.setOreMultiplier(2).setSmeltingMultiplier(2); NetherQuartz.setOreMultiplier(2).setSmeltingMultiplier(2); CertusQuartz.setOreMultiplier(2).setSmeltingMultiplier(2); TricalciumPhosphate.setOreMultiplier(3).setSmeltingMultiplier(3); diff --git a/src/main/java/gregtech/api/fluid/GT_FluidFactory.java b/src/main/java/gregtech/api/fluid/GT_FluidFactory.java index 4aa39095ec..1622aa2e05 100644 --- a/src/main/java/gregtech/api/fluid/GT_FluidFactory.java +++ b/src/main/java/gregtech/api/fluid/GT_FluidFactory.java @@ -39,9 +39,9 @@ public class GT_FluidFactory { * @param material The {@link Materials} of this {@link IGT_Fluid} * @param state The {@link FluidState} of this {@link IGT_Fluid} * @param temperature The fluid temperature in Kelvin - * @return the registered {@link IGT_Fluid} + * @return the registered {@link Fluid} */ - public static IGT_Fluid of( + public static Fluid of( final String fluidName, final String localizedName, final Materials material, @@ -51,7 +51,8 @@ public class GT_FluidFactory { .withLocalizedName(localizedName) .withStateAndTemperature(state, temperature) .buildAndRegister() - .configureMaterials(material); + .configureMaterials(material) + .asFluid(); } /** @@ -60,14 +61,15 @@ public class GT_FluidFactory { * @param localizedName The localized name of this {@link IGT_Fluid} * @param state The {@link FluidState} of this {@link IGT_Fluid} * @param temperature The fluid temperature in Kelvin - * @return the registered {@link IGT_Fluid} + * @return the registered {@link Fluid} */ - public static IGT_Fluid of( + public static Fluid of( final String fluidName, final String localizedName, final FluidState state, final int temperature) { return builder(fluidName) .withLocalizedName(localizedName) .withStateAndTemperature(state, temperature) - .buildAndRegister(); + .buildAndRegister() + .asFluid(); } /** diff --git a/src/main/java/gregtech/api/interfaces/fluid/IGT_Fluid.java b/src/main/java/gregtech/api/interfaces/fluid/IGT_Fluid.java index 5529e111bb..7c8b2b3f11 100644 --- a/src/main/java/gregtech/api/interfaces/fluid/IGT_Fluid.java +++ b/src/main/java/gregtech/api/interfaces/fluid/IGT_Fluid.java @@ -1,11 +1,5 @@ package gregtech.api.interfaces.fluid; -import gregtech.api.enums.FluidState; -import gregtech.api.enums.Materials; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.Fluid; -import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; @SuppressWarnings("unused") // API might legitimately expose unused methods within this local project's scope @@ -14,68 +8,7 @@ public interface IGT_Fluid { /** * Adds this {@link IGT_Fluid} to the {@link FluidRegistry} and internally-implemented registrations * - * @return {@link IGT_Fluid} self for call chaining + * @return {@link IGT_RegisteredFluid} The GregTech registered fluid */ - IGT_Fluid addFluid(); - - /** - * Registers the containers in the {@link FluidContainerRegistry} for this {@link IGT_Fluid} - * - * @param fullContainer The full fluid container - * @param emptyContainer The empty fluid container - * @param containerSize The size of the container - * @return The {@link IGT_Fluid} for chaining - * - * @throws IllegalStateException on attempt to register containers for an unregistered fluid - */ - IGT_Fluid registerContainers( - final ItemStack fullContainer, final ItemStack emptyContainer, final int containerSize); - - /** - * Registers the bucket-sized 1000L containers in the {@link FluidContainerRegistry} for this {@link IGT_Fluid} - * - * @param fullContainer The full container to associate with this {@link IGT_Fluid} - * @param emptyContainer The empty container associate with this {@link IGT_Fluid} - * @return {@link IGT_Fluid} self for call chaining - * - * @throws IllegalStateException on attempt to register containers for an unregistered fluid - */ - IGT_Fluid registerBContainers(final ItemStack fullContainer, final ItemStack emptyContainer); - - /** - * Registers the potion-sized 250L containers in the {@link FluidContainerRegistry} for this {@link IGT_Fluid} - * - * @param fullContainer The full container to associate with this {@link IGT_Fluid} - * @param emptyContainer The empty container associate with this {@link IGT_Fluid} - * @return {@link IGT_Fluid} self for call chaining - * - * @throws IllegalStateException on attempt to register containers for an unregistered fluid - */ - IGT_Fluid registerPContainers(final ItemStack fullContainer, final ItemStack emptyContainer); - - /** - * Updates the {@link Materials}'s fluids from this {@link IGT_Fluid}'s state - * - * @param material the {@link Materials} to configure based on this {@link IGT_Fluid} and {@link FluidState} - * @return The {@link IGT_Fluid} for chaining - * - * @throws IllegalStateException on unknown {@link FluidState} - * @throws IllegalStateException on attempt to register containers for an unregistered fluid - */ - IGT_Fluid configureMaterials(final Materials material); - - /** - * @return this {@link IGT_Fluid} cast to {@link Fluid} - */ - Fluid asFluid(); - - /** - * @return the {@link ResourceLocation} of the still fluid texture - */ - ResourceLocation getStillIconResourceLocation(); - - /** - * @return the {@link ResourceLocation} of the flowing fluid texture - */ - ResourceLocation getFlowingIconResourceLocation(); + IGT_RegisteredFluid addFluid(); } diff --git a/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java b/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java index 4010a465ce..a643b8aace 100644 --- a/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java +++ b/src/main/java/gregtech/api/interfaces/fluid/IGT_FluidBuilder.java @@ -1,6 +1,7 @@ package gregtech.api.interfaces.fluid; import gregtech.api.enums.FluidState; +import javax.annotation.Nonnull; import net.minecraft.block.Block; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; @@ -12,12 +13,14 @@ public interface IGT_FluidBuilder { * @param colorRGBA The {@code short[]} RGBA color of the {@link Fluid} or {@code null} for no defined RGBA color * @return {@link IGT_FluidBuilder} self for call chaining */ + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value IGT_FluidBuilder withColorRGBA(final short[] colorRGBA); /** * @param localizedName The localized name of this {@link IGT_FluidBuilder} * @return {@link IGT_FluidBuilder} self for call chaining */ + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value IGT_FluidBuilder withLocalizedName(final String localizedName); /** @@ -25,43 +28,50 @@ public interface IGT_FluidBuilder { * @param temperature The Kelvin temperature of this {@link IGT_FluidBuilder} * @return {@link IGT_FluidBuilder} self for call chaining */ + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value IGT_FluidBuilder withStateAndTemperature(final FluidState fluidState, final int temperature); /** * @param stillIconResourceLocation the {@link ResourceLocation} of the still fluid icon * @return {@link IGT_FluidBuilder} self for call chaining */ + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value IGT_FluidBuilder withStillIconResourceLocation(final ResourceLocation stillIconResourceLocation); /** * @param flowingIconResourceLocation the {@link ResourceLocation} of the flowing fluid icon * @return {@link IGT_FluidBuilder} self for call chaining */ + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value IGT_FluidBuilder withFlowingIconResourceLocation(final ResourceLocation flowingIconResourceLocation); /** * @param textureName The name of the GregTech mod texture of this {@link IGT_FluidBuilder} * @return {@link IGT_FluidBuilder} self for call chaining */ + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value IGT_FluidBuilder withTextureName(final String textureName); /** - * @param fromGTFluid the {@link IGT_Fluid} to copy the texture from + * @param fluidBlock the {@link Block} implementation of the {@link IGT_Fluid} * @return {@link IGT_FluidBuilder} self for call chaining */ - IGT_FluidBuilder withTextureFrom(final IGT_Fluid fromGTFluid); + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value + IGT_FluidBuilder withFluidBlock(final Block fluidBlock); /** - * @param fluidBlock the {@link Block} implementation of the {@link IGT_Fluid} + * @param fromFluid the {@link Fluid} to copy the icons from * @return {@link IGT_FluidBuilder} self for call chaining */ - IGT_FluidBuilder withFluidBlock(final Block fluidBlock); + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value + IGT_FluidBuilder withIconsFrom(@Nonnull final Fluid fromFluid); /** * @param stillIconResourceLocation The {@link ResourceLocation} of the still fluid texture * @param flowingIconResourceLocation The {@link ResourceLocation} of the flowing fluid texture * @return {@link IGT_FluidBuilder} self for call chaining */ + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value IGT_FluidBuilder withTextures( final ResourceLocation stillIconResourceLocation, final ResourceLocation flowingIconResourceLocation); @@ -79,5 +89,5 @@ public interface IGT_FluidBuilder { * @see #build() * @see IGT_Fluid#addFluid() */ - IGT_Fluid buildAndRegister(); + IGT_RegisteredFluid buildAndRegister(); } diff --git a/src/main/java/gregtech/api/interfaces/fluid/IGT_RegisteredFluid.java b/src/main/java/gregtech/api/interfaces/fluid/IGT_RegisteredFluid.java new file mode 100644 index 0000000000..1d8cd2384f --- /dev/null +++ b/src/main/java/gregtech/api/interfaces/fluid/IGT_RegisteredFluid.java @@ -0,0 +1,56 @@ +package gregtech.api.interfaces.fluid; + +import gregtech.api.enums.FluidState; +import gregtech.api.enums.Materials; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidContainerRegistry; + +public interface IGT_RegisteredFluid { + + /** + * Registers the containers in the {@link FluidContainerRegistry} for this {@link IGT_Fluid} + * + * @param fullContainer The full fluid container + * @param emptyContainer The empty fluid container + * @param containerSize The size of the container + * @return The {@link IGT_RegisteredFluid} for call chaining + */ + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value + IGT_RegisteredFluid registerContainers( + final ItemStack fullContainer, final ItemStack emptyContainer, final int containerSize); + + /** + * Registers the bucket-sized 1000L containers in the {@link FluidContainerRegistry} for this {@link IGT_Fluid} + * + * @param fullContainer The full container to associate with this {@link IGT_Fluid} + * @param emptyContainer The empty container associate with this {@link IGT_Fluid} + * @return {@link IGT_RegisteredFluid} for call chaining + */ + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value + IGT_RegisteredFluid registerBContainers(final ItemStack fullContainer, final ItemStack emptyContainer); + + /** + * Registers the potion-sized 250L containers in the {@link FluidContainerRegistry} for this {@link IGT_Fluid} + * + * @param fullContainer The full container to associate with this {@link IGT_Fluid} + * @param emptyContainer The empty container associate with this {@link IGT_Fluid} + * @return {@link IGT_RegisteredFluid} self for call chaining + */ + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value + IGT_RegisteredFluid registerPContainers(final ItemStack fullContainer, final ItemStack emptyContainer); + + /** + * Updates the {@link Materials}'s fluids from this {@link IGT_Fluid}'s state + * + * @param material the {@link Materials} to configure based on this {@link IGT_Fluid} and {@link FluidState} + * @return The {@link IGT_RegisteredFluid} for call chaining + */ + @SuppressWarnings("UnusedReturnValue") // Last call in chain, may not use this returned value + IGT_RegisteredFluid configureMaterials(final Materials material); + + /** + * @return this {@link IGT_Fluid} cast to {@link Fluid} + */ + Fluid asFluid(); +} diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java index e249be541e..7354546002 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java @@ -422,7 +422,9 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM // I was so proud of all this but I literally just copied code from OutputBus bSortStacks = !bSortStacks; GT_Utility.sendChatToPlayer( - aPlayer, GT_Utility.trans("200", "Sort mode: " + (bSortStacks ? "Enabled" : "Disabled"))); + aPlayer, + GT_Utility.trans("200", "Sort mode: ") + + (bSortStacks ? GT_Utility.trans("088", "Enabled") : GT_Utility.trans("087", "Disabled"))); return true; } return super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index 7dccbe03a4..e24663f18d 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -284,6 +284,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { mOutputBusses.clear(); mDynamoHatches.clear(); mEnergyHatches.clear(); + setMufflers(false); mMufflerHatches.clear(); mMaintenanceHatches.clear(); } @@ -337,12 +338,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { | (mMachine ? 0 : 64)); aBaseMetaTileEntity.setActive(mMaxProgresstime > 0); boolean active = aBaseMetaTileEntity.isActive() && mPollution > 0; - for (GT_MetaTileEntity_Hatch_Muffler aMuffler : mMufflerHatches) { - IGregTechTileEntity iGTTileEntity = aMuffler.getBaseMetaTileEntity(); - if (iGTTileEntity != null && !iGTTileEntity.isDead()) { - iGTTileEntity.setActive(active); - } - } + setMufflers(active); } } @@ -476,7 +472,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { return true; } if (mEUt < 0) { - if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) { + if (!drainEnergyInput(getActualEnergyUsage())) { criticalStopMachine(); return false; } @@ -484,6 +480,10 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { return true; } + protected long getActualEnergyUsage() { + return ((long) -mEUt * 10000) / Math.max(1000, mEfficiency); + } + /** * Checks if this is a Correct Machine Part for this kind of Machine (Turbine Rotor for example) */ @@ -1163,7 +1163,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(maxEnergy) + EnumChatFormatting.RESET + " EU", /* 3*/ StatCollector.translateToLocal("GT5U.multiblock.usage") + ": " + EnumChatFormatting.RED - + GT_Utility.formatNumbers(-mEUt) + EnumChatFormatting.RESET + " EU/t", + + GT_Utility.formatNumbers(getActualEnergyUsage()) + EnumChatFormatting.RESET + " EU/t", /* 4*/ StatCollector.translateToLocal("GT5U.multiblock.mei") + ": " + EnumChatFormatting.YELLOW + GT_Utility.formatNumbers(getMaxInputVoltage()) + EnumChatFormatting.RESET + " EU/t(*2A) " + StatCollector.translateToLocal("GT5U.machines.tier") @@ -1269,6 +1269,22 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { } } + protected void setMufflers(boolean state) { + for (GT_MetaTileEntity_Hatch_Muffler aMuffler : mMufflerHatches) { + IGregTechTileEntity iGTTileEntity = aMuffler.getBaseMetaTileEntity(); + if (iGTTileEntity != null && !iGTTileEntity.isDead()) { + iGTTileEntity.setActive(state); + } + } + } + + @Override + public void onRemoval() { + super.onRemoval(); + // Deactivate mufflers + setMufflers(false); + } + public List<GT_MetaTileEntity_Hatch> getExoticEnergyHatches() { return mExoticEnergyHatches; } diff --git a/src/main/java/gregtech/api/objects/GT_Cover_Default.java b/src/main/java/gregtech/api/objects/GT_Cover_Default.java index a975de9759..4f5eca5b24 100644 --- a/src/main/java/gregtech/api/objects/GT_Cover_Default.java +++ b/src/main/java/gregtech/api/objects/GT_Cover_Default.java @@ -32,10 +32,10 @@ public class GT_Cover_Default extends GT_CoverBehavior { aCoverVariable = ((aCoverVariable + 1) & 15); GT_Utility.sendChatToPlayer( aPlayer, - ((aCoverVariable & 1) != 0 ? GT_Utility.trans("128", "Redstone ") : "") - + ((aCoverVariable & 2) != 0 ? GT_Utility.trans("129", "Energy ") : "") - + ((aCoverVariable & 4) != 0 ? GT_Utility.trans("130", "Fluids ") : "") - + ((aCoverVariable & 8) != 0 ? GT_Utility.trans("131", "Items ") : "")); + ((aCoverVariable & 1) != 0 ? GT_Utility.trans("128.1", "Redstone ") : "") + + ((aCoverVariable & 2) != 0 ? GT_Utility.trans("129.1", "Energy ") : "") + + ((aCoverVariable & 4) != 0 ? GT_Utility.trans("130.1", "Fluids ") : "") + + ((aCoverVariable & 8) != 0 ? GT_Utility.trans("131.1", "Items ") : "")); return aCoverVariable; } diff --git a/src/main/java/gregtech/api/util/GT_Forestry_Compat.java b/src/main/java/gregtech/api/util/GT_Forestry_Compat.java index 6e73c099cb..1edfd836f3 100644 --- a/src/main/java/gregtech/api/util/GT_Forestry_Compat.java +++ b/src/main/java/gregtech/api/util/GT_Forestry_Compat.java @@ -137,6 +137,8 @@ public class GT_Forestry_Compat { } GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.addRecipe( true, new ItemStack[] {tRecipe.getInput()}, tOutputs, null, tChances, null, null, 128, 5, 0); + GT_Recipe.GT_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe( + true, new ItemStack[] {tRecipe.getInput()}, tOutputs, null, tChances, null, null, 128, 5, 0); } } catch (Throwable e) { if (GT_Values.D1) { diff --git a/src/main/java/gregtech/api/util/GT_LanguageManager.java b/src/main/java/gregtech/api/util/GT_LanguageManager.java index 50d0deeee7..4518ec1bcf 100644 --- a/src/main/java/gregtech/api/util/GT_LanguageManager.java +++ b/src/main/java/gregtech/api/util/GT_LanguageManager.java @@ -156,9 +156,9 @@ public class GT_LanguageManager { public static void writePlaceholderStrings() { addStringLocalization("Interaction_DESCRIPTION_Index_001", "Puts out into adjacent Slot #"); addStringLocalization("Interaction_DESCRIPTION_Index_002", "Grabs in for own Slot #"); - addStringLocalization("Interaction_DESCRIPTION_Index_003", "Normal"); - addStringLocalization("Interaction_DESCRIPTION_Index_004", "Inverted"); - addStringLocalization("Interaction_DESCRIPTION_Index_005", "No Work at all"); + addStringLocalization("Interaction_DESCRIPTION_Index_003", "Enable with Signal"); + addStringLocalization("Interaction_DESCRIPTION_Index_004", "Disable with Signal"); + addStringLocalization("Interaction_DESCRIPTION_Index_005", "Disabled"); addStringLocalization("Interaction_DESCRIPTION_Index_006", "Export"); addStringLocalization("Interaction_DESCRIPTION_Index_007", "Import"); addStringLocalization("Interaction_DESCRIPTION_Index_008", "Export (conditional)"); @@ -181,9 +181,6 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_025", "Keep Liquids Away"); addStringLocalization("Interaction_DESCRIPTION_Index_026", "Keep Liquids Away (conditional)"); addStringLocalization("Interaction_DESCRIPTION_Index_027", "Keep Liquids Away (invert cond)"); - addStringLocalization("Interaction_DESCRIPTION_Index_028", "Allow"); - addStringLocalization("Interaction_DESCRIPTION_Index_029", "Allow (conditional)"); - addStringLocalization("Interaction_DESCRIPTION_Index_030", "Disallow (conditional)"); addStringLocalization("Interaction_DESCRIPTION_Index_031", "Normal Universal Storage"); addStringLocalization("Interaction_DESCRIPTION_Index_032", "Inverted Universal Storage"); addStringLocalization("Interaction_DESCRIPTION_Index_033", "Normal Electricity Storage"); @@ -196,16 +193,14 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_040", "Inverted Average Electric Output"); addStringLocalization("Interaction_DESCRIPTION_Index_041", "Normal Electricity Storage(Including Batteries)"); addStringLocalization("Interaction_DESCRIPTION_Index_042", "Inverted Electricity Storage(Including Batteries)"); - addStringLocalization("Interaction_DESCRIPTION_Index_043", "Allow input, no output"); - addStringLocalization("Interaction_DESCRIPTION_Index_044", "Deny input, no output"); - addStringLocalization("Interaction_DESCRIPTION_Index_045", "Allow input, permit any output"); - addStringLocalization("Interaction_DESCRIPTION_Index_046", "Deny input, permit any output"); + addStringLocalization("Interaction_DESCRIPTION_Index_043", "Filter input, Deny output"); + addStringLocalization("Interaction_DESCRIPTION_Index_044", "Invert input, Deny output"); + addStringLocalization("Interaction_DESCRIPTION_Index_045", "Filter input, Permit any output"); + addStringLocalization("Interaction_DESCRIPTION_Index_046", "Invert input, Permit any output"); addStringLocalization("Interaction_DESCRIPTION_Index_047", "Filter Fluid: "); addStringLocalization("Interaction_DESCRIPTION_Index_048", "Pump speed: "); addStringLocalization("Interaction_DESCRIPTION_Index_049", "L/tick "); addStringLocalization("Interaction_DESCRIPTION_Index_050", "L/sec"); - addStringLocalization("Interaction_DESCRIPTION_Index_051", "Normal"); - addStringLocalization("Interaction_DESCRIPTION_Index_052", "Inverted"); addStringLocalization("Interaction_DESCRIPTION_Index_053", "Slot: "); addStringLocalization("Interaction_DESCRIPTION_Index_054", "Inverted"); addStringLocalization("Interaction_DESCRIPTION_Index_055", "Normal"); @@ -219,10 +214,14 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_063", "Emit if 4 Maintenance Needed(inverted)"); addStringLocalization("Interaction_DESCRIPTION_Index_064", "Emit if 5 Maintenance Needed"); addStringLocalization("Interaction_DESCRIPTION_Index_065", "Emit if 5 Maintenance Needed(inverted)"); - addStringLocalization("Interaction_DESCRIPTION_Index_066", "Emit if rotor needs maintenance"); - addStringLocalization("Interaction_DESCRIPTION_Index_067", "Emit if rotor needs maintenance(inverted)"); - addStringLocalization("Interaction_DESCRIPTION_Index_068", "Emit if any Player is close"); - addStringLocalization("Interaction_DESCRIPTION_Index_069", "Emit if other player is close"); + addStringLocalization("Interaction_DESCRIPTION_Index_066", "Emit if rotor needs maintenance low accuracy mod"); + addStringLocalization( + "Interaction_DESCRIPTION_Index_067", "Emit if rotor needs maintenance low accuracy mod(inverted)"); + addStringLocalization("Interaction_DESCRIPTION_Index_068", "Emit if rotor needs maintenance high accuracy mod"); + addStringLocalization("Interaction_DESCRIPTION_Index_068.1", "Emit if any Player is close"); + addStringLocalization( + "Interaction_DESCRIPTION_Index_069", "Emit if rotor needs maintenance high accuracy mod(inverted)"); + addStringLocalization("Interaction_DESCRIPTION_Index_069.1", "Emit if other Player is close"); addStringLocalization("Interaction_DESCRIPTION_Index_070", "Emit if you are close"); addStringLocalization("Interaction_DESCRIPTION_Index_071", "Conducts strongest Input"); addStringLocalization("Interaction_DESCRIPTION_Index_072", "Conducts from bottom Input"); @@ -250,10 +249,9 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_094", "Weak"); addStringLocalization("Interaction_DESCRIPTION_Index_095", "Input from Output Side allowed"); addStringLocalization("Interaction_DESCRIPTION_Index_096", "Input from Output Side forbidden"); - addStringLocalization("Interaction_DESCRIPTION_Index_097", "It's dangerous to go alone! Take this."); addStringLocalization("Interaction_DESCRIPTION_Index_098", "Do not regulate Item Stack Size"); addStringLocalization("Interaction_DESCRIPTION_Index_099", "Regulate Item Stack Size to: "); - addStringLocalization("Interaction_DESCRIPTION_Index_100", "This is "); // Spartaaaaaaa!!! + addStringLocalization("Interaction_DESCRIPTION_Index_100", "This is "); addStringLocalization("Interaction_DESCRIPTION_Index_101", " Ore."); addStringLocalization("Interaction_DESCRIPTION_Index_102", "There is Lava behind this Rock."); addStringLocalization("Interaction_DESCRIPTION_Index_103", "There is a Liquid behind this Rock."); @@ -261,13 +259,13 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_105", "Material is changing behind this Rock."); addStringLocalization("Interaction_DESCRIPTION_Index_106", "Found traces of "); addStringLocalization("Interaction_DESCRIPTION_Index_107", "No Ores found."); - addStringLocalization("Interaction_DESCRIPTION_Index_108", "Outputs Liquids, Steam and Items"); + addStringLocalization("Interaction_DESCRIPTION_Index_108", "Outputs misc. Fluids, Steam and Items"); addStringLocalization("Interaction_DESCRIPTION_Index_109", "Outputs Steam and Items"); - addStringLocalization("Interaction_DESCRIPTION_Index_110", "Outputs Steam and Liquids"); + addStringLocalization("Interaction_DESCRIPTION_Index_110", "Outputs Steam and misc. Fluids"); addStringLocalization("Interaction_DESCRIPTION_Index_111", "Outputs Steam"); - addStringLocalization("Interaction_DESCRIPTION_Index_112", "Outputs Liquids and Items"); + addStringLocalization("Interaction_DESCRIPTION_Index_112", "Outputs misc. Fluids and Items"); addStringLocalization("Interaction_DESCRIPTION_Index_113", "Outputs only Items"); - addStringLocalization("Interaction_DESCRIPTION_Index_114", "Outputs only Liquids"); + addStringLocalization("Interaction_DESCRIPTION_Index_114", "Outputs only misc. Fluids"); addStringLocalization("Interaction_DESCRIPTION_Index_115", "Outputs nothing"); addStringLocalization("Interaction_DESCRIPTION_Index_116", "Emit Energy to Outputside"); addStringLocalization("Interaction_DESCRIPTION_Index_117", "Don't emit Energy"); @@ -278,13 +276,19 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_122", "Emit Redstone if slots contain something"); addStringLocalization("Interaction_DESCRIPTION_Index_123", "Don't emit Redstone"); addStringLocalization("Interaction_DESCRIPTION_Index_124", "Invert Filter"); + addStringLocalization("Interaction_DESCRIPTION_Index_124.1", "Blacklist Mode"); addStringLocalization("Interaction_DESCRIPTION_Index_125", "Don't invert Filter"); + addStringLocalization("Interaction_DESCRIPTION_Index_125.1", "Whitelist Mode"); addStringLocalization("Interaction_DESCRIPTION_Index_126", "Ignore NBT"); addStringLocalization("Interaction_DESCRIPTION_Index_127", "NBT has to match"); - addStringLocalization("Interaction_DESCRIPTION_Index_128", "Redstone "); - addStringLocalization("Interaction_DESCRIPTION_Index_129", "Energy "); - addStringLocalization("Interaction_DESCRIPTION_Index_130", "Fluids "); - addStringLocalization("Interaction_DESCRIPTION_Index_131", "Items "); + addStringLocalization("Interaction_DESCRIPTION_Index_128", "Redstone"); + addStringLocalization("Interaction_DESCRIPTION_Index_128.1", "Redstone "); + addStringLocalization("Interaction_DESCRIPTION_Index_129", "Energy"); + addStringLocalization("Interaction_DESCRIPTION_Index_129.1", "Energy "); + addStringLocalization("Interaction_DESCRIPTION_Index_130", "Fluids"); + addStringLocalization("Interaction_DESCRIPTION_Index_130.1", "Fluids "); + addStringLocalization("Interaction_DESCRIPTION_Index_131", "Items"); + addStringLocalization("Interaction_DESCRIPTION_Index_131.1", "Items "); addStringLocalization("Interaction_DESCRIPTION_Index_132", "Pipe is loose."); addStringLocalization("Interaction_DESCRIPTION_Index_133", "Screws are loose."); addStringLocalization("Interaction_DESCRIPTION_Index_134", "Something is stuck."); @@ -292,7 +296,7 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_136", "Circuitry burned out."); addStringLocalization("Interaction_DESCRIPTION_Index_137", "That doesn't belong there."); addStringLocalization("Interaction_DESCRIPTION_Index_138", "Incomplete Structure."); - addStringLocalization("Interaction_DESCRIPTION_Index_139", "Hit with Soft Hammer"); + addStringLocalization("Interaction_DESCRIPTION_Index_139", "Hit with Soft Mallet"); addStringLocalization("Interaction_DESCRIPTION_Index_140", "to (re-)start the Machine"); addStringLocalization("Interaction_DESCRIPTION_Index_141", "if it doesn't start."); addStringLocalization("Interaction_DESCRIPTION_Index_142", "Running perfectly."); @@ -300,12 +304,16 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_144", "Missing Turbine Rotor"); addStringLocalization("Interaction_DESCRIPTION_Index_145", "Step Down, In: "); addStringLocalization("Interaction_DESCRIPTION_Index_146", "Step Up, In: "); - addStringLocalization("Interaction_DESCRIPTION_Index_147", "Amp, Out: "); - addStringLocalization("Interaction_DESCRIPTION_Index_148", " V at "); - addStringLocalization("Interaction_DESCRIPTION_Index_149", " Amp"); + addStringLocalization("Interaction_DESCRIPTION_Index_147", "A, Out: "); + addStringLocalization("Interaction_DESCRIPTION_Index_148", "V "); + addStringLocalization("Interaction_DESCRIPTION_Index_149", "A"); addStringLocalization("Interaction_DESCRIPTION_Index_150", "Chance: "); addStringLocalization("Interaction_DESCRIPTION_Index_151", "Does not get consumed in the process"); + addStringLocalization("Interaction_DESCRIPTION_Index_151.1", "Outputs items and 1 specific Fluid"); + addStringLocalization("Interaction_DESCRIPTION_Index_151.2", "Outputs 1 specific Fluid"); + addStringLocalization("Interaction_DESCRIPTION_Index_151.4", "Successfully locked Fluid to %s"); addStringLocalization("Interaction_DESCRIPTION_Index_152", "Total: "); + addStringLocalization("Interaction_DESCRIPTION_Index_152.1", "Max EU: "); addStringLocalization("Interaction_DESCRIPTION_Index_153", "Usage: "); addStringLocalization("Interaction_DESCRIPTION_Index_154", "Voltage: "); addStringLocalization("Interaction_DESCRIPTION_Index_155", "Amperage: "); @@ -314,16 +322,17 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_158", "Time: "); addStringLocalization("Interaction_DESCRIPTION_Index_159", "Needs Low Gravity"); addStringLocalization("Interaction_DESCRIPTION_Index_160", "Needs Cleanroom"); + addStringLocalization("Interaction_DESCRIPTION_Index_160.1", "Needs Cleanroom & LowGrav"); addStringLocalization("Interaction_DESCRIPTION_Index_161", " secs"); addStringLocalization("Interaction_DESCRIPTION_Index_162", "Name: "); - addStringLocalization("Interaction_DESCRIPTION_Index_163", " MetaData: "); + addStringLocalization("Interaction_DESCRIPTION_Index_163", " MetaData: "); addStringLocalization("Interaction_DESCRIPTION_Index_164", "Hardness: "); - addStringLocalization("Interaction_DESCRIPTION_Index_165", " Blast Resistance: "); + addStringLocalization("Interaction_DESCRIPTION_Index_165", " Blast Resistance: "); addStringLocalization("Interaction_DESCRIPTION_Index_166", "Is valid Beacon Pyramid Material"); addStringLocalization("Interaction_DESCRIPTION_Index_167", "Tank "); addStringLocalization("Interaction_DESCRIPTION_Index_168", "Heat: "); - addStringLocalization("Interaction_DESCRIPTION_Index_169", " HEM: "); - addStringLocalization("Interaction_DESCRIPTION_Index_170", " Base EU Output: "); + addStringLocalization("Interaction_DESCRIPTION_Index_169", "HEM: "); + addStringLocalization("Interaction_DESCRIPTION_Index_170", " Base EU Output: "); addStringLocalization("Interaction_DESCRIPTION_Index_171", "Facing: "); addStringLocalization("Interaction_DESCRIPTION_Index_172", " / Chance: "); addStringLocalization("Interaction_DESCRIPTION_Index_173", "You can remove this with a Wrench"); @@ -331,14 +340,12 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_175", "Conduction Loss: "); addStringLocalization("Interaction_DESCRIPTION_Index_176", "Contained Energy: "); addStringLocalization("Interaction_DESCRIPTION_Index_177", "Has Muffler Upgrade"); - addStringLocalization("Interaction_DESCRIPTION_Index_178", "Progress: "); + addStringLocalization("Interaction_DESCRIPTION_Index_178", "Progress/Load: "); addStringLocalization("Interaction_DESCRIPTION_Index_179", "Max IN: "); - addStringLocalization("Interaction_DESCRIPTION_Index_180", " EU"); addStringLocalization("Interaction_DESCRIPTION_Index_181", "Max OUT: "); addStringLocalization("Interaction_DESCRIPTION_Index_182", " EU at "); - addStringLocalization("Interaction_DESCRIPTION_Index_183", " Amperes"); + addStringLocalization("Interaction_DESCRIPTION_Index_183", " A"); addStringLocalization("Interaction_DESCRIPTION_Index_184", "Energy: "); - addStringLocalization("Interaction_DESCRIPTION_Index_185", "EU"); addStringLocalization("Interaction_DESCRIPTION_Index_186", "Owned by: "); addStringLocalization("Interaction_DESCRIPTION_Index_187", "Type -- Crop-Name: "); addStringLocalization("Interaction_DESCRIPTION_Index_188", " Growth: "); @@ -353,38 +360,131 @@ public class GT_LanguageManager { addStringLocalization("Interaction_DESCRIPTION_Index_197", " Air-Quality: "); addStringLocalization("Interaction_DESCRIPTION_Index_198", "Attributes:"); addStringLocalization("Interaction_DESCRIPTION_Index_199", "Discovered by: "); - addStringLocalization("Interaction_DESCRIPTION_Index_200", " L"); + addStringLocalization("Interaction_DESCRIPTION_Index_200", "Sort mode: "); + addStringLocalization("Interaction_DESCRIPTION_Index_200.1", "Automatic Item Shuffling: "); addStringLocalization("Interaction_DESCRIPTION_Index_201", "Nothing"); addStringLocalization("Interaction_DESCRIPTION_Index_202", "Pollution in Chunk: "); addStringLocalization("Interaction_DESCRIPTION_Index_203", " gibbl"); addStringLocalization("Interaction_DESCRIPTION_Index_204", "No Pollution in Chunk! HAYO!"); - addStringLocalization("Interaction_DESCRIPTION_Index_205", " of "); addStringLocalization("Interaction_DESCRIPTION_Index_206", "Scan for Assembly Line"); - // addStringLocalization("Interaction_DESCRIPTION_Index_207", "Grab"); - // addStringLocalization("Interaction_DESCRIPTION_Index_208", "Grab"); - // addStringLocalization("Interaction_DESCRIPTION_Index_209", "Grab"); - // addStringLocalization("Interaction_DESCRIPTION_Index_210", "Grab"); + addStringLocalization( + "Interaction_DESCRIPTION_Index_207", "Pump speed: %dL every %d ticks, %.2f L/sec on average"); + addStringLocalization("Interaction_DESCRIPTION_Index_208", " L"); + addStringLocalization("Interaction_DESCRIPTION_Index_209", " ticks"); + addStringLocalization("Interaction_DESCRIPTION_Index_210", "Average: %.2f L/sec"); addStringLocalization("Interaction_DESCRIPTION_Index_211", "Items per side: "); addStringLocalization("Interaction_DESCRIPTION_Index_212", "Input enabled"); addStringLocalization("Interaction_DESCRIPTION_Index_213", "Input disabled"); addStringLocalization("Interaction_DESCRIPTION_Index_214", "Connected"); addStringLocalization("Interaction_DESCRIPTION_Index_215", "Disconnected"); addStringLocalization("Interaction_DESCRIPTION_Index_216", "Deprecated Recipe"); - addStringLocalization( - "Interaction_DESCRIPTION_Index_217", - "Stocking mode. Keeps this many items in destination input slots. This mode can be server unfriendly."); - addStringLocalization( - "Interaction_DESCRIPTION_Index_218", - "Transfer size mode. Add exactly this many items in destination input slots as long as there is room."); - addStringLocalization("Interaction_DESCRIPTION_Index_219", "Extended Facing:"); + addStringLocalization("Interaction_DESCRIPTION_Index_219", "Extended Facing: "); addStringLocalization("Interaction_DESCRIPTION_Index_220", "Single recipe locking disabled."); addStringLocalization("Interaction_DESCRIPTION_Index_221", "Item threshold"); addStringLocalization("Interaction_DESCRIPTION_Index_222", "Fluid threshold"); + addStringLocalization("Interaction_DESCRIPTION_Index_222.1", "Energy threshold"); addStringLocalization( "Interaction_DESCRIPTION_Index_223", "Single recipe locking enabled. Will lock to next recipe."); - addStringLocalization("Interaction_DESCRIPTION_Index_224", " ticks"); + addStringLocalization("Interaction_DESCRIPTION_Index_224", "Always On"); + addStringLocalization("Interaction_DESCRIPTION_Index_225", "Active with Redstone Signal"); + addStringLocalization("Interaction_DESCRIPTION_Index_226", "Inactive with Redstone Signal"); + addStringLocalization("Interaction_DESCRIPTION_Index_227", "Allow Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_228", "Block Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_229", "Import/Export"); + addStringLocalization("Interaction_DESCRIPTION_Index_230", "Conditional"); + addStringLocalization("Interaction_DESCRIPTION_Index_231", "Enable Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_232", "Filter Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_233", "Filter Output"); + addStringLocalization("Interaction_DESCRIPTION_Index_234", "Block Output"); + addStringLocalization("Interaction_DESCRIPTION_Index_235", "Allow Output"); + addStringLocalization("Interaction_DESCRIPTION_Index_236", "Whitelist Fluid"); + addStringLocalization("Interaction_DESCRIPTION_Index_237", "Blacklist Fluid"); + addStringLocalization("Interaction_DESCRIPTION_Index_238", "Filter Direction"); + addStringLocalization("Interaction_DESCRIPTION_Index_239", "Filter Type"); + addStringLocalization("Interaction_DESCRIPTION_Index_240", "Block Flow"); + addStringLocalization("Interaction_DESCRIPTION_Index_241", "Recipe progress"); + addStringLocalization("Interaction_DESCRIPTION_Index_242", "Machine idle"); + addStringLocalization("Interaction_DESCRIPTION_Index_243", "Enable with Redstone"); + addStringLocalization("Interaction_DESCRIPTION_Index_244", "Disable with Redstone"); + addStringLocalization("Interaction_DESCRIPTION_Index_245", "Disable machine"); + addStringLocalization("Interaction_DESCRIPTION_Index_246", "Frequency"); + addStringLocalization("Interaction_DESCRIPTION_Index_247", "1 Issue"); + addStringLocalization("Interaction_DESCRIPTION_Index_248", "2 Issues"); + addStringLocalization("Interaction_DESCRIPTION_Index_249", "3 Issues"); + addStringLocalization("Interaction_DESCRIPTION_Index_250", "4 Issues"); + addStringLocalization("Interaction_DESCRIPTION_Index_251", "5 Issues"); + addStringLocalization("Interaction_DESCRIPTION_Index_252", "Rotor < 80%"); + addStringLocalization("Interaction_DESCRIPTION_Index_253", "Rotor < 100%"); + addStringLocalization("Interaction_DESCRIPTION_Index_254", "Detect slot#"); + addStringLocalization("Interaction_DESCRIPTION_Index_254.1", "Internal slot#"); + addStringLocalization("Interaction_DESCRIPTION_Index_255", "Adjacent slot#"); + addStringLocalization("Interaction_DESCRIPTION_Index_256", "Universal Storage"); + addStringLocalization("Interaction_DESCRIPTION_Index_257", "Electricity Storage"); + addStringLocalization("Interaction_DESCRIPTION_Index_258", "Steam Storage"); + addStringLocalization("Interaction_DESCRIPTION_Index_259", "Average Electric Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_260", "Average Electric Output"); + addStringLocalization("Interaction_DESCRIPTION_Index_261", "Electricity Storage(Including Batteries)"); + addStringLocalization("Interaction_DESCRIPTION_Index_262", "Fluid Auto Output Disabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_263", "Fluid Auto Output Enabled"); + addStringLocalization( + "Interaction_DESCRIPTION_Index_264", "currently none, will be locked to the next that is put in"); + addStringLocalization("Interaction_DESCRIPTION_Index_265", "1 specific Fluid"); + addStringLocalization("Interaction_DESCRIPTION_Index_266", "Lock Fluid Mode Disabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_267", "Overflow Voiding Mode Disabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_268", "Overflow Voiding Mode Enabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_269", "Void Full Mode Disabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_270", "Void Full Mode Enabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_271", "unspecified"); + addStringLocalization("Interaction_DESCRIPTION_Index_272", "Recipe by: "); + addStringLocalization("Interaction_DESCRIPTION_Index_273", "Original Recipe by: "); + addStringLocalization("Interaction_DESCRIPTION_Index_274", "Modified by: "); + addStringLocalization("Interaction_DESCRIPTION_Index_275", "Original voltage: "); + addStringLocalization("Interaction_DESCRIPTION_Index_299", "Item Filter: "); + addStringLocalization("Interaction_DESCRIPTION_Index_300", "Filter Cleared!"); + addStringLocalization("Interaction_DESCRIPTION_Index_300.1", "Fluid Lock Cleared."); + addStringLocalization("Interaction_DESCRIPTION_Index_301", "Universal"); + addStringLocalization("Interaction_DESCRIPTION_Index_302", "Int. EU"); + addStringLocalization("Interaction_DESCRIPTION_Index_303", "Steam"); + addStringLocalization("Interaction_DESCRIPTION_Index_304", "Avg. Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_305", "Avg. Output"); + addStringLocalization("Interaction_DESCRIPTION_Index_306", "EU stored"); + addStringLocalization("Interaction_DESCRIPTION_Index_307", "Deny input, Filter output"); + addStringLocalization("Interaction_DESCRIPTION_Index_308", "Deny input, Invert output"); + addStringLocalization("Interaction_DESCRIPTION_Index_309", "Permit any input, Filter output"); + addStringLocalization("Interaction_DESCRIPTION_Index_310", "Permit any input, Invert output"); + addStringLocalization("Interaction_DESCRIPTION_Index_311", "Block Output"); + addStringLocalization("Interaction_DESCRIPTION_Index_312", "Allow Output"); + addStringLocalization("Interaction_DESCRIPTION_Index_313", "Block Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_314", "Allow Input"); + addStringLocalization("Interaction_DESCRIPTION_Index_315", "Filter Empty"); + addStringLocalization("Interaction_DESCRIPTION_Index_316", "Pump speed limit reached!"); + addStringLocalization("Interaction_DESCRIPTION_Index_317", "Filter: "); + addStringLocalization("Interaction_DESCRIPTION_Index_318", "Check Mode"); + addStringLocalization("Interaction_DESCRIPTION_Index_319", "Any player"); + addStringLocalization("Interaction_DESCRIPTION_Index_320", "Other players"); + addStringLocalization("Interaction_DESCRIPTION_Index_321", "Only owner"); + addStringLocalization("Interaction_DESCRIPTION_Index_322", "Overflow point: "); + addStringLocalization("Interaction_DESCRIPTION_Index_323", "L"); + addStringLocalization("Interaction_DESCRIPTION_Index_324", "Now"); + addStringLocalization("Interaction_DESCRIPTION_Index_325", "Max"); + addStringLocalization("Interaction_DESCRIPTION_Index_326", "Public"); + addStringLocalization("Interaction_DESCRIPTION_Index_327", "Private"); + addStringLocalization("Interaction_DESCRIPTION_Index_328", "Channel"); + addStringLocalization("Interaction_DESCRIPTION_Index_329", "Public/Private"); addStringLocalization("Interaction_DESCRIPTION_Index_500", "Fitting: Loose - More Flow"); addStringLocalization("Interaction_DESCRIPTION_Index_501", "Fitting: Tight - More Efficiency"); + addStringLocalization("Interaction_DESCRIPTION_Index_502", "Mining chunk loading enabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_503", "Mining chunk loading disabled"); + addStringLocalization("Interaction_DESCRIPTION_Index_505", "Enable with Signal (Safe)"); + addStringLocalization("Interaction_DESCRIPTION_Index_506", "Disable with Signal (Safe)"); + addStringLocalization("Interaction_DESCRIPTION_Index_507", "Safe Mode"); + addStringLocalization("Interaction_DESCRIPTION_Index_601", "Use Private Frequency"); + addStringLocalization("Interaction_DESCRIPTION_Index_756", "Connectable: "); + addStringLocalization("Interaction_DESCRIPTION_Index_ALL", "All"); + addStringLocalization("Interaction_DESCRIPTION_Index_ANY", "Any"); + addStringLocalization("Interaction_DESCRIPTION_Index_INVERTED", "Inverted"); + addStringLocalization("Interaction_DESCRIPTION_Index_NORMAL", "Normal"); + addStringLocalization("Interaction_DESCRIPTION_Index_SIDE", "Side: "); addStringLocalization("Item_DESCRIPTION_Index_000", "Stored Heat: %s"); addStringLocalization("Item_DESCRIPTION_Index_001", "Durability: %s/%s"); diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 1ab29c067b..26cff0b262 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -2142,6 +2142,54 @@ public class GT_Recipe implements Comparable<GT_Recipe> { " EU", true, true); + public static final GT_Recipe_Map sMultiblockElectrolyzerRecipes = new GT_Recipe_Map( + new HashSet<>(300), + "gt.recipe.largeelectrolyzer", + "Large(PA) Electrolyzer", + null, + RES_PATH_GUI + "basicmachines/LCRNEI", + 1, + 9, + 0, + 0, + 1, + "", + 0, + "", + true, + false); + public static final GT_Recipe_Map sMultiblockCentrifugeRecipes = new GT_Recipe_Map( + new HashSet<>(1200), + "gt.recipe.largecentrifuge", + "Large(PA) Centrifuge", + null, + RES_PATH_GUI + "basicmachines/LCRNEI", + 1, + 9, + 0, + 0, + 1, + "", + 0, + "", + true, + false); + public static final GT_Recipe_Map sMultiblockMixerRecipes = new GT_Recipe_Map( + new HashSet<>(900), + "gt.recipe.largemixer", + "Large(PA) Mixer", + null, + RES_PATH_GUI + "basicmachines/LCRNEI", + 9, + 3, + 0, + 0, + 1, + "", + 0, + "", + true, + false); public static final GT_Recipe_Map_LargeBoilerFakeFuels sLargeBoilerFakeFuels = new GT_Recipe_Map_LargeBoilerFakeFuels(); diff --git a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java index 60ab0986d5..713380972f 100644 --- a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java +++ b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java @@ -4,15 +4,18 @@ import static gregtech.api.enums.GT_Values.*; import static gregtech.api.enums.Materials.*; import static gregtech.api.enums.Materials.Void; +import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableList; +import com.google.common.collect.SetMultimap; +import cpw.mods.fml.relauncher.ReflectionHelper; import gregtech.GT_Mod; import gregtech.api.GregTech_API; import gregtech.api.enums.*; import gregtech.api.objects.ItemData; import gregtech.api.objects.MaterialStack; import ic2.api.reactor.IReactorComponent; +import java.lang.reflect.Field; import java.util.*; -import java.util.stream.Collectors; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemBlock; @@ -81,6 +84,8 @@ public class GT_RecipeRegistrator { new RecipeShape(sMt1, sMt1, null, sMt2, null, sMt1, sMt2, null, null), new RecipeShape(null, sMt1, sMt1, sMt1, null, sMt2, null, null, sMt2) }; + public static final Field SHAPED_ORE_RECIPE_WIDTH = ReflectionHelper.findField(ShapedOreRecipe.class, "width"); + public static final Field SHAPED_ORE_RECIPE_HEIGHT = ReflectionHelper.findField(ShapedOreRecipe.class, "height"); private static volatile Map<RecipeShape, List<IRecipe>> indexedRecipeListCache; private static final String[][] sShapesA = new String[][] { null, @@ -479,15 +484,19 @@ public class GT_RecipeRegistrator { (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList(); // filter using the empty slots in the shape. // if the empty slots doesn't match, the recipe will definitely fail - Map<List<Integer>, List<RecipeShape>> filter = - Arrays.stream(sShapes).collect(Collectors.groupingBy(RecipeShape::getEmptySlots)); - List<Integer> x = new ArrayList<>(9); + SetMultimap<List<Integer>, RecipeShape> filter = HashMultimap.create(); + for (RecipeShape shape : sShapes) { + for (List<Integer> list : shape.getEmptySlotsAllVariants()) { + filter.put(list, shape); + } + } + List<Integer> buffer = new ArrayList<>(9); for (IRecipe tRecipe : allRecipeList) { if (tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe) { // we don't target shapeless recipes continue; } - x.clear(); + buffer.clear(); ItemStack tStack = tRecipe.getRecipeOutput(); if (GT_Utility.isStackValid(tStack) && tStack.getMaxStackSize() == 1 @@ -497,50 +506,24 @@ public class GT_RecipeRegistrator { && !GT_ModHandler.isElectricItem(tStack) && !GT_Utility.isStackInList(tStack, GT_ModHandler.sNonReplaceableItems)) { if (tRecipe instanceof ShapedOreRecipe) { - boolean allValid = true; - Object[] input = ((ShapedOreRecipe) tRecipe).getInput(); - for (int i = 0, inputLength = input.length; i < inputLength; i++) { - Object tObject = input[i]; - if (tObject != null) { - if (tObject instanceof ItemStack - && (((ItemStack) tObject).getItem() == null - || ((ItemStack) tObject).getMaxStackSize() < 2 - || ((ItemStack) tObject).getMaxDamage() > 0 - || ((ItemStack) tObject).getItem() instanceof ItemBlock)) { - allValid = false; - break; - } - if (tObject instanceof List && ((List<?>) tObject).isEmpty()) { - allValid = false; - break; - } - } else { - x.add(i); - } - } - if (allValid) { - for (RecipeShape s : filter.getOrDefault(x, Collections.emptyList())) { + ShapedOreRecipe tShapedRecipe = (ShapedOreRecipe) tRecipe; + if (checkRecipeShape( + buffer, + tShapedRecipe.getInput(), + getRecipeWidth(tShapedRecipe), + getRecipeHeight(tShapedRecipe))) { + for (RecipeShape s : filter.get(buffer)) { result.computeIfAbsent(s, k -> new ArrayList<>()).add(tRecipe); } } } else if (tRecipe instanceof ShapedRecipes) { - boolean allValid = true; - ItemStack[] recipeItems = ((ShapedRecipes) tRecipe).recipeItems; - for (int i = 0, recipeItemsLength = recipeItems.length; i < recipeItemsLength; i++) { - ItemStack tObject = recipeItems[i]; - if (tObject != null - && (tObject.getItem() == null - || tObject.getMaxStackSize() < 2 - || tObject.getMaxDamage() > 0 - || tObject.getItem() instanceof ItemBlock)) { - allValid = false; - break; - } else { - x.add(i); - } - } - if (allValid) { - for (RecipeShape s : filter.getOrDefault(x, Collections.emptyList())) { + ShapedRecipes tShapedRecipe = (ShapedRecipes) tRecipe; + if (checkRecipeShape( + buffer, + tShapedRecipe.recipeItems, + getRecipeWidth(tShapedRecipe), + getRecipeHeight(tShapedRecipe))) { + for (RecipeShape s : filter.get(buffer)) { result.computeIfAbsent(s, k -> new ArrayList<>()).add(tRecipe); } } @@ -556,6 +539,34 @@ public class GT_RecipeRegistrator { return result; } + private static boolean checkRecipeShape( + List<Integer> emptySlotIndexesBuffer, Object[] input, int tRecipeWidth, int tRecipeHeight) { + for (int y = 0; y < 3; y++) { + for (int x = 0; x < 3; x++) { + if (x >= tRecipeWidth || y >= tRecipeHeight) { + emptySlotIndexesBuffer.add(x + y * 3); + continue; + } + Object tObject = input[x + y * tRecipeWidth]; + if (tObject == null) { + emptySlotIndexesBuffer.add(x + y * 3); + continue; + } + if (tObject instanceof ItemStack + && (((ItemStack) tObject).getItem() == null + || ((ItemStack) tObject).getMaxStackSize() < 2 + || ((ItemStack) tObject).getMaxDamage() > 0 + || ((ItemStack) tObject).getItem() instanceof ItemBlock)) { + return false; + } + if (tObject instanceof List && ((List<?>) tObject).isEmpty()) { + return false; + } + } + } + return true; + } + private static synchronized void registerStickStuff(String aPlate, ItemData aItemData, boolean aRecipeReplacing) { ItemStack tStack; for (Materials tMaterial : sRodMaterialList) { @@ -646,6 +657,30 @@ public class GT_RecipeRegistrator { return Arrays.stream(VANILLA_MATS).anyMatch(mat -> mat == materials); } + private static int getRecipeWidth(ShapedOreRecipe r) { + try { + return (int) SHAPED_ORE_RECIPE_WIDTH.get(r); + } catch (ReflectiveOperationException e) { + throw new RuntimeException(e); + } + } + + private static int getRecipeHeight(ShapedOreRecipe r) { + try { + return (int) SHAPED_ORE_RECIPE_HEIGHT.get(r); + } catch (ReflectiveOperationException e) { + throw new RuntimeException(e); + } + } + + private static int getRecipeHeight(ShapedRecipes r) { + return r.recipeHeight; + } + + private static int getRecipeWidth(ShapedRecipes r) { + return r.recipeWidth; + } + private static class RecipeShape { private final ItemStack[] shape; private int amount1; @@ -660,10 +695,42 @@ public class GT_RecipeRegistrator { } } - public List<Integer> getEmptySlots() { + public List<List<Integer>> getEmptySlotsAllVariants() { + // "shake" the grid in 8 direction and see if the recipe shape is still valid + // also include the "no movement" case + ImmutableList.Builder<List<Integer>> b = ImmutableList.builder(); + for (int i = -1; i < 2; i++) { + if (i != 0 && !isColClear(i + 1)) continue; + for (int j = -1; j < 2; j++) { + if (j != 0 && !isRowClear(j + 1)) continue; + b.add(getEmptySlots(i, j)); + } + } + return b.build(); + } + + private boolean isRowClear(int row) { + for (int i = 0; i < 3; i++) { + if (shape[i + row * 3] != null) return false; + } + return true; + } + + private boolean isColClear(int col) { + for (int i = 0; i < 3; i++) { + if (shape[col + i * 3] != null) return false; + } + return true; + } + + private List<Integer> getEmptySlots(int offsetX, int offsetY) { ImmutableList.Builder<Integer> b = ImmutableList.builder(); for (int i = 0; i < shape.length; i++) { - if (shape[i] == null) b.add(i); + int mappedIndex = i - offsetX - offsetY * 3; + // empty slot if it either + // 1) map to a slot outside the original shape + // 2) map to an empty slot in original shape + if (mappedIndex < 0 || mappedIndex > 8 || shape[mappedIndex] == null) b.add(i); } return b.build(); } diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 4371658b3a..c9aa55d291 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -4254,7 +4254,29 @@ public class GT_Utility { return Textures.BlockIcons.ERROR_TEXTURE_INDEX; } - public static byte convertRatioToRedstone(long used, long max, int threshold, boolean inverted) { + public static boolean isCellEmpty(ItemStack itemStack) { + if (itemStack == null) return false; + ItemStack tStack = ItemList.Cell_Empty.get(1); + tStack.stackSize = itemStack.stackSize; + return GT_Utility.areStacksEqual(itemStack, tStack); + } + + public static FluidStack convertCellToFluid(ItemStack itemStack) { + if (itemStack == null) return null; + if (getFluidForFilledItem(itemStack, true) != null) { + FluidStack fluidStack = getFluidForFilledItem(itemStack, true); + if (fluidStack != null) fluidStack.amount = fluidStack.amount * itemStack.stackSize; + return fluidStack; + } + return null; + } + + public static boolean checkIfSameIntegratedCircuit(ItemStack itemStack) { + if (itemStack == null) return false; + for (int i = 0; i < 25; i++) if (itemStack.isItemEqual(GT_Utility.getIntegratedCircuit(i))) return true; + return false; + } +public static byte convertRatioToRedstone(long used, long max, int threshold, boolean inverted) { byte signal; if (used <= 0) { // Empty signal = 0; diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index 1f0eda5034..3bc5557fac 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -5,6 +5,7 @@ import static gregtech.api.enums.FluidState.GAS; import static gregtech.api.enums.FluidState.LIQUID; import static gregtech.api.enums.FluidState.MOLTEN; import static gregtech.api.enums.FluidState.PLASMA; +import static gregtech.api.enums.GT_Values.MOD_ID; import static gregtech.api.enums.GT_Values.MOD_ID_RC; import static gregtech.api.enums.GT_Values.MOD_ID_TC; import static gregtech.api.enums.GT_Values.MOD_ID_TE; @@ -43,7 +44,6 @@ import gregtech.api.fluid.GT_FluidFactory; import gregtech.api.interfaces.IBlockOnWalkOver; import gregtech.api.interfaces.IGlobalWirelessEnergy; import gregtech.api.interfaces.IProjectileItem; -import gregtech.api.interfaces.fluid.IGT_Fluid; import gregtech.api.interfaces.internal.IGT_Mod; import gregtech.api.interfaces.internal.IThaumcraftCompat; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -51,7 +51,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Item; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.objects.GT_ChunkManager; -import gregtech.api.objects.GT_Fluid; import gregtech.api.objects.GT_FluidStack; import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.GT_UO_DimensionList; @@ -119,6 +118,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.DamageSource; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; import net.minecraft.world.ChunkCoordIntPair; import net.minecraft.world.World; import net.minecraft.world.WorldSettings.GameType; @@ -138,7 +138,6 @@ import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.event.world.ChunkDataEvent; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; -import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.RecipeSorter; @@ -2552,7 +2551,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } else return; for (int i = 0; i < 3; i++) { crackedFluids[i] = GT_FluidFactory.builder(namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH)) - .withTextureFrom((IGT_Fluid) uncrackedFluid) + .withIconsFrom(uncrackedFluid) .withLocalizedName(orePrefixes[i].mLocalizedMaterialPre + aMaterial.mDefaultLocalName) .withColorRGBA(aMaterial.mRGBa) .withStateAndTemperature(GAS, 775) @@ -2603,7 +2602,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } else return; for (int i = 0; i < 3; i++) { crackedFluids[i] = GT_FluidFactory.builder(namePrefixes[i] + aMaterial.mName.toLowerCase(Locale.ENGLISH)) - .withTextureFrom((IGT_Fluid) uncrackedFluid) + .withIconsFrom(uncrackedFluid) .withLocalizedName(orePrefixes[i].mLocalizedMaterialPre + aMaterial.mDefaultLocalName) .withColorRGBA(aMaterial.mRGBa) .withStateAndTemperature(GAS, 775) @@ -2640,19 +2639,19 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG } /** - * @deprecated use {@link IGT_Fluid#addFluid} + * @deprecated use {@link GT_FluidFactory#builder} * @see GT_FluidFactory#of(String, String, Materials, FluidState, int) * @see GT_FluidFactory#of(String, String, FluidState, int) */ @Deprecated public Fluid addFluid(String aName, String aLocalized, Materials aMaterial, int aState, int aTemperatureK) { - return addFluid(aName, aLocalized, aMaterial, aState, aTemperatureK, null, null, 0); + return GT_FluidFactory.of(aName, aLocalized, aMaterial, FluidState.VALID_STATES[aState], aTemperatureK); } /** - * @deprecated use {@link IGT_Fluid#addFluid} - * @see GT_FluidFactory#builder + * @deprecated use {@link GT_FluidFactory#builder} */ + @SuppressWarnings({"MethodWithTooManyParameters"}) // Deprecated method @Deprecated public Fluid addFluid( String aName, @@ -2663,24 +2662,20 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) { - return addFluid( - aName, - aName.toLowerCase(Locale.ENGLISH), - aLocalized, - aMaterial, - null, - aState, - aTemperatureK, - aFullContainer, - aEmptyContainer, - aFluidAmount); + return GT_FluidFactory.builder(aName) + .withLocalizedName(aLocalized) + .withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK) + .buildAndRegister() + .configureMaterials(aMaterial) + .registerContainers(aFullContainer, aEmptyContainer, aFluidAmount) + .asFluid(); } /** - * @deprecated use {@link IGT_Fluid#addFluid} - * @see GT_FluidFactory#builder + * @deprecated use {@link GT_FluidFactory#builder} */ @Deprecated + @SuppressWarnings({"MethodWithTooManyParameters"}) // Deprecated method public Fluid addFluid( String aName, String aTexture, @@ -2692,67 +2687,15 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler, IG ItemStack aFullContainer, ItemStack aEmptyContainer, int aFluidAmount) { - aName = aName.toLowerCase(Locale.ENGLISH); - - Fluid rFluid = new GT_Fluid(aName, aTexture, aRGBa != null ? aRGBa : Dyes._NULL.getRGBA()); - GT_LanguageManager.addStringLocalization(rFluid.getUnlocalizedName(), aLocalized == null ? aName : aLocalized); - if (FluidRegistry.registerFluid(rFluid)) { - switch (aState) { - case 0: - rFluid.setGaseous(false); - rFluid.setViscosity(10000); - break; - case 1: - case 4: - rFluid.setGaseous(false); - rFluid.setViscosity(1000); - break; - case 2: - rFluid.setGaseous(true); - rFluid.setDensity(-100); - rFluid.setViscosity(200); - break; - case 3: - rFluid.setGaseous(true); - rFluid.setDensity(55536); - rFluid.setViscosity(10); - rFluid.setLuminosity(15); - } - } else { - rFluid = FluidRegistry.getFluid(aName); - } - if (rFluid.getTemperature() == new Fluid("test").getTemperature()) { - rFluid.setTemperature(aTemperatureK); - } - if (aMaterial != null) { - switch (aState) { - case 0: - aMaterial.mSolid = rFluid; - break; - case 1: - aMaterial.mFluid = rFluid; - break; - case 2: - aMaterial.mGas = rFluid; - break; - case 3: - aMaterial.mPlasma = rFluid; - break; - case 4: - aMaterial.mStandardMoltenFluid = rFluid; - } - } - if ((aFullContainer != null) - && (aEmptyContainer != null) - && (!FluidContainerRegistry.registerFluidContainer( - new FluidStack(rFluid, aFluidAmount), aFullContainer, aEmptyContainer))) { - GT_Values.RA.addFluidCannerRecipe( - aFullContainer, - GT_Utility.getContainerItem(aFullContainer, false), - null, - new FluidStack(rFluid, aFluidAmount)); - } - return rFluid; + return GT_FluidFactory.builder(aName) + .withLocalizedName(aLocalized) + .withStillIconResourceLocation(new ResourceLocation(MOD_ID, "fluids/fluid." + aTexture)) + .withColorRGBA(aRGBa) + .withStateAndTemperature(FluidState.fromValue(aState), aTemperatureK) + .buildAndRegister() + .configureMaterials(aMaterial) + .registerContainers(aFullContainer, aEmptyContainer, aFluidAmount) + .asFluid(); } public File getSaveDirectory() { diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java index b8a76d8980..01327b881f 100644 --- a/src/main/java/gregtech/common/GT_RecipeAdder.java +++ b/src/main/java/gregtech/common/GT_RecipeAdder.java @@ -223,6 +223,45 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aDuration, aEUt, aCleanroom ? -100 : 0); + ItemStack[] itemInputs = {aInput1, aInput2}; + ItemStack[] itemOutputs = {aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6}; + FluidStack[] fluidInputs = {aFluidInput, null, null}; + FluidStack[] fluidOutputs = {aFluidOutput, null, null, null, null, null, null}; + + byte iNumber = 0; + byte oNumber = 0; + + for (ItemStack item : itemInputs) { + if (item != null) { + if (GT_Utility.getFluidForFilledItem(aInput1, true) != null || GT_Utility.isCellEmpty(item)) { + fluidInputs[iNumber + 1] = GT_Utility.convertCellToFluid(item); + itemInputs[iNumber] = null; + } + } + iNumber++; + } + + for (ItemStack item : itemOutputs) { + if (item != null) { + if (GT_Utility.getFluidForFilledItem(item, true) != null || GT_Utility.isCellEmpty(item)) { + fluidOutputs[oNumber + 1] = GT_Utility.convertCellToFluid(item); + itemOutputs[oNumber] = null; + } + } + oNumber++; + } + + GT_Recipe.GT_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe( + false, + itemInputs, + itemOutputs, + null, + aChances, + fluidInputs, + fluidOutputs, + aDuration, + aEUt, + aCleanroom ? -100 : 0); return true; } @@ -308,6 +347,38 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aDuration, aEUt, 0); + ItemStack[] itemInputs = {aInput1, aInput2}; + ItemStack[] itemOutputs = {aOutput1, aOutput2, aOutput3, aOutput4, aOutput5, aOutput6}; + FluidStack[] fluidInputs = {aFluidInput, null, null}; + FluidStack[] fluidOutputs = {aFluidOutput, null, null, null, null, null, null}; + + byte iNumber = 0; + byte oNumber = 0; + + for (ItemStack item : itemInputs) { + if (item != null) { + if (GT_Utility.getFluidForFilledItem(aInput1, true) != null + || GT_Utility.isCellEmpty(item) + || GT_Utility.checkIfSameIntegratedCircuit(item)) { + fluidInputs[iNumber + 1] = GT_Utility.convertCellToFluid(item); + itemInputs[iNumber] = null; + } + } + iNumber++; + } + + for (ItemStack item : itemOutputs) { + if (item != null) { + if (GT_Utility.getFluidForFilledItem(item, true) != null || GT_Utility.isCellEmpty(item)) { + fluidOutputs[oNumber + 1] = GT_Utility.convertCellToFluid(item); + itemOutputs[oNumber] = null; + } + } + oNumber++; + } + + GT_Recipe.GT_Recipe_Map.sMultiblockElectrolyzerRecipes.addRecipe( + false, itemInputs, itemOutputs, null, aChances, fluidInputs, fluidOutputs, aDuration, aEUt, 0); return true; } @@ -2423,6 +2494,36 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aDuration, aEUt, 0); + ItemStack[] itemInputs = {aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9}; + ItemStack[] itemOutputs = {aOutput}; + FluidStack[] fluidInputs = {aFluidInput, null, null, null, null, null, null, null, null, null}; + FluidStack[] fluidOutputs = {aFluidOutput, null}; + + byte iNumber = 0; + byte oNumber = 0; + + for (ItemStack item : itemInputs) { + if (item != null) { + if (GT_Utility.getFluidForFilledItem(aInput1, true) != null || GT_Utility.isCellEmpty(item)) { + fluidInputs[iNumber + 1] = GT_Utility.convertCellToFluid(item); + itemInputs[iNumber] = null; + } + } + iNumber++; + } + + for (ItemStack item : itemOutputs) { + if (item != null) { + if (GT_Utility.getFluidForFilledItem(item, true) != null || GT_Utility.isCellEmpty(item)) { + fluidOutputs[oNumber + 1] = GT_Utility.convertCellToFluid(item); + itemOutputs[oNumber] = null; + } + } + oNumber++; + } + + GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes.addRecipe( + false, itemInputs, itemOutputs, null, null, fluidInputs, fluidOutputs, aDuration, aEUt, 0); return true; } @@ -2445,6 +2546,73 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aDuration, aEUt, 0); + List<ItemStack> tItemInputList; + if (ItemInputArray == null) { + tItemInputList = new ArrayList<>(1); + } else { + tItemInputList = new ArrayList<>(Arrays.asList(ItemInputArray)); + } + List<FluidStack> tFluidInputList; + if (FluidInputArray != null) { + tFluidInputList = new ArrayList<>(Arrays.asList(FluidInputArray)); + } else { + tFluidInputList = new ArrayList<>(1); + } + for (int i = 0; i < tItemInputList.size(); i++) { + if (tItemInputList.get(i) != null) { + if (GT_Utility.getFluidForFilledItem(tItemInputList.get(i), true) != null + || GT_Utility.isCellEmpty(tItemInputList.get(i))) { + tFluidInputList.add(GT_Utility.convertCellToFluid(tItemInputList.get(i))); + tItemInputList.set(i, null); + } + } + } + List<ItemStack> tItemOutputList; + if (ItemInputArray == null) { + tItemOutputList = new ArrayList<>(1); + } else { + tItemOutputList = new ArrayList<>(Arrays.asList(ItemInputArray)); + } + List<FluidStack> tFluidOutputList; + if (FluidOutputArray != null) { + tFluidOutputList = new ArrayList<>(Arrays.asList(FluidOutputArray)); + ; + } else { + tFluidOutputList = new ArrayList<>(1); + } + for (int i = 0; i < tItemOutputList.size(); i++) { + if (tItemOutputList.get(i) != null) { + if (GT_Utility.getFluidForFilledItem(tItemOutputList.get(i), true) != null + || GT_Utility.isCellEmpty(tItemOutputList.get(i))) { + tFluidInputList.add(GT_Utility.convertCellToFluid(tItemOutputList.get(i))); + tItemOutputList.set(i, null); + } + } + } + + ItemStack[] tItemInputArray = new ItemStack[tItemInputList.size()]; + for (int i = 0; i < tItemInputArray.length; i++) tItemInputArray[i] = tItemInputList.get(i); + + FluidStack[] tFluidInputArray = new FluidStack[tFluidInputList.size()]; + for (int i = 0; i < tFluidInputArray.length; i++) tFluidInputArray[i] = tFluidInputList.get(i); + + ItemStack[] tItemOutputArray = new ItemStack[tItemOutputList.size()]; + for (int i = 0; i < tItemOutputArray.length; i++) tItemOutputArray[i] = tItemOutputList.get(i); + + FluidStack[] tFluidOutputArray = new FluidStack[tFluidOutputList.size()]; + for (int i = 0; i < tFluidOutputArray.length; i++) tFluidOutputArray[i] = tFluidOutputList.get(i); + + GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes.addRecipe( + false, + tItemInputArray, + tItemOutputArray, + null, + null, + tFluidInputArray, + tFluidOutputArray, + aDuration, + aEUt, + 0); return true; } @@ -2491,6 +2659,36 @@ public class GT_RecipeAdder implements IGT_RecipeAdder { aDuration, aEUt, 0); + ItemStack[] itemInputs = {aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9}; + ItemStack[] itemOutputs = {aOutput1, aOutput2, aOutput3, aOutput4}; + FluidStack[] fluidInputs = {aFluidInput, null, null, null, null, null, null, null, null, null}; + FluidStack[] fluidOutputs = {aFluidOutput, null, null, null, null}; + + byte iNumber = 0; + byte oNumber = 0; + + for (ItemStack item : itemInputs) { + if (item != null) { + if (GT_Utility.getFluidForFilledItem(aInput1, true) != null || GT_Utility.isCellEmpty(item)) { + fluidInputs[iNumber + 1] = GT_Utility.convertCellToFluid(item); + itemInputs[iNumber] = null; + } + } + iNumber++; + } + + for (ItemStack item : itemOutputs) { + if (item != null) { + if (GT_Utility.getFluidForFilledItem(item, true) != null || GT_Utility.isCellEmpty(item)) { + fluidOutputs[oNumber + 1] = GT_Utility.convertCellToFluid(item); + itemOutputs[oNumber] = null; + } + } + oNumber++; + } + + GT_Recipe.GT_Recipe_Map.sMultiblockMixerRecipes.addRecipe( + false, itemInputs, itemOutputs, null, null, fluidInputs, fluidOutputs, aDuration, aEUt, 0); return true; } diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java index 93aa9992ea..ae41933c1c 100644 --- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java +++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java @@ -39,6 +39,7 @@ import net.minecraft.world.World; public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements ITileEntityProvider { private static final String DOT_NAME = ".name"; + private static final String DOT_TOOLTIP = ".tooltip"; public static ThreadLocal<GT_TileEntity_Ores> mTemporaryTileEntity = new ThreadLocal<>(); public static boolean FUCKING_LOCK = false; public static boolean tHideOres; @@ -66,11 +67,17 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) : getLocalizedName(GregTech_API.sGeneratedMaterials[i])); GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + "." + (i + (j * 1000)) + DOT_TOOLTIP, + GregTech_API.sGeneratedMaterials[i].getToolTip()); + GT_LanguageManager.addStringLocalization( getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_NAME, "Small " + (GT_LanguageManager.i18nPlaceholder ? getLocalizedNameFormat(GregTech_API.sGeneratedMaterials[i]) : getLocalizedName(GregTech_API.sGeneratedMaterials[i]))); + GT_LanguageManager.addStringLocalization( + getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + DOT_TOOLTIP, + GregTech_API.sGeneratedMaterials[i].getToolTip()); if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0 && !aBlockedOres.contains(GregTech_API.sGeneratedMaterials[i])) { GT_OreDictUnificator.registerOre( diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Ores.java b/src/main/java/gregtech/common/blocks/GT_Item_Ores.java index bcf088a621..117e6ae1c6 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Ores.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Ores.java @@ -2,11 +2,14 @@ package gregtech.common.blocks; import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; +import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; import net.minecraft.world.World; +import org.apache.commons.lang3.StringUtils; public class GT_Item_Ores extends ItemBlock { public GT_Item_Ores(Block block) { @@ -83,4 +86,11 @@ public class GT_Item_Ores extends ItemBlock { } return true; } + + @Override + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + String formula = StatCollector.translateToLocal( + field_150939_a.getUnlocalizedName() + '.' + getDamage(aStack) + ".tooltip"); + if (!StringUtils.isBlank(formula)) aList.add(formula); + } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java index 7d824565cb..fb556989c1 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Arm.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Arm.java @@ -359,7 +359,7 @@ public class GT_Cover_Arm extends GT_CoverBehavior { this.getFontRenderer() .drawString( - GT_Utility.trans("254", "Internal slot#"), + GT_Utility.trans("254.1", "Internal slot#"), startX + spaceX * 3, 4 + startY + spaceY * 1, textColor); diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java index 1332fa66c6..8c52ade5d2 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FacadeBase.java @@ -64,10 +64,10 @@ public abstract class GT_Cover_FacadeBase extends GT_CoverBehaviorBase<GT_Cover_ aCoverVariable.mFlags = ((aCoverVariable.mFlags + 1) & 15); GT_Utility.sendChatToPlayer( aPlayer, - ((aCoverVariable.mFlags & 1) != 0 ? GT_Utility.trans("128", "Redstone ") : "") - + ((aCoverVariable.mFlags & 2) != 0 ? GT_Utility.trans("129", "Energy ") : "") - + ((aCoverVariable.mFlags & 4) != 0 ? GT_Utility.trans("130", "Fluids ") : "") - + ((aCoverVariable.mFlags & 8) != 0 ? GT_Utility.trans("131", "Items ") : "")); + ((aCoverVariable.mFlags & 1) != 0 ? GT_Utility.trans("128.1", "Redstone ") : "") + + ((aCoverVariable.mFlags & 2) != 0 ? GT_Utility.trans("129.1", "Energy ") : "") + + ((aCoverVariable.mFlags & 4) != 0 ? GT_Utility.trans("130.1", "Fluids ") : "") + + ((aCoverVariable.mFlags & 8) != 0 ? GT_Utility.trans("131.1", "Items ") : "")); return aCoverVariable; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java index fa20d8206e..2d6fc685c3 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_FluidRegulator.java @@ -461,7 +461,7 @@ public class GT_Cover_FluidRegulator extends GT_CoverBehaviorBase<GT_Cover_Fluid textColor); this.getFontRenderer() .drawString( - GT_Utility.trans("229", "Conditional"), + GT_Utility.trans("230", "Conditional"), startX + spaceX * 4, 4 + startY + spaceY * 1, textColor); diff --git a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java index aee762f36c..2fa545d76d 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_ItemFilter.java @@ -130,8 +130,8 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte GT_Utility.sendChatToPlayer( aPlayer, aCoverVariable.mWhitelist - ? GT_Utility.trans("125", "Whitelist Mode") - : GT_Utility.trans("124", "Blacklist Mode")); + ? GT_Utility.trans("125.1", "Whitelist Mode") + : GT_Utility.trans("124.1", "Blacklist Mode")); return aCoverVariable; } @@ -290,8 +290,8 @@ public class GT_Cover_ItemFilter extends GT_CoverBehaviorBase<GT_Cover_ItemFilte startY + spaceY * 0, GT_GuiIcon.WHITELIST, GT_GuiIcon.BLACKLIST, - GT_Utility.trans("125", "Whitelist Mode"), - GT_Utility.trans("124", "Blacklist Mode")); + GT_Utility.trans("125.1", "Whitelist Mode"), + GT_Utility.trans("124.1", "Blacklist Mode")); itemFilterButtons = new GT_GuiFakeItemButton(this, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.SLOT_GRAY); diff --git a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java index 338a214ada..a77119b413 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_PlayerDetector.java @@ -97,10 +97,10 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { } switch (aCoverVariable) { case 0: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("068", "Emit if any Player is close")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("068.1", "Emit if any Player is close")); break; case 1: - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("069", "Emit if other Player is close")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("069.1", "Emit if other Player is close")); break; case 2: GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("070", "Emit if you are close")); @@ -181,9 +181,9 @@ public class GT_Cover_PlayerDetector extends GT_CoverBehavior { this.coverVariable = aCoverVariable; new GT_GuiIconCheckButton(this, 0, startX + spaceX * 0, startY + spaceY * 0, GT_GuiIcon.CHECKMARK, null) - .setTooltipText(GT_Utility.trans("068", "Emit if any Player is close")); + .setTooltipText(GT_Utility.trans("068.1", "Emit if any Player is close")); new GT_GuiIconCheckButton(this, 1, startX + spaceX * 0, startY + spaceY * 1, GT_GuiIcon.CHECKMARK, null) - .setTooltipText(GT_Utility.trans("069", "Emit if other Player is close")); + .setTooltipText(GT_Utility.trans("069.1", "Emit if other Player is close")); new GT_GuiIconCheckButton(this, 2, startX + spaceX * 0, startY + spaceY * 2, GT_GuiIcon.CHECKMARK, null) .setTooltipText(GT_Utility.trans("070", "Emit if you are close")); } diff --git a/src/main/java/gregtech/common/fluid/GT_Fluid.java b/src/main/java/gregtech/common/fluid/GT_Fluid.java index b8bca3116a..e768358503 100644 --- a/src/main/java/gregtech/common/fluid/GT_Fluid.java +++ b/src/main/java/gregtech/common/fluid/GT_Fluid.java @@ -5,34 +5,38 @@ import gregtech.api.enums.FluidState; import gregtech.api.enums.GT_Values; import gregtech.api.enums.Materials; import gregtech.api.interfaces.fluid.IGT_Fluid; +import gregtech.api.interfaces.fluid.IGT_RegisteredFluid; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_Utility; +import javax.annotation.Nonnull; import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidContainerRegistry; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -public class GT_Fluid extends Fluid implements IGT_Fluid, Runnable { +public class GT_Fluid extends Fluid implements IGT_Fluid, IGT_RegisteredFluid, Runnable { private final String localizedName; private final ResourceLocation stillIconResourceLocation; private final ResourceLocation flowingIconResourceLocation; private final short[] colorRGBA; private final FluidState fluidState; + private final Fluid iconsFrom; private Fluid registeredFluid; + private boolean hasRun = false; /** * Constructs this {@link IGT_Fluid} implementation from an {@link GT_FluidBuilder} instance * * @param builder The {@link GT_FluidBuilder} instance to construct this {@link IGT_Fluid} implementation */ - protected GT_Fluid(final GT_FluidBuilder builder) { + protected GT_Fluid(@Nonnull final GT_FluidBuilder builder) { super(builder.fluidName); this.localizedName = builder.localizedName; this.stillIconResourceLocation = builder.stillIconResourceLocation; this.flowingIconResourceLocation = builder.flowingIconResourceLocation; + this.iconsFrom = builder.iconsFrom; this.block = builder.fluidBlock; this.colorRGBA = builder.colorRGBA; this.fluidState = builder.fluidState; @@ -41,6 +45,37 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, Runnable { } /** + * Adjusts this {@link Fluid}'s settings based on this {@link IGT_Fluid}'s state + */ + protected void configureFromStateTemperature() { + switch (fluidState) { + case SLURRY: + setGaseous(false).setViscosity(10000); + break; + case GAS: + setGaseous(true).setDensity(-100).setViscosity(200); + break; + case PLASMA: + setGaseous(true).setDensity(55536).setViscosity(10).setLuminosity(15); + break; + case MOLTEN: + final int luminosity; + if (temperature >= 3500) { + luminosity = 15; + } else { + luminosity = temperature < 1000 ? 0 : 14 * (temperature - 1000) / 2500 + 1; + } + setLuminosity(luminosity); + case LIQUID: + default: + setGaseous(false).setViscosity(1000); + break; + } + } + + // ----- Fluid implementations ----- + + /** * @inheritDoc */ @Override @@ -50,61 +85,41 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, Runnable { | Math.max(0, Math.min(255, colorRGBA[2])); } - /** - * This {@link Runnable#run()} implementation is scheduled within the {@link GregTech_API#sGTBlockIconload} - * to load this {@link IGT_Fluid}'s texture icons. - * - * @see Runnable#run() - */ - @Override - public void run() { - final IIcon stillIcon = GregTech_API.sBlockIcons.registerIcon(stillIconResourceLocation.toString()); - if (flowingIconResourceLocation == null) { - setIcons(stillIcon); - } else { - final IIcon flowingIcon = GregTech_API.sBlockIcons.registerIcon(flowingIconResourceLocation.toString()); - setIcons(stillIcon, flowingIcon); - } - } + // ----- IGT_Fluid interface implementations ----- - /** - * @inheritDoc - */ - @Override - public IGT_Fluid addFluid() { - - if (FluidRegistry.registerFluid(this)) { + public IGT_RegisteredFluid addFluid() { + if (FluidRegistry.registerFluid(GT_Fluid.this)) { // Registered as a new Fluid - // Adds self as Runnable to the block icons loader run() tasks + registeredFluid = this; + // Schedules the gtFluid for the block icons loader run() tasks GregTech_API.sGTBlockIconload.add(this); // Adds a server-side localized-name - GT_LanguageManager.addStringLocalization(this.getUnlocalizedName(), localizedName); - registeredFluid = this; + GT_LanguageManager.addStringLocalization(getUnlocalizedName(), localizedName); } else { - // Promotes Fluid from the registry to enable GT_Fluid methods - registeredFluid = FluidRegistry.getFluid(fluidName); + // Fluid already registered, get it from the registry + registeredFluid = FluidRegistry.getFluid(GT_Fluid.this.fluidName); // Sets temperature of already registered fluids if they use the default (temperature = 300) if (registeredFluid.getTemperature() == new Fluid("test").getTemperature()) { - registeredFluid.setTemperature(temperature); + registeredFluid.setTemperature(GT_Fluid.this.temperature); } } return this; } + // ----- IGT_RegisteredFluid interface implementations ----- + /** * @inheritDoc */ @Override - public IGT_Fluid registerContainers( + public IGT_RegisteredFluid registerContainers( final ItemStack fullContainer, final ItemStack emptyContainer, final int containerSize) { - if (fullContainer == null || emptyContainer == null) return this; - if (registeredFluid == null) { - throw new IllegalStateException("Cannot register containers for an unregistered fluid"); - } - final FluidStack fluidStack = new FluidStack(registeredFluid, containerSize); - if (!FluidContainerRegistry.registerFluidContainer(fluidStack, fullContainer, emptyContainer)) { - GT_Values.RA.addFluidCannerRecipe( - fullContainer, GT_Utility.getContainerItem(fullContainer, false), null, fluidStack); + if (fullContainer != null && emptyContainer != null) { + final FluidStack fluidStack = new FluidStack(registeredFluid, containerSize); + if (!FluidContainerRegistry.registerFluidContainer(fluidStack, fullContainer, emptyContainer)) { + GT_Values.RA.addFluidCannerRecipe( + fullContainer, GT_Utility.getContainerItem(fullContainer, false), null, fluidStack); + } } return this; } @@ -113,7 +128,7 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, Runnable { * @inheritDoc */ @Override - public IGT_Fluid registerBContainers(final ItemStack fullContainer, final ItemStack emptyContainer) { + public IGT_RegisteredFluid registerBContainers(final ItemStack fullContainer, final ItemStack emptyContainer) { return registerContainers(fullContainer, emptyContainer, 1000); } @@ -121,7 +136,7 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, Runnable { * @inheritDoc */ @Override - public IGT_Fluid registerPContainers(final ItemStack fullContainer, final ItemStack emptyContainer) { + public IGT_RegisteredFluid registerPContainers(final ItemStack fullContainer, final ItemStack emptyContainer) { return registerContainers(fullContainer, emptyContainer, 250); } @@ -129,45 +144,26 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, Runnable { * @inheritDoc */ @Override - public ResourceLocation getStillIconResourceLocation() { - return stillIconResourceLocation; - } - - /** - * @inheritDoc - */ - @Override - public ResourceLocation getFlowingIconResourceLocation() { - return flowingIconResourceLocation; - } - - /** - * @inheritDoc - */ - @Override - public IGT_Fluid configureMaterials(final Materials material) { - if (registeredFluid == null) { - throw new IllegalStateException("Cannot configure Materials with an unregistered fluid"); - } - - switch (fluidState) { - case SLURRY: - material.mSolid = registeredFluid; - break; - case LIQUID: - material.mFluid = registeredFluid; - break; - case GAS: - material.mGas = registeredFluid; - break; - case PLASMA: - material.mPlasma = registeredFluid; - break; - case MOLTEN: - material.mStandardMoltenFluid = registeredFluid; - break; - default: - throw new IllegalStateException("Unexpected FluidState: " + fluidState); + public IGT_RegisteredFluid configureMaterials(final Materials material) { + if (material != null) { + switch (fluidState) { + case SLURRY: + material.mSolid = registeredFluid; + break; + case GAS: + material.mGas = registeredFluid; + break; + case PLASMA: + material.mPlasma = registeredFluid; + break; + case MOLTEN: + material.mStandardMoltenFluid = registeredFluid; + break; + case LIQUID: + default: + material.mFluid = registeredFluid; + break; + } } return this; } @@ -177,33 +173,34 @@ public class GT_Fluid extends Fluid implements IGT_Fluid, Runnable { */ @Override public Fluid asFluid() { - return registeredFluid == null ? this : registeredFluid; + return registeredFluid; } + // ----- Runnable interface implementations ----- + /** - * Adjusts this {@link Fluid}'s settings based on this {@link IGT_Fluid}'s state + * This {@link Runnable#run()} implementation is scheduled within the {@link GregTech_API#sGTBlockIconload} + * to load this {@link IGT_Fluid}'s texture icons. * - * @throws IllegalStateException if {@link FluidState} is unknown + * @see Runnable#run() */ - protected void configureFromStateTemperature() { - switch (fluidState) { - case SLURRY: - setGaseous(false).setViscosity(10000); - break; - case LIQUID: - case MOLTEN: - final int luminosity = - temperature >= 3500 ? 15 : temperature < 1000 ? 0 : 14 * (temperature - 1000) / 2500 + 1; - setGaseous(false).setViscosity(1000).setLuminosity(luminosity); - break; - case GAS: - setGaseous(true).setDensity(-100).setViscosity(200); - break; - case PLASMA: - setGaseous(true).setDensity(55536).setViscosity(10).setLuminosity(15); - break; - default: - throw new IllegalStateException("Unexpected FluidState: " + fluidState); + @Override + public void run() { + if (!hasRun) { + if (iconsFrom instanceof GT_Fluid) { + // Needs the GT_Fluid to have registered its icons + ((GT_Fluid) iconsFrom).run(); + stillIcon = iconsFrom.getStillIcon(); + flowingIcon = iconsFrom.getFlowingIcon(); + } else { + if (stillIconResourceLocation != null) { + stillIcon = GregTech_API.sBlockIcons.registerIcon(stillIconResourceLocation.toString()); + } + if (flowingIconResourceLocation != null) { + flowingIcon = GregTech_API.sBlockIcons.registerIcon(flowingIconResourceLocation.toString()); + } + } + hasRun = true; } } } diff --git a/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java b/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java index b484f7aacb..48d4e0e95e 100644 --- a/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java +++ b/src/main/java/gregtech/common/fluid/GT_FluidBuilder.java @@ -6,21 +6,28 @@ import gregtech.api.enums.Dyes; import gregtech.api.enums.FluidState; import gregtech.api.interfaces.fluid.IGT_Fluid; import gregtech.api.interfaces.fluid.IGT_FluidBuilder; +import gregtech.api.interfaces.fluid.IGT_RegisteredFluid; import java.util.Locale; +import javax.annotation.Nonnull; import net.minecraft.block.Block; +import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; +import net.minecraftforge.fluids.Fluid; public class GT_FluidBuilder implements IGT_FluidBuilder { - protected final String fluidName; - protected String localizedName; - protected ResourceLocation stillIconResourceLocation = null, flowingIconResourceLocation = null; - protected short[] colorRGBA = Dyes._NULL.getRGBA(); - protected Block fluidBlock = null; - protected FluidState fluidState; - protected int temperature; + final String fluidName; + String localizedName; + ResourceLocation stillIconResourceLocation = null, flowingIconResourceLocation = null; + short[] colorRGBA = Dyes._NULL.getRGBA(); + Block fluidBlock = null; + FluidState fluidState; + int temperature; + IIcon stillIcon; + IIcon flowingIcon; + Fluid iconsFrom; public GT_FluidBuilder(final String fluidName) { - this.fluidName = fluidName; + this.fluidName = fluidName.toLowerCase(Locale.ENGLISH); } /** @@ -83,9 +90,8 @@ public class GT_FluidBuilder implements IGT_FluidBuilder { * @inheritDoc */ @Override - public IGT_FluidBuilder withTextureFrom(final IGT_Fluid fromGTFluid) { - this.stillIconResourceLocation = fromGTFluid.getStillIconResourceLocation(); - this.flowingIconResourceLocation = fromGTFluid.getFlowingIconResourceLocation(); + public IGT_FluidBuilder withIconsFrom(@Nonnull final Fluid fromFluid) { + this.iconsFrom = fromFluid; return this; } @@ -114,9 +120,15 @@ public class GT_FluidBuilder implements IGT_FluidBuilder { */ @Override public IGT_Fluid build() { + if (colorRGBA == null) { + colorRGBA = Dyes._NULL.getRGBA(); + } if (stillIconResourceLocation == null) { withTextureName(fluidName.toLowerCase(Locale.ENGLISH)); } + if (localizedName == null) { + localizedName = fluidName; + } return new GT_Fluid(this); } @@ -124,10 +136,7 @@ public class GT_FluidBuilder implements IGT_FluidBuilder { * @inheritDoc */ @Override - public IGT_Fluid buildAndRegister() { - if (stillIconResourceLocation == null) { - withTextureName(fluidName.toLowerCase(Locale.ENGLISH)); - } + public IGT_RegisteredFluid buildAndRegister() { return build().addFluid(); } } diff --git a/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java b/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java index 135c20dafe..e42e145eb3 100644 --- a/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java +++ b/src/main/java/gregtech/common/gui/GT_Container_OutputHatch.java @@ -36,7 +36,7 @@ public class GT_Container_OutputHatch extends GT_Container_BasicTank { if (tReadyLockFluid == null || (tMode >= 8 && tReadyLockFluid.getFluid().getName().equals(tHatch.getLockedFluidName()))) { tHatch.setLockedFluidName(null); - GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("300", "Fluid Lock Cleared.")); + GT_Utility.sendChatToPlayer(aPlayer, GT_Utility.trans("300.1", "Fluid Lock Cleared.")); tHatch.lockFluid(false); } else { tHatch.setLockedFluidName(tReadyLockFluid.getFluid().getName()); diff --git a/src/main/java/gregtech/common/power/Power.java b/src/main/java/gregtech/common/power/Power.java index eac33e7997..9ce749801d 100644 --- a/src/main/java/gregtech/common/power/Power.java +++ b/src/main/java/gregtech/common/power/Power.java @@ -39,7 +39,7 @@ public abstract class Power { } public String getDurationStringTicks() { - return GT_Utility.formatNumbers(getDurationTicks()) + GT_Utility.trans("224", " ticks"); + return GT_Utility.formatNumbers(getDurationTicks()) + GT_Utility.trans("209", " ticks"); } public abstract String getTotalPowerString(); diff --git a/src/main/java/gregtech/common/power/UnspecifiedEUPower.java b/src/main/java/gregtech/common/power/UnspecifiedEUPower.java index c2e3615ad1..5ac85adfee 100644 --- a/src/main/java/gregtech/common/power/UnspecifiedEUPower.java +++ b/src/main/java/gregtech/common/power/UnspecifiedEUPower.java @@ -3,8 +3,8 @@ package gregtech.common.power; import gregtech.api.util.GT_Utility; public class UnspecifiedEUPower extends EUPower { - private final String VOLTAGE = GT_Utility.trans("156", "unspecified"); - private final String AMPERAGE = GT_Utility.trans("157", "unspecified"); + private final String VOLTAGE = GT_Utility.trans("271", "unspecified"); + private final String AMPERAGE = GT_Utility.trans("271", "unspecified"); public UnspecifiedEUPower(byte tier, int amperage) { super(tier, amperage); diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java index edc8ef78e4..71c4cbb258 100644 --- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java +++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_Regulator.java @@ -58,7 +58,7 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer { @Override public boolean isValidSlot(int aIndex) { - return aIndex < 9; + return aIndex < 9 || aIndex == rechargerSlotStartIndex(); } @Override @@ -132,8 +132,10 @@ public class GT_MetaTileEntity_Regulator extends GT_MetaTileEntity_Buffer { @Override public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) - && (GT_Utility.areStacksEqual(aStack, this.mInventory[(aIndex + 9)])); + return super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack) + && aIndex >= 0 + && aIndex <= 8 + && GT_Utility.areStacksEqual(aStack, this.mInventory[(aIndex + 9)]); } @Override diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java index 0d4b6cc233..b1bdbd6674 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_IntegratedOreFactory.java @@ -114,6 +114,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory private ItemStack[] sMidProduct; private int sMode = 0; private boolean sVoidStone = false; + private int currentParallelism = 0; private static void initHash() { for (String name : OreDictionary.getOreNames()) { @@ -296,6 +297,9 @@ public class GT_MetaTileEntity_IntegratedOreFactory } } + // for scanner + setCurrentParallelism(tRealUsed); + if (tRealUsed == 0) { return false; } @@ -397,6 +401,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory public void loadNBTData(NBTTagCompound aNBT) { sMode = aNBT.getInteger("ssMode"); sVoidStone = aNBT.getBoolean("ssStone"); + currentParallelism = aNBT.getInteger("currentParallelism"); super.loadNBTData(aNBT); } @@ -404,6 +409,7 @@ public class GT_MetaTileEntity_IntegratedOreFactory public void saveNBTData(NBTTagCompound aNBT) { aNBT.setInteger("ssMode", sMode); aNBT.setBoolean("ssStone", sVoidStone); + aNBT.setInteger("currentParallelism", currentParallelism); super.saveNBTData(aNBT); } @@ -646,6 +652,23 @@ public class GT_MetaTileEntity_IntegratedOreFactory return new GT_MetaTileEntity_IntegratedOreFactory(mName); } + private void setCurrentParallelism(int parallelism) { + this.currentParallelism = parallelism; + } + + private int getCurrentParallelism() { + return this.currentParallelism; + } + + @Override + public String[] getInfoData() { + List<String> informationData = Arrays.asList(super.getInfoData()); + String parallelism = StatCollector.translateToLocal("GT5U.multiblock.parallelism") + ": " + + EnumChatFormatting.BLUE + getCurrentParallelism() + EnumChatFormatting.RESET; + informationData.add(parallelism); + return informationData.toArray(new String[0]); + } + @Override public ITexture[] getTexture( IGregTechTileEntity aBaseMetaTileEntity, diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java index 716a8c9cc6..9838076440 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine.java @@ -148,7 +148,7 @@ public abstract class GT_MetaTileEntity_LargeTurbine return false; } ArrayList<FluidStack> tFluids = getStoredFluids(); - if (tFluids.size() > 0) { + if (!tFluids.isEmpty()) { if (baseEff == 0 || optFlow == 0 @@ -305,8 +305,8 @@ public abstract class GT_MetaTileEntity_LargeTurbine } String[] ret = new String[] { // 8 Lines available for information panels - tRunning + ": " + EnumChatFormatting.RED + GT_Utility.formatNumbers(mEUt) + EnumChatFormatting.RESET - + " EU/t", /* 1 */ + tRunning + ": " + EnumChatFormatting.RED + GT_Utility.formatNumbers(((long) mEUt * mEfficiency) / 10000) + + EnumChatFormatting.RESET + " EU/t", /* 1 */ tMaintainance, /* 2 */ StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " + EnumChatFormatting.YELLOW + (mEfficiency / 100F) + EnumChatFormatting.RESET + "%", /* 2 */ diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java index 21e9572d20..b90d876883 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Plasma.java @@ -238,6 +238,10 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(aStack).mToolSpeed * 50)); overflowMultiplier = getOverflowMultiplier(aStack); + + flowMultipliers[0] = GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mSteamMultiplier; + flowMultipliers[1] = GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mGasMultiplier; + flowMultipliers[2] = GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mPlasmaMultiplier; } else { counter++; } @@ -323,8 +327,8 @@ public class GT_MetaTileEntity_LargeTurbine_Plasma extends GT_MetaTileEntity_Lar } String[] ret = new String[] { // 8 Lines available for information panels - tRunning + ": " + EnumChatFormatting.RED + GT_Utility.formatNumbers(mEUt) + EnumChatFormatting.RESET - + " EU/t", /* 1 */ + tRunning + ": " + EnumChatFormatting.RED + GT_Utility.formatNumbers(((long) mEUt * mEfficiency) / 10000) + + EnumChatFormatting.RESET + " EU/t", /* 1 */ tMaintainance, /* 2 */ StatCollector.translateToLocal("GT5U.turbine.efficiency") + ": " + EnumChatFormatting.YELLOW + (mEfficiency / 100F) + EnumChatFormatting.RESET + "%", /* 2 */ diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java index 538290a4e8..0e68b0f312 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java @@ -330,8 +330,10 @@ public class GT_MetaTileEntity_ProcessingArray tOut[h].stackSize = 0; } } - FluidStack tFOut = null; - if (aRecipe.getFluidOutput(0) != null) tFOut = aRecipe.getFluidOutput(0).copy(); + FluidStack[] tFOut = new FluidStack[aRecipe.mFluidOutputs.length]; + for (int i = 0; i < aRecipe.mFluidOutputs.length; i++) + if (aRecipe.getFluidOutput(i) != null) + tFOut[i] = aRecipe.getFluidOutput(i).copy(); for (int f = 0; f < tOut.length; f++) { if (aRecipe.mOutputs[f] != null && tOut[f] != null) { for (int g = 0; g < parallel; g++) { @@ -340,9 +342,13 @@ public class GT_MetaTileEntity_ProcessingArray } } } - if (tFOut != null) { - int tSize = tFOut.amount; - tFOut.amount = tSize * parallel; + byte oNumber = 0; + for (FluidStack fluidStack : tFOut) { + if (fluidStack != null) { + int tSize = fluidStack.amount; + tFOut[oNumber].amount = tSize * parallel; + } + oNumber++; } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); this.mOutputItems = Arrays.stream(tOut) @@ -350,7 +356,7 @@ public class GT_MetaTileEntity_ProcessingArray .flatMap(GT_MetaTileEntity_ProcessingArray::splitOversizedStack) .filter(is -> is.stackSize > 0) .toArray(ItemStack[]::new); - this.mOutputFluids = new FluidStack[] {tFOut}; + this.mOutputFluids = tFOut; updateSlots(); return true; } diff --git a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java index 9a7c75cb83..00057aab45 100644 --- a/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java +++ b/src/main/java/gregtech/common/tileentities/storage/GT_MetaTileEntity_DigitalTankBase.java @@ -439,7 +439,7 @@ public abstract class GT_MetaTileEntity_DigitalTankBase extends GT_MetaTileEntit @Override public FluidTankInfo getInfo() { - return new FluidTankInfo(getFluid(), getRealCapacity()); + return new FluidTankInfo(getFluid(), getCapacity()); } @Override diff --git a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java index ab9d96ae05..321c56e445 100644 --- a/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java +++ b/src/main/java/gregtech/loaders/misc/GT_BeeDefinition.java @@ -1200,7 +1200,7 @@ public enum GT_BeeDefinition implements IBeeDefinition { }, dis -> { IBeeMutationCustom tMutation = dis.registerMutation(FIRESTONE, COAL, 4); - tMutation.requireResource("industrialTNT"); + tMutation.requireResource(GameRegistry.findBlock("IC2", "blockITNT"), 0); }), // Alloy REDALLOY( diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index c20709fe88..d06b253328 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -360,14 +360,14 @@ public class GT_MachineRecipeLoader implements Runnable { 120); GT_Values.RA.addMixerRecipe( GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Copper, 3L), - GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Electrum, 1L), + GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Electrum, 2L), GT_Values.NI, GT_Values.NI, GT_Values.NI, GT_Utility.getIntegratedCircuit(1), GT_Values.NF, GT_Values.NF, - GT_OreDictUnificator.getDust(Materials.BlackBronze, 4L * OrePrefixes.dust.mMaterialAmount), + GT_OreDictUnificator.getDust(Materials.BlackBronze, 5L * OrePrefixes.dust.mMaterialAmount), (int) (500L * OrePrefixes.dust.mMaterialAmount / 3628800L), 8); GT_Values.RA.addMixerRecipe( @@ -7153,6 +7153,20 @@ public class GT_MachineRecipeLoader implements Runnable { 30, 30); GT_Values.RA.addElectrolyzerRecipe( + GT_ModHandler.getIC2Item("electrolyzedWaterCell", 1L), + GT_Utility.getIntegratedCircuit(1), + GT_Values.NF, + Materials.Hydrogen.getGas(2000L), + GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oxygen, 1L), + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + GT_Values.NI, + null, + 30, + 30); + GT_Values.RA.addElectrolyzerRecipe( GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L), 0, GT_ModHandler.getIC2Item("electrolyzedWaterCell", 1L), @@ -10757,11 +10771,11 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.NF, Materials.Quicklime.getDust(18), Materials.Potash.getDust(9), - Materials.Magnesia.getDust(9), - Materials.PhosphorousPentoxide.getDust(4), - Materials.SodaAsh.getDust(4), + Materials.Magnesia.getDust(1), + Materials.PhosphorousPentoxide.getDust(2), + Materials.SodaAsh.getDust(1), Materials.BandedIron.getDust(4), - new int[] {6400, 6000, 500, 5000, 2500, 10000}, + new int[] {6400, 6000, 4500, 10000, 10000, 10000}, 6000, 30); // Stone Dust and Metal Mixture centrifuge recipes @@ -10774,9 +10788,9 @@ public class GT_MachineRecipeLoader implements Runnable { Materials.PotassiumFeldspar.getDust(9), Materials.Marble.getDust(8), Materials.Biotite.getDust(4), - Materials.MetalMixture.getDust(4), - Materials.Sodalite.getDust(4), - new int[] {10000, 10000, 10000, 10000, 7500, 5000}, + Materials.MetalMixture.getDust(3), + Materials.Sodalite.getDust(2), + new int[] {10000, 10000, 10000, 10000, 10000, 10000}, 8640, 30); GT_Values.RA.addCentrifugeRecipe( @@ -10788,9 +10802,9 @@ public class GT_MachineRecipeLoader implements Runnable { Materials.Bauxite.getDust(9), Materials.Pyrolusite.getDust(8), Materials.Barite.getDust(4), - Materials.Chromite.getDust(4), - Materials.Ilmenite.getDust(4), - new int[] {10000, 10000, 10000, 10000, 7500, 5000}, + Materials.Chromite.getDust(3), + Materials.Ilmenite.getDust(2), + new int[] {10000, 10000, 10000, 10000, 10000, 10000}, 13125, 1920); diff --git a/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java index c9564dcd4a..b758ab2004 100644 --- a/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_ProcessingArrayRecipeLoader.java @@ -24,11 +24,13 @@ public class GT_ProcessingArrayRecipeLoader { // Canner GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.canner", GT_Recipe_Map.sCannerRecipes); // Centrifuge - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.centrifuge", GT_Recipe_Map.sCentrifugeRecipes); + GT_ProcessingArray_Manager.addRecipeMapToPA( + "basicmachine.centrifuge", GT_Recipe_Map.sMultiblockCentrifugeRecipes); // Chemical Bath GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.chemicalbath", GT_Recipe_Map.sChemicalBathRecipes); // Chemical Reactor - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.chemicalreactor", GT_Recipe_Map.sChemicalRecipes); + GT_ProcessingArray_Manager.addRecipeMapToPA( + "basicmachine.chemicalreactor", GT_Recipe_Map.sMultiblockChemicalRecipes); // Circuit Assembler GT_ProcessingArray_Manager.addRecipeMapToPA( "basicmachine.circuitassembler", GT_Recipe_Map.sCircuitAssemblerRecipes); @@ -39,7 +41,8 @@ public class GT_ProcessingArrayRecipeLoader { // Distillery GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.distillery", GT_Recipe_Map.sDistilleryRecipes); // Electrolyzer - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.electrolyzer", GT_Recipe_Map.sElectrolyzerRecipes); + GT_ProcessingArray_Manager.addRecipeMapToPA( + "basicmachine.electrolyzer", GT_Recipe_Map.sMultiblockElectrolyzerRecipes); // Extractor GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.extractor", GT_Recipe_Map.sExtractorRecipes); // Extruder @@ -74,7 +77,7 @@ public class GT_ProcessingArrayRecipeLoader { // Microwave GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.microwave", GT_Recipe_Map.sMicrowaveRecipes); // Mixer - GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.mixer", GT_Recipe_Map.sMixerRecipes); + GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.mixer", GT_Recipe_Map.sMultiblockMixerRecipes); // Ore Washer GT_ProcessingArray_Manager.addRecipeMapToPA("basicmachine.orewasher", GT_Recipe_Map.sOreWasherRecipes); // Plasma Arc Furnace diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java index 633a8d77ae..ad85963075 100644 --- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java +++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java @@ -915,8 +915,7 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { Materials.Ice.mGas = Materials.Water.mGas; Materials.Water.mGas.setTemperature(375).setGaseous(true); - ItemList.sOilExtraHeavy = GT_FluidFactory.of("liquid_extra_heavy_oil", "Very Heavy Oil", LIQUID, 295) - .asFluid(); + ItemList.sOilExtraHeavy = GT_FluidFactory.of("liquid_extra_heavy_oil", "Very Heavy Oil", LIQUID, 295); ItemList.sEpichlorhydrin = GT_FluidFactory.builder("liquid_epichlorhydrin") .withLocalizedName("Epichlorohydrin") .withStateAndTemperature(LIQUID, 295) @@ -924,8 +923,7 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { .configureMaterials(Materials.Epichlorohydrin) .registerBContainers(Materials.Epichlorohydrin.getCells(1), Materials.Empty.getCells(1)) .asFluid(); - ItemList.sDrillingFluid = GT_FluidFactory.of("liquid_drillingfluid", "Drilling Fluid", LIQUID, 295) - .asFluid(); + ItemList.sDrillingFluid = GT_FluidFactory.of("liquid_drillingfluid", "Drilling Fluid", LIQUID, 295); ItemList.sToluene = GT_FluidFactory.builder("liquid_toluene") .withLocalizedName("Toluene") .withStateAndTemperature(LIQUID, 295) @@ -1321,21 +1319,23 @@ public class GT_Loader_Item_Block_And_Fluid implements Runnable { for (byte i = 0; i < Dyes.VALUES.length; i = (byte) (i + 1)) { Dyes tDye = Dyes.VALUES[i]; Fluid tFluid; - tDye.addFluidDye((Fluid) + tDye.addFluidDye( GT_FluidFactory.builder("dye.watermixed." + tDye.name().toLowerCase(Locale.ENGLISH)) .withTextureName("dyes") .withLocalizedName("Water Mixed " + tDye.mName + " Dye") .withColorRGBA(tDye.getRGBA()) .withStateAndTemperature(LIQUID, 295) - .buildAndRegister()); - tDye.addFluidDye((Fluid) GT_FluidFactory.builder( - "dye.chemical." + tDye.name().toLowerCase(Locale.ENGLISH)) - .withTextureName("dyes") - .withLocalizedName("Chemical " + tDye.mName + " Dye") - .withColorRGBA(tDye.getRGBA()) - .withStateAndTemperature(LIQUID, 295) - .buildAndRegister() - .registerContainers(ItemList.SPRAY_CAN_DYES[i].get(1L), ItemList.Spray_Empty.get(1L), 2304)); + .buildAndRegister() + .asFluid()); + tDye.addFluidDye( + GT_FluidFactory.builder("dye.chemical." + tDye.name().toLowerCase(Locale.ENGLISH)) + .withTextureName("dyes") + .withLocalizedName("Chemical " + tDye.mName + " Dye") + .withColorRGBA(tDye.getRGBA()) + .withStateAndTemperature(LIQUID, 295) + .buildAndRegister() + .registerContainers(ItemList.SPRAY_CAN_DYES[i].get(1L), ItemList.Spray_Empty.get(1L), 2304) + .asFluid()); } GT_FluidFactory.builder("ice") .withLocalizedName("Crushed Ice") diff --git a/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java b/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java index e75b5e3ad0..90b0532bbc 100644 --- a/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_AssLineHandler.java @@ -322,7 +322,7 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { 10, y, EnumChatFormatting.ITALIC - + GT_Utility.trans("226", "Original Recipe by: ") + + GT_Utility.trans("273", "Original Recipe by: ") + recipe.owners.get(0).getName(), 0xFF000000); y += 10; @@ -331,7 +331,7 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { 10, y, EnumChatFormatting.ITALIC - + GT_Utility.trans("227", "Modified by: ") + + GT_Utility.trans("274", "Modified by: ") + recipe.owners.get(i).getName(), 0xFF000000); y += 10; @@ -341,7 +341,7 @@ public class GT_NEI_AssLineHandler extends RecipeMapHandler { 10, y, EnumChatFormatting.ITALIC - + GT_Utility.trans("225", "Recipe by: ") + + GT_Utility.trans("272", "Recipe by: ") + recipe.owners.get(0).getName(), 0xFF000000); y += 10; diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java index 1675c50b43..d5c59c61c6 100644 --- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java +++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java @@ -394,7 +394,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { originalPower.computePowerUsageAndDuration(recipe.mEUt, recipe.mDuration); drawLine( lineCounter, - GT_Utility.trans("228", "Original voltage: ") + originalPower.getVoltageString()); + GT_Utility.trans("275", "Original voltage: ") + originalPower.getVoltageString()); lineCounter++; } } @@ -452,14 +452,14 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { drawLine( lineCounter, EnumChatFormatting.ITALIC - + GT_Utility.trans("226", "Original Recipe by: ") + + GT_Utility.trans("273", "Original Recipe by: ") + recipe.owners.get(0).getName()); lineCounter++; for (int i = 1; i < recipe.owners.size(); i++) { drawLine( lineCounter, EnumChatFormatting.ITALIC - + GT_Utility.trans("227", "Modified by: ") + + GT_Utility.trans("274", "Modified by: ") + recipe.owners.get(i).getName()); lineCounter++; } @@ -467,7 +467,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { drawLine( lineCounter, EnumChatFormatting.ITALIC - + GT_Utility.trans("225", "Recipe by: ") + + GT_Utility.trans("272", "Recipe by: ") + recipe.owners.get(0).getName()); lineCounter++; } @@ -502,7 +502,7 @@ public class GT_NEI_DefaultHandler extends RecipeMapHandler { } else if (specialValue == -201) { specialInfo = GT_Utility.trans("206", "Scan for Assembly Line"); } else if (specialValue == -300 && GT_Mod.gregtechproxy.mEnableCleanroom) { - specialInfo = GT_Utility.trans("160", "Needs Cleanroom & LowGrav"); + specialInfo = GT_Utility.trans("160.1", "Needs Cleanroom & LowGrav"); } else if (specialValue == -400) { specialInfo = GT_Utility.trans("216", "Deprecated Recipe"); } else if (hasSpecialValueFormat()) { |