Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pollution fixes #1417

Merged
merged 39 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
a0ca538
sync removed hazard zones to the client
screret Jun 14, 2024
1177532
add a new particle for indicating hazards
screret Jun 14, 2024
75cc501
check for config more often before syncing/loading/adding hazards
screret Jun 14, 2024
f573a94
make singleblock generators able to create pollution, default to ~~1~…
screret Jun 14, 2024
6e509a9
make environmental hazards use floats for strength to allow less than…
screret Jun 14, 2024
14af614
spotless
screret Jun 14, 2024
e4078d6
make emitters inserting into ducts check if the duct is full before i…
screret Jun 14, 2024
e96252d
buff max ppm on default environment requirement
screret Jun 14, 2024
8d050ea
fix goofy packet error that caused random chunks to sync the player's…
screret Jun 14, 2024
2f9dbf5
fix goofy packet error that caused random chunks to sync the player's…
screret Jun 14, 2024
fe999e4
final fixes
screret Jun 14, 2024
baaa048
datagen, spotless
screret Jun 14, 2024
483182d
make duct pipes produce particles at open endpoints if outputting an …
screret Jun 14, 2024
1244a62
fix capped out zones not being able to spread
screret Jun 14, 2024
a3000cb
new stuffs
screret Jun 15, 2024
6042357
can do this now
screret Jun 15, 2024
01d1439
Merge branch '1.20.1' into sc/pollution-fixes
screret Jun 15, 2024
760905b
the modifier didn't apply because I was overriding it,,,
screret Jun 16, 2024
01462a5
fix LV air scrubber's fluid tank being very small
screret Jun 16, 2024
9278696
check all directions for air ducts to drain
screret Jun 16, 2024
724ef2e
forcefully clear all medical conditions on death
screret Jun 16, 2024
055a052
slightly faster way lol
screret Jun 16, 2024
a27936b
extra check in material color check to stop dumb xaero's issue
screret Jun 16, 2024
d1b5fc9
fix embeddium biome color changing compat
screret Jun 16, 2024
de9f1c3
rebake chunks when tints change
screret Jun 16, 2024
cb14f90
update lang slightly, datagen
screret Jun 17, 2024
c9a8aa0
turns out naquadah isn't actually radioactive, only *Nq* is
screret Jun 17, 2024
5b7254c
Merge branch '1.20.1' into sc/pollution-fixes
screret Jun 17, 2024
fce14f6
Merge branch '1.20.1' into sc/pollution-fixes
screret Jun 17, 2024
61a8eb7
reviews
screret Jun 18, 2024
5065aaa
make air scrubber duct collection also give outputs
screret Jun 18, 2024
87422f3
oops left out a thing by accident
screret Jun 18, 2024
8363121
lmao cleaning per operation was way too much
screret Jun 18, 2024
ede4bbb
the distance should be sqrt'd so it isn't such a strong falloff
screret Jun 18, 2024
35cbba5
make scrubber radius be smaller so that a multiblock scrubber would b…
screret Jun 18, 2024
ea9ce66
Merge branch '1.20.1' into sc/pollution-fixes
screret Jun 18, 2024
de528a5
fix embeddium crash
screret Jun 18, 2024
d80f598
spotless
screret Jun 18, 2024
136ccb2
Merge branch '1.20.1' into sc/pollution-fixes
screret Jun 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/generated/resources/assets/gtceu/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"behavior.portable_scanner.environmental_hazard": "ɯdd %s - ɹ§%s :ʞunɥƆ uI pɹɐzɐH ןɐʇuǝɯuoɹıʌuƎ",
"behavior.portable_scanner.environmental_hazard.nothing": "ɹ§buıɥʇoN9§ :ʞunɥƆ uI pɹɐzɐH ןɐʇuǝɯuoɹıʌuƎ",
"behavior.portable_scanner.eu_per_sec": "ʇ/∩Ǝ %s :)puoɔǝs ʇsɐן( ǝbɐɹǝʌⱯ",
"behavior.portable_scanner.local_hazard": "ɯdd %s - ɹ§%s :ʞunɥƆ uI pɹɐzɐH ןɐɔoꞀ",
"behavior.portable_scanner.local_hazard.nothing": "ɹ§buıɥʇoN9§ :ʞunɥƆ uI pɹɐzɐH ןɐɔoꞀ",
"behavior.portable_scanner.local_hazard": "ɯdd %s - ɹ§%s :ɐǝɹⱯ uI pɹɐzɐH ןɐɔoꞀ",
"behavior.portable_scanner.local_hazard.nothing": "ɹ§buıɥʇoN9§ :ɐǝɹⱯ uI pɹɐzɐH ןɐɔoꞀ",
"behavior.portable_scanner.machine_disabled": "˙pǝןqɐsıᗡ",
"behavior.portable_scanner.machine_front_facing": "%s :buıɔɐℲ ʇuoɹℲ",
"behavior.portable_scanner.machine_power_loss": "˙ssoן ɹǝʍod oʇ ǝnp uʍop ʇnɥS",
Expand Down Expand Up @@ -2062,6 +2062,7 @@
"config.gtceu.option.energy": "ʎbɹǝuǝ",
"config.gtceu.option.energyConsumption": "uoıʇdɯnsuoƆʎbɹǝuǝ",
"config.gtceu.option.energyUsageMultiplier": "ɹǝıןdıʇןnWǝbɐs∩ʎbɹǝuǝ",
"config.gtceu.option.environmentalHazardDecayRate": "ǝʇɐᴚʎɐɔǝᗡpɹɐzɐHןɐʇuǝɯuoɹıʌuǝ",
"config.gtceu.option.environmentalHazards": "spɹɐzɐHןɐʇuǝɯuoɹıʌuǝ",
"config.gtceu.option.euToPlatformRatio": "oıʇɐᴚɯɹoɟʇɐןԀo⟘nǝ",
"config.gtceu.option.flintAndSteelRequireSteel": "ןǝǝʇSǝɹınbǝᴚןǝǝʇSpuⱯʇuıןɟ",
Expand Down Expand Up @@ -2458,6 +2459,7 @@
"gtceu.debug.f3_h.enabled": "ǝɹoɯ ǝǝs oʇ ǝןıɟ bıɟuoɔ ɥɔǝ⟘bǝɹ⅁ ǝɥʇ uı uoıʇdo bıɟuoɔ bnqǝp:ɔsıɯ ǝɥʇ ǝןqɐuǝ :sɹǝdoןǝʌǝᗡ ɹoℲ ¡oɟuı bnqǝp ǝɥʇ pǝıɟıpoɯ sɐɥ ɥɔǝ⟘bǝɹ⅁",
"gtceu.distillation_tower": "ɹǝʍo⟘ uoıʇɐןןıʇsıᗡ",
"gtceu.distillery": "ʎɹǝןןıʇsıᗡ",
"gtceu.duct_pipe.transfer_rate": "%s :ǝʇɐɹ ɹǝɟsuɐɹʇ ɹıⱯq§",
"gtceu.electric_blast_furnace": "ǝɔɐuɹnℲ ʇsɐןᗺ ɔıɹʇɔǝןƎ",
"gtceu.electric_furnace": "ǝɔɐuɹnℲ ɔıɹʇɔǝןƎ",
"gtceu.electrolyzer": "ɹǝzʎןoɹʇɔǝןƎ",
Expand Down Expand Up @@ -2583,6 +2585,12 @@
"gtceu.gui.title_bar.page_switcher": "sǝbɐԀ",
"gtceu.gui.toggle_view.disabled": ")spınןℲ( ʍǝıΛ ǝןbbo⟘",
"gtceu.gui.toggle_view.enabled": ")sɯǝʇI( ʍǝıΛ ǝןbbo⟘",
"gtceu.hazard_trigger.any": "ʇɔɐʇuoɔ ʎuⱯ",
"gtceu.hazard_trigger.description": ":ʎq pǝsnɐƆ",
"gtceu.hazard_trigger.inhalation": "uoıʇɐןɐɥuI",
"gtceu.hazard_trigger.none": "buıɥʇoN",
"gtceu.hazard_trigger.protection.description": ":ɯoɹɟ sʇɔǝʇoɹԀ",
"gtceu.hazard_trigger.skin_contact": "ʇɔɐʇuoɔ uıʞS",
"gtceu.implosion_compressor": "ɹossǝɹdɯoƆ uoısoןdɯI",
"gtceu.io.both": "ɥʇoᗺ",
"gtceu.io.export": "ʇɹodxƎ",
Expand All @@ -2592,6 +2600,7 @@
"gtceu.item_filter.footer": "ǝpıɹɹǝʌo oʇ ɯǝʇı ɥʇıʍ ʞɔıןƆǝ§",
"gtceu.item_list.item_stored": "%d :pǝɹoʇSㄥ§",
"gtceu.item_pipe.priority": "%dɟ§ :ʎʇıɹoıɹԀ6§",
"gtceu.jade.cleaned_this_second": "s/%s :pɹɐzɐɥ pǝuɐǝןƆ",
"gtceu.jade.energy_stored": "∩Ǝ %d / %d",
"gtceu.jade.progress_computation": "%s / %s :uoıʇɐʇndɯoƆ",
"gtceu.jade.progress_sec": "s %s / %s",
Expand Down
13 changes: 11 additions & 2 deletions src/generated/resources/assets/gtceu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"behavior.portable_scanner.environmental_hazard": "Environmental Hazard In Chunk: %s§r - %s ppm",
"behavior.portable_scanner.environmental_hazard.nothing": "Environmental Hazard In Chunk: §6Nothing§r",
"behavior.portable_scanner.eu_per_sec": "Average (last second): %s EU/t",
"behavior.portable_scanner.local_hazard": "Local Hazard In Chunk: %s§r - %s ppm",
"behavior.portable_scanner.local_hazard.nothing": "Local Hazard In Chunk: §6Nothing§r",
"behavior.portable_scanner.local_hazard": "Local Hazard In Area: %s§r - %s ppm",
"behavior.portable_scanner.local_hazard.nothing": "Local Hazard In Area: §6Nothing§r",
"behavior.portable_scanner.machine_disabled": "Disabled.",
"behavior.portable_scanner.machine_front_facing": "Front Facing: %s",
"behavior.portable_scanner.machine_power_loss": "Shut down due to power loss.",
Expand Down Expand Up @@ -2062,6 +2062,7 @@
"config.gtceu.option.energy": "energy",
"config.gtceu.option.energyConsumption": "energyConsumption",
"config.gtceu.option.energyUsageMultiplier": "energyUsageMultiplier",
"config.gtceu.option.environmentalHazardDecayRate": "environmentalHazardDecayRate",
"config.gtceu.option.environmentalHazards": "environmentalHazards",
"config.gtceu.option.euToPlatformRatio": "euToPlatformRatio",
"config.gtceu.option.flintAndSteelRequireSteel": "flintAndSteelRequireSteel",
Expand Down Expand Up @@ -2458,6 +2459,7 @@
"gtceu.debug.f3_h.enabled": "GregTech has modified the debug info! For Developers: enable the misc:debug config option in the GregTech config file to see more",
"gtceu.distillation_tower": "Distillation Tower",
"gtceu.distillery": "Distillery",
"gtceu.duct_pipe.transfer_rate": "§bAir transfer rate: %s",
"gtceu.electric_blast_furnace": "Electric Blast Furnace",
"gtceu.electric_furnace": "Electric Furnace",
"gtceu.electrolyzer": "Electrolyzer",
Expand Down Expand Up @@ -2583,6 +2585,12 @@
"gtceu.gui.title_bar.page_switcher": "Pages",
"gtceu.gui.toggle_view.disabled": "Toggle View (Fluids)",
"gtceu.gui.toggle_view.enabled": "Toggle View (Items)",
"gtceu.hazard_trigger.any": "Any contact",
"gtceu.hazard_trigger.description": "Caused by:",
"gtceu.hazard_trigger.inhalation": "Inhalation",
"gtceu.hazard_trigger.none": "Nothing",
"gtceu.hazard_trigger.protection.description": "Protects from:",
"gtceu.hazard_trigger.skin_contact": "Skin contact",
"gtceu.implosion_compressor": "Implosion Compressor",
"gtceu.io.both": "Both",
"gtceu.io.export": "Export",
Expand All @@ -2592,6 +2600,7 @@
"gtceu.item_filter.footer": "§eClick with item to override",
"gtceu.item_list.item_stored": "§7Stored: %d",
"gtceu.item_pipe.priority": "§9Priority: §f%d",
"gtceu.jade.cleaned_this_second": "Cleaned hazard: %s/s",
"gtceu.jade.energy_stored": "%d / %d EU",
"gtceu.jade.progress_computation": "Computation: %s / %s",
"gtceu.jade.progress_sec": "%s / %s s",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/arsenicosis",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/asbestosis",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/berylliosis",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/carbon_monoxide_poisoning",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/carcinogen",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/chemical_burns",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/irritant",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/methanol_poisoning",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/nausea",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/none",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/poison",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/silicosis",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"exhaustion": 0.0,
"message_id": "gtceu.medical_condition/weak_poison",
"scaling": "always"
"scaling": "never"
}
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public int getLayerARGB(int layerIndex) {
if (layerIndex < -100) {
layerIndex = (Math.abs(layerIndex) % 100) / 10;
}
if (layerIndex > materialInfo.colors.size() - 1) return -1;
if (layerIndex > materialInfo.colors.size() - 1 || layerIndex < 0) return -1;
int layerColor = getMaterialARGB(layerIndex);
if (layerColor != -1 || layerIndex == 0) return layerColor;
else return getMaterialARGB(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public MedicalCondition(String name, int color, int maxProgression, IdleProgress
this.maxProgression = maxProgression;
this.damageTypeData = new DamageTypeData.Builder()
.simpleId("medical_condition/" + name)
.scaling(DamageScaling.ALWAYS)
.scaling(DamageScaling.NEVER)
.tag(DamageTypeTags.BYPASSES_ARMOR)
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class Symptom {
((medicalConditionTracker, condition, configuredSymptom, baseSymptom, modifier) -> {
if (modifier > 0) {
Player player = medicalConditionTracker.getPlayer();
player.hurt(condition.getDamageSource(medicalConditionTracker), player.getHealth());
player.hurt(condition.getDamageSource(medicalConditionTracker), Float.MAX_VALUE);
}
}));
public static final Symptom RANDOM_DAMAGE = new Symptom(defaultKey("random_damage"), 10, 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.gregtechceu.gtceu.api.GTValues;
import com.gregtechceu.gtceu.api.capability.recipe.*;
import com.gregtechceu.gtceu.api.gui.editor.EditableMachineUI;
import com.gregtechceu.gtceu.api.machine.feature.IEnvironmentalHazardEmitter;
import com.gregtechceu.gtceu.api.machine.feature.IFancyUIMachine;
import com.gregtechceu.gtceu.api.machine.trait.NotifiableEnergyContainer;
import com.gregtechceu.gtceu.api.recipe.GTRecipe;
Expand All @@ -22,6 +23,7 @@
import com.google.common.collect.Tables;
import com.mojang.blaze3d.MethodsReturnNonnullByDefault;
import it.unimi.dsi.fastutil.ints.Int2LongFunction;
import lombok.Getter;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand All @@ -39,13 +41,23 @@
*/
@ParametersAreNonnullByDefault
@MethodsReturnNonnullByDefault
public class SimpleGeneratorMachine extends WorkableTieredMachine implements IFancyUIMachine {
public class SimpleGeneratorMachine extends WorkableTieredMachine
implements IFancyUIMachine, IEnvironmentalHazardEmitter {

public SimpleGeneratorMachine(IMachineBlockEntity holder, int tier, Int2LongFunction tankScalingFunction,
@Getter
private final float hazardStrengthPerOperation;

public SimpleGeneratorMachine(IMachineBlockEntity holder, int tier,
float hazardStrengthPerOperation, Int2LongFunction tankScalingFunction,
Object... args) {
super(holder, tier, tankScalingFunction, args);
this.hazardStrengthPerOperation = hazardStrengthPerOperation;
}

public SimpleGeneratorMachine(IMachineBlockEntity holder, int tier, Int2LongFunction tankScalingFunction,
Object... args) {
this(holder, tier, 0.25f, tankScalingFunction, args);
}
//////////////////////////////////////
// ***** Initialization ******//
//////////////////////////////////////
Expand Down Expand Up @@ -102,6 +114,12 @@ public boolean canVoidRecipeOutputs(RecipeCapability<?> capability) {
return capability != EURecipeCapability.CAP;
}

@Override
public void afterWorking() {
super.afterWorking();
spreadEnvironmentalHazard();
}

//////////////////////////////////////
// *********** GUI ***********//
//////////////////////////////////////
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.gregtechceu.gtceu.api.machine.feature;

import com.gregtechceu.gtceu.api.data.medicalcondition.MedicalCondition;

public interface IEnvironmentalHazardCleaner extends IMachineFeature {

float getRemovedLastSecond();

void cleanHazard(MedicalCondition condition, float amount);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.gregtechceu.gtceu.api.data.medicalcondition.MedicalCondition;
import com.gregtechceu.gtceu.common.capability.EnvironmentalHazardSavedData;
import com.gregtechceu.gtceu.common.data.GTMedicalConditions;
import com.gregtechceu.gtceu.config.ConfigHolder;

import net.minecraft.server.level.ServerLevel;

Expand All @@ -26,19 +27,24 @@ default MedicalCondition getConditionToEmit() {
/**
* @return the starting strength of the hazard zone.
*/
int hazardStrengthPerOperation();
float getHazardStrengthPerOperation();

default void spreadEnvironmentalHazard() {
if (!ConfigHolder.INSTANCE.gameplay.environmentalHazards) {
return;
}

if (self().getLevel() instanceof ServerLevel serverLevel) {
IHazardParticleContainer container = GTCapabilityHelper.getHazardContainer(serverLevel,
self().getPos().relative(self().getFrontFacing()), self().getFrontFacing().getOpposite());
if (container != null) {
container.addHazard(getConditionToEmit(), hazardStrengthPerOperation());
if (container != null &&
container.getHazardCanBeInserted(getConditionToEmit()) > getHazardStrengthPerOperation()) {
container.addHazard(getConditionToEmit(), getHazardStrengthPerOperation());
return;
}

var savedData = EnvironmentalHazardSavedData.getOrCreate(serverLevel);
savedData.addZone(self().getPos(), hazardStrengthPerOperation(), true,
savedData.addZone(self().getPos(), getHazardStrengthPerOperation(), true,
HazardProperty.HazardTrigger.INHALATION, getConditionToEmit());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.gregtechceu.gtceu.api.data.medicalcondition.MedicalCondition;
import com.gregtechceu.gtceu.common.capability.LocalizedHazardSavedData;
import com.gregtechceu.gtceu.common.data.GTMedicalConditions;
import com.gregtechceu.gtceu.config.ConfigHolder;

import net.minecraft.server.level.ServerLevel;

Expand All @@ -26,19 +27,24 @@ default MedicalCondition getConditionToEmit() {
/**
* @return the starting strength of the hazard zone. recommended values are in the range [1,5)
*/
int hazardSizePerOperation();
int getHazardSizePerOperation();

default void spreadLocalizedHazard() {
if (!ConfigHolder.INSTANCE.gameplay.environmentalHazards) {
return;
}

if (self().getLevel() instanceof ServerLevel serverLevel) {
IHazardParticleContainer container = GTCapabilityHelper.getHazardContainer(serverLevel,
self().getPos().relative(self().getFrontFacing()), self().getFrontFacing().getOpposite());
if (container != null) {
container.addHazard(getConditionToEmit(), hazardSizePerOperation());
if (container != null &&
container.getHazardCanBeInserted(getConditionToEmit()) > getHazardSizePerOperation()) {
container.addHazard(getConditionToEmit(), getHazardSizePerOperation());
return;
}

var savedData = LocalizedHazardSavedData.getOrCreate(serverLevel);
savedData.addSphericalZone(self().getPos(), hazardSizePerOperation(), false,
savedData.addSphericalZone(self().getPos(), getHazardSizePerOperation(), false,
HazardProperty.HazardTrigger.INHALATION, getConditionToEmit());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.gregtechceu.gtceu.api.GTValues;
import com.gregtechceu.gtceu.api.capability.GTCapabilityHelper;
import com.gregtechceu.gtceu.api.capability.IHazardParticleContainer;
import com.gregtechceu.gtceu.api.gui.GuiTextures;
import com.gregtechceu.gtceu.api.gui.fancy.IFancyTooltip;
import com.gregtechceu.gtceu.api.gui.fancy.TooltipsPanel;
Expand Down Expand Up @@ -37,8 +38,9 @@ default void emitPollutionParticles() {
var pos = self().getPos();
var facing = self().getFrontFacing();

if (GTCapabilityHelper.getHazardContainer(self().getLevel(),
pos.relative(facing), facing.getOpposite()) != null) {
IHazardParticleContainer container = GTCapabilityHelper.getHazardContainer(self().getLevel(),
pos.relative(facing), facing.getOpposite());
if (container != null) {
// do not emit particles if front face has a duct on it.
return;
}
Expand Down Expand Up @@ -75,8 +77,8 @@ default GTRecipe modifyRecipe(GTRecipe recipe) {
}

@Override
default int hazardStrengthPerOperation() {
int outputAmount = 5;
default float getHazardStrengthPerOperation() {
float outputAmount = 2.5f;
return this instanceof TieredPartMachine tiered ? outputAmount / Math.max(tiered.getTier(), 1) : outputAmount;
}

Expand Down
Loading
Loading