Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
serenibyss committed Jan 5, 2024
1 parent 91f44b3 commit ed24504
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public void onUpdate(@NotNull ItemStack itemStack, @NotNull World worldIn, @NotN
if (metaItems.containsKey((short) itemStack.getItemDamage()) && entityIn instanceof EntityLivingBase entity) {
if (entityIn.ticksExisted % 20 == 0) {

//Handle heat damage
// Handle heat damage
if (prefix.heatDamageFunction != null) {
Material material = getMaterial(itemStack);
if (material != null) {
Expand All @@ -183,7 +183,7 @@ public void onUpdate(@NotNull ItemStack itemStack, @NotNull World worldIn, @NotN
}
}

//Handle radiation damage
// Handle radiation damage
if (prefix.radiationDamageFunction != null) {
Material material = getMaterial(itemStack);
if (material != null) {
Expand All @@ -197,7 +197,8 @@ public void onUpdate(@NotNull ItemStack itemStack, @NotNull World worldIn, @NotN
}
}
if (radiationDamage > 0.0) {
entity.attackEntityFrom(DamageSources.getRadioactiveDamage().setDamageBypassesArmor(), radiationDamage);
entity.attackEntityFrom(DamageSources.getRadioactiveDamage().setDamageBypassesArmor(),
radiationDamage);
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/gregtech/api/unification/material/Material.java
Original file line number Diff line number Diff line change
Expand Up @@ -1077,9 +1077,11 @@ public Builder fissionFuelProperties(int maxTemperature, int duration, double sl
return this;
}

public Builder coolantProperty(Material hotCoolant, Material hotHPCoolant, double moderatorFactor, double coolingFactor, double boilingPoint, double absorption, double pressure) {
public Builder coolantProperty(Material hotCoolant, Material hotHPCoolant, double moderatorFactor,
double coolingFactor, double boilingPoint, double absorption, double pressure) {
properties.ensureSet(PropertyKey.FLUID);
properties.setProperty(PropertyKey.COOLANT, new CoolantProperty(hotCoolant, hotHPCoolant, moderatorFactor, coolingFactor, boilingPoint, absorption, pressure));
properties.setProperty(PropertyKey.COOLANT, new CoolantProperty(hotCoolant, hotHPCoolant, moderatorFactor,
coolingFactor, boilingPoint, absorption, pressure));
return this;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ public class CoolantProperty implements IMaterialProperty {
private double absorption;
private double pressure;

public CoolantProperty(Material hotCoolant, Material hotHPCoolant, double moderatorFactor, double coolingFactor, double boilingPoint, double absorption, double pressure) {
public CoolantProperty(Material hotCoolant, Material hotHPCoolant, double moderatorFactor, double coolingFactor,
double boilingPoint, double absorption, double pressure) {
this.hotCoolant = hotCoolant;
this.hotHPCoolant = hotHPCoolant;
this.moderatorFactor = moderatorFactor;
Expand Down
13 changes: 8 additions & 5 deletions src/main/java/gregtech/api/unification/ore/OrePrefix.java
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,12 @@ public class OrePrefix {
public static final OrePrefix component = new OrePrefix("component", -1, null, null, ENABLE_UNIFICATION, null);

// Nuclear stuff
public static final OrePrefix fuelRod = new OrePrefix("fuelRod", -1, null, MaterialIconType.fuelRod, 0, material -> material.hasProperty(PropertyKey.FISSION_FUEL));
public static final OrePrefix fuelRodDepleted = new OrePrefix("fuelRodDepleted", -1, null, MaterialIconType.fuelRodDepleted, 0, material -> material.hasProperty(PropertyKey.FISSION_FUEL));
public static final OrePrefix fuelRodHotDepleted = new OrePrefix("fuelRodHotDepleted", -1, null, MaterialIconType.fuelRodHotDepleted, 0, material -> material.hasProperty(PropertyKey.FISSION_FUEL));
public static final OrePrefix fuelRod = new OrePrefix("fuelRod", -1, null, MaterialIconType.fuelRod, 0,
material -> material.hasProperty(PropertyKey.FISSION_FUEL));
public static final OrePrefix fuelRodDepleted = new OrePrefix("fuelRodDepleted", -1, null,
MaterialIconType.fuelRodDepleted, 0, material -> material.hasProperty(PropertyKey.FISSION_FUEL));
public static final OrePrefix fuelRodHotDepleted = new OrePrefix("fuelRodHotDepleted", -1, null,
MaterialIconType.fuelRodHotDepleted, 0, material -> material.hasProperty(PropertyKey.FISSION_FUEL));

public static class Flags {

Expand Down Expand Up @@ -483,8 +486,8 @@ public static void init() {
stick.modifyMaterialAmount(Materials.Blaze, 4);
stick.modifyMaterialAmount(Materials.Bone, 5);

fuelRodDepleted.radiationDamageFunction = (neutrons) -> neutrons/2.f;
fuelRodHotDepleted.radiationDamageFunction = (neutrons) -> neutrons/1.5f;
fuelRodDepleted.radiationDamageFunction = (neutrons) -> neutrons / 2.f;
fuelRodHotDepleted.radiationDamageFunction = (neutrons) -> neutrons / 1.5f;
fuelRodHotDepleted.heatDamageFunction = (x) -> 2.0f;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@
import net.minecraft.util.text.*;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;

import net.minecraftforge.fluids.IFluidTank;
import net.minecraftforge.fml.relauncher.Side;

import net.minecraftforge.fml.relauncher.SideOnly;

import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -125,7 +122,8 @@ protected void updateFormedValid() {
coolantImport.getFluidTank().drain(this.flowRate, true);
}
for (ICoolantHandler coolantExport : this.getAbilities(MultiblockAbility.EXPORT_COOLANT)) {
coolantExport.getFluidTank().fill(coolantExport.getCoolant().getProperty(PropertyKey.COOLANT).getHotHPCoolant().getFluid(this.flowRate), true);
coolantExport.getFluidTank().fill(coolantExport.getCoolant().getProperty(PropertyKey.COOLANT)
.getHotHPCoolant().getFluid(this.flowRate), true);
}

// Fuel handling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import gregtech.api.capability.ICoolantHandler;
import gregtech.api.capability.impl.FilteredItemHandler;
import gregtech.api.capability.impl.LockableFluidTank;
import gregtech.api.capability.impl.NotifiableFluidTank;
import gregtech.api.gui.GuiTextures;
import gregtech.api.gui.ModularUI;
import gregtech.api.gui.widgets.FluidContainerSlotWidget;
Expand All @@ -24,7 +23,6 @@
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fluids.FluidTank;
import net.minecraftforge.fluids.IFluidTank;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import net.minecraftforge.items.IItemHandlerModifiable;
Expand Down

0 comments on commit ed24504

Please sign in to comment.