diff --git a/src/main/java/gregtech/api/capability/ICoolantHandler.java b/src/main/java/gregtech/api/capability/ICoolantHandler.java index 61068c77705..c65cceb9245 100644 --- a/src/main/java/gregtech/api/capability/ICoolantHandler.java +++ b/src/main/java/gregtech/api/capability/ICoolantHandler.java @@ -1,8 +1,6 @@ package gregtech.api.capability; import gregtech.api.capability.impl.LockableFluidTank; -import gregtech.api.unification.material.Material; - import gregtech.api.unification.material.properties.CoolantProperty; import net.minecraft.util.EnumFacing; diff --git a/src/main/java/gregtech/api/capability/IFuelRodHandler.java b/src/main/java/gregtech/api/capability/IFuelRodHandler.java index a0c0bb68946..c5630377c3d 100644 --- a/src/main/java/gregtech/api/capability/IFuelRodHandler.java +++ b/src/main/java/gregtech/api/capability/IFuelRodHandler.java @@ -2,8 +2,6 @@ import gregtech.api.items.itemhandlers.LockableItemStackHandler; import gregtech.api.nuclear.fission.components.FuelRod; -import gregtech.api.unification.material.Material; - import gregtech.api.unification.material.properties.FissionFuelProperty; import net.minecraft.item.ItemStack; @@ -18,6 +16,7 @@ public interface IFuelRodHandler extends ILockableHandler { /** * Set the fuel type that's currently being processed by this specific handler. + * * @param prop The new fuel type. * @return true if the partial fuel changed. */ diff --git a/src/main/java/gregtech/api/capability/impl/PrimitiveRecipeLogic.java b/src/main/java/gregtech/api/capability/impl/PrimitiveRecipeLogic.java index f085c17ad55..95ce6f0c269 100644 --- a/src/main/java/gregtech/api/capability/impl/PrimitiveRecipeLogic.java +++ b/src/main/java/gregtech/api/capability/impl/PrimitiveRecipeLogic.java @@ -2,8 +2,6 @@ import gregtech.api.GTValues; import gregtech.api.metatileentity.multiblock.MultiblockWithDisplayBase; -import gregtech.api.metatileentity.multiblock.RecipeMapMultiblockController; -import gregtech.api.metatileentity.multiblock.RecipeMapPrimitiveMultiblockController; import gregtech.api.recipes.RecipeMap; import gregtech.api.recipes.recipeproperties.IRecipePropertyStorage; diff --git a/src/main/java/gregtech/api/metatileentity/multiblock/RecipeMapPrimitiveMultiblockController.java b/src/main/java/gregtech/api/metatileentity/multiblock/RecipeMapPrimitiveMultiblockController.java index da874e0bdb8..43d89bddc13 100644 --- a/src/main/java/gregtech/api/metatileentity/multiblock/RecipeMapPrimitiveMultiblockController.java +++ b/src/main/java/gregtech/api/metatileentity/multiblock/RecipeMapPrimitiveMultiblockController.java @@ -11,7 +11,6 @@ import net.minecraft.util.EnumFacing; import net.minecraft.util.ResourceLocation; -import net.minecraft.util.SoundEvent; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.fluids.FluidTank; import net.minecraftforge.fluids.capability.CapabilityFluidHandler; @@ -20,12 +19,10 @@ import java.util.ArrayList; import java.util.List; -public abstract class RecipeMapPrimitiveMultiblockController extends MultiblockWithDisplayBase { - - protected PrimitiveRecipeLogic recipeMapWorkable; +public abstract class RecipeMapPrimitiveMultiblockController extends RecipeMapMultiblockController { public RecipeMapPrimitiveMultiblockController(ResourceLocation metaTileEntityId, RecipeMap recipeMap) { - super(metaTileEntityId); + super(metaTileEntityId, recipeMap); this.recipeMapWorkable = new PrimitiveRecipeLogic(this, recipeMap); initializeAbilities(); } @@ -62,32 +59,11 @@ public T getCapability(Capability capability, EnumFacing side) { return super.getCapability(capability, side); } - @Override - protected void updateFormedValid() { - recipeMapWorkable.update(); - } - - @Override - public boolean isActive() { - return super.isActive() && this.recipeMapWorkable.isWorkingEnabled() && this.recipeMapWorkable.isActive(); - } - - @Override - public void invalidateStructure() { - super.invalidateStructure(); - recipeMapWorkable.invalidate(); - } - @Override protected boolean shouldUpdate(MTETrait trait) { return !(trait instanceof PrimitiveRecipeLogic); } - @Override - public SoundEvent getSound() { - return recipeMapWorkable.getRecipeMap().getSound(); - } - @Override protected boolean openGUIOnRightClick() { return isStructureFormed(); diff --git a/src/main/java/gregtech/api/nuclear/fission/FissionReactor.java b/src/main/java/gregtech/api/nuclear/fission/FissionReactor.java index db5ef9d276b..f13e1d1e543 100644 --- a/src/main/java/gregtech/api/nuclear/fission/FissionReactor.java +++ b/src/main/java/gregtech/api/nuclear/fission/FissionReactor.java @@ -9,15 +9,12 @@ import gregtech.api.unification.material.properties.PropertyKey; import gregtech.common.ConfigHolder; -import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; - import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.fluids.FluidStack; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import java.util.Set; public class FissionReactor { diff --git a/src/main/java/gregtech/api/nuclear/fission/ICoolantStats.java b/src/main/java/gregtech/api/nuclear/fission/ICoolantStats.java index e3861cef447..71d0dc25d67 100644 --- a/src/main/java/gregtech/api/nuclear/fission/ICoolantStats.java +++ b/src/main/java/gregtech/api/nuclear/fission/ICoolantStats.java @@ -16,7 +16,7 @@ public interface ICoolantStats { /** * @return A factor relating to the neutron moderation properties; the higher the factor, the fewer neutrons pass - * through. + * through. */ double getModeratorFactor(); @@ -31,9 +31,8 @@ public interface ICoolantStats { double getBoilingPoint(); /** - * @return If the coolant reacts with zirconium cladding at high temperatures. This is true for mostly water-based coolants. + * @return If the coolant reacts with zirconium cladding at high temperatures. This is true for mostly water-based + * coolants. */ boolean accumulatesHydrogen(); - - } diff --git a/src/main/java/gregtech/api/nuclear/fission/IFissionFuelStats.java b/src/main/java/gregtech/api/nuclear/fission/IFissionFuelStats.java index 7e67e34ad41..d84dfa540d6 100644 --- a/src/main/java/gregtech/api/nuclear/fission/IFissionFuelStats.java +++ b/src/main/java/gregtech/api/nuclear/fission/IFissionFuelStats.java @@ -8,10 +8,9 @@ public interface IFissionFuelStats { /** * Used internally to get the depleted fuel the first time; do not call this yourself! + * * @return The depleted fuel to be put into the fuel registry. */ @NotNull ItemStack getDepletedFuel(); - - } diff --git a/src/main/java/gregtech/api/nuclear/fission/components/ControlRod.java b/src/main/java/gregtech/api/nuclear/fission/components/ControlRod.java index a69f55dd40c..1a8590a0cb9 100644 --- a/src/main/java/gregtech/api/nuclear/fission/components/ControlRod.java +++ b/src/main/java/gregtech/api/nuclear/fission/components/ControlRod.java @@ -49,7 +49,6 @@ public void addFuelRodPair() { relatedFuelRodPairs++; } - public void increaseWeight() { weight++; } diff --git a/src/main/java/gregtech/api/nuclear/fission/components/CoolantChannel.java b/src/main/java/gregtech/api/nuclear/fission/components/CoolantChannel.java index b9201a6a016..b360fa27034 100644 --- a/src/main/java/gregtech/api/nuclear/fission/components/CoolantChannel.java +++ b/src/main/java/gregtech/api/nuclear/fission/components/CoolantChannel.java @@ -42,7 +42,6 @@ public void addFuelRodPair() { relatedFuelRodPairs++; } - public double getWeight() { return weight; } diff --git a/src/main/java/gregtech/api/unification/material/Material.java b/src/main/java/gregtech/api/unification/material/Material.java index 0b1fabd71ca..e32aacbfba7 100644 --- a/src/main/java/gregtech/api/unification/material/Material.java +++ b/src/main/java/gregtech/api/unification/material/Material.java @@ -1099,8 +1099,8 @@ public Builder fissionFuelProperties(int maxTemperature, int duration, double sl } public Builder coolant(Material hotHPCoolant, double moderatorFactor, double coolingFactor, - double boilingPoint, - double heatOfVaporization, double specificHeatCapacity) { + double boilingPoint, + double heatOfVaporization, double specificHeatCapacity) { properties.ensureSet(PropertyKey.FLUID); properties.setProperty(PropertyKey.COOLANT, new CoolantProperty(hotHPCoolant, properties.getProperty(PropertyKey.FLUID).getPrimaryKey(), @@ -1110,8 +1110,8 @@ public Builder coolant(Material hotHPCoolant, double moderatorFactor, double coo } public Builder coolant(Material hotHPCoolant, FluidStorageKey key, double moderatorFactor, - double coolingFactor, double boilingPoint, - double heatOfVaporization, double specificHeatCapacity) { + double coolingFactor, double boilingPoint, + double heatOfVaporization, double specificHeatCapacity) { properties.ensureSet(PropertyKey.FLUID); properties.setProperty(PropertyKey.COOLANT, new CoolantProperty(hotHPCoolant, key, moderatorFactor, coolingFactor, boilingPoint, diff --git a/src/main/java/gregtech/api/unification/ore/OrePrefix.java b/src/main/java/gregtech/api/unification/ore/OrePrefix.java index 9d1073ebfa8..1705582a716 100644 --- a/src/main/java/gregtech/api/unification/ore/OrePrefix.java +++ b/src/main/java/gregtech/api/unification/ore/OrePrefix.java @@ -149,7 +149,7 @@ public class OrePrefix { // 2 Plates combined in one Item public static final OrePrefix plateDouble = new OrePrefix("plateDouble", M * 2, null, MaterialIconType.plateDouble, ENABLE_UNIFICATION, hasIngotProperty - .and(mat -> mat.hasFlags(GENERATE_PLATE, GENERATE_DOUBLE_PLATE) && !mat.hasFlag(NO_SMASHING))); + .and(mat -> mat.hasFlags(GENERATE_PLATE, GENERATE_DOUBLE_PLATE) && !mat.hasFlag(NO_SMASHING))); // Regular Plate made of one Ingot/Dust. Introduced by Calclavia public static final OrePrefix plate = new OrePrefix("plate", M, null, MaterialIconType.plate, ENABLE_UNIFICATION, mat -> mat.hasFlag(GENERATE_PLATE)); @@ -221,7 +221,7 @@ public class OrePrefix { // made of 5 Ingots. public static final OrePrefix turbineBlade = new OrePrefix("turbineBlade", M * 10, null, MaterialIconType.turbineBlade, ENABLE_UNIFICATION, hasRotorProperty - .and(m -> m.hasFlags(GENERATE_BOLT_SCREW, GENERATE_PLATE) && !m.hasProperty(PropertyKey.GEM))); + .and(m -> m.hasFlags(GENERATE_BOLT_SCREW, GENERATE_PLATE) && !m.hasProperty(PropertyKey.GEM))); public static final OrePrefix paneGlass = new OrePrefix("paneGlass", -1, MarkerMaterials.Color.Colorless, null, SELF_REFERENCING, null); diff --git a/src/main/java/gregtech/common/metatileentities/multi/MetaTileEntityFissionReactor.java b/src/main/java/gregtech/common/metatileentities/multi/MetaTileEntityFissionReactor.java index 84c4b439981..6f4ab72cde3 100644 --- a/src/main/java/gregtech/common/metatileentities/multi/MetaTileEntityFissionReactor.java +++ b/src/main/java/gregtech/common/metatileentities/multi/MetaTileEntityFissionReactor.java @@ -57,7 +57,6 @@ import gregtech.common.metatileentities.MetaTileEntities; import gregtech.common.metatileentities.multi.multiblockpart.MetaTileEntityControlRodPort; import gregtech.common.metatileentities.multi.multiblockpart.MetaTileEntityCoolantExportHatch; -import gregtech.common.metatileentities.multi.multiblockpart.MetaTileEntityFuelRodImportBus; import net.minecraft.block.state.IBlockState; import net.minecraft.client.resources.I18n; @@ -375,26 +374,28 @@ public void updateFormedValid() { canWork = false; this.lockingState = LockingState.MISSING_FUEL; break; - } /* TODO else if (!((MetaTileEntityFuelRodImportBus) fuelImport).getExportHatch(this.height - 1) - .getExportItems().insertItem(0, - OreDictUnifier.get(OrePrefix.fuelRodHotDepleted, fuelImport.getFuel()), true) - .isEmpty()) { - // We still need to know if the output is blocked, even if the recipe doesn't start - // yet - canWork = false; - this.lockingState = LockingState.FUEL_CLOGGED; - break; - } - */ + } /* + * TODO else if (!((MetaTileEntityFuelRodImportBus) fuelImport).getExportHatch(this.height - + * 1) + * .getExportItems().insertItem(0, + * OreDictUnifier.get(OrePrefix.fuelRodHotDepleted, fuelImport.getFuel()), true) + * .isEmpty()) { + * // We still need to know if the output is blocked, even if the recipe doesn't start + * // yet + * canWork = false; + * this.lockingState = LockingState.FUEL_CLOGGED; + * break; + * } + */ } for (IFuelRodHandler fuelImport : this.getAbilities(MultiblockAbility.IMPORT_FUEL_ROD)) { if (fissionReactor.needsOutput) { - // TODO ((MetaTileEntityFuelRodImportBus) fuelImport).getExportHatch(this.height - 1) - // .getExportItems().insertItem(0, - // OreDictUnifier.get(OrePrefix.fuelRodHotDepleted, - // fuelImport.getPartialFuel()), - // false); + // TODO ((MetaTileEntityFuelRodImportBus) fuelImport).getExportHatch(this.height - 1) + // .getExportItems().insertItem(0, + // OreDictUnifier.get(OrePrefix.fuelRodHotDepleted, + // fuelImport.getPartialFuel()), + // false); this.fissionReactor.fuelMass -= 60; } if (canWork) { diff --git a/src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityFuelRodImportBus.java b/src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityFuelRodImportBus.java index 7e325c1083c..5474ee1e27e 100644 --- a/src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityFuelRodImportBus.java +++ b/src/main/java/gregtech/common/metatileentities/multi/multiblockpart/MetaTileEntityFuelRodImportBus.java @@ -1,6 +1,5 @@ package gregtech.common.metatileentities.multi.multiblockpart; -import gregtech.api.GregTechAPI; import gregtech.api.capability.IControllable; import gregtech.api.capability.IFuelRodHandler; import gregtech.api.gui.GuiTextures; @@ -12,12 +11,8 @@ import gregtech.api.metatileentity.multiblock.IFissionReactorHatch; import gregtech.api.metatileentity.multiblock.IMultiblockAbilityPart; import gregtech.api.metatileentity.multiblock.MultiblockAbility; -import gregtech.api.nuclear.fission.FissionFuelRegistry; import gregtech.api.nuclear.fission.components.FuelRod; -import gregtech.api.unification.material.Material; -import gregtech.api.unification.material.properties.CoolantProperty; import gregtech.api.unification.material.properties.FissionFuelProperty; -import gregtech.api.unification.material.properties.PropertyKey; import gregtech.client.renderer.texture.Textures; import gregtech.common.blocks.BlockFissionCasing; import gregtech.common.blocks.MetaBlocks; @@ -212,7 +207,6 @@ public FissionFuelProperty getPartialFuel() { @Override public boolean setPartialFuel(FissionFuelProperty prop) { - this.partialFuel = prop; if (this.internalFuelRod != null) { this.internalFuelRod.setFuel(prop);