diff options
| author | Alexdoru <57050655+Alexdoru@users.noreply.github.com> | 2024-10-21 21:21:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-21 19:21:33 +0000 |
| commit | 901cb0d294b0c4f114bb247fbd7d6f97e7484f3c (patch) | |
| tree | fd4900d59f98ec34c9119c2003f79f7467abddf0 /src/main/java/gregtech/common | |
| parent | e741976ea6a6fa5dbcb45813fd1e2ca368331ba5 (diff) | |
| download | GT5-Unofficial-901cb0d294b0c4f114bb247fbd7d6f97e7484f3c.tar.gz GT5-Unofficial-901cb0d294b0c4f114bb247fbd7d6f97e7484f3c.tar.bz2 GT5-Unofficial-901cb0d294b0c4f114bb247fbd7d6f97e7484f3c.zip | |
Import pollution mixins from hodgepodge (#3395)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Co-authored-by: boubou19 <miisterunknown@gmail.com>
Diffstat (limited to 'src/main/java/gregtech/common')
16 files changed, 670 insertions, 141 deletions
diff --git a/src/main/java/gregtech/common/GTClient.java b/src/main/java/gregtech/common/GTClient.java index 844731e82f..7cd673c001 100644 --- a/src/main/java/gregtech/common/GTClient.java +++ b/src/main/java/gregtech/common/GTClient.java @@ -92,6 +92,8 @@ import gregtech.client.GTMouseEventHandler; import gregtech.client.SeekingOggCodec; import gregtech.common.blocks.BlockFrameBox; import gregtech.common.blocks.ItemMachines; +import gregtech.common.pollution.Pollution; +import gregtech.common.pollution.PollutionRenderer; import gregtech.common.render.BlackholeRenderer; import gregtech.common.render.DroneRender; import gregtech.common.render.FlaskRenderer; @@ -101,7 +103,6 @@ import gregtech.common.render.GTRendererBlock; import gregtech.common.render.LaserRenderer; import gregtech.common.render.MetaGeneratedToolRenderer; import gregtech.common.render.MultiTileRenderer; -import gregtech.common.render.PollutionRenderer; import gregtech.common.render.WormholeRenderer; import gregtech.common.render.items.DataStickRenderer; import gregtech.common.render.items.InfiniteSprayCanRenderer; @@ -670,6 +671,7 @@ public class GTClient extends GTProxy implements Runnable { .forEach(CoverBehaviorBase::reloadColorOverride); } }); + Pollution.onPostInitClient(); } @Override diff --git a/src/main/java/gregtech/common/GTProxy.java b/src/main/java/gregtech/common/GTProxy.java index 643811234d..e7cb627c91 100644 --- a/src/main/java/gregtech/common/GTProxy.java +++ b/src/main/java/gregtech/common/GTProxy.java @@ -167,6 +167,7 @@ import gregtech.common.items.MetaGeneratedTool01; import gregtech.common.misc.GlobalEnergyWorldSavedData; import gregtech.common.misc.GlobalMetricsCoverDatabase; import gregtech.common.misc.spaceprojects.SpaceProjectWorldSavedData; +import gregtech.common.pollution.Pollution; import gregtech.common.tileentities.machines.multi.drone.MTEDroneCentre; import gregtech.nei.GTNEIDefaultHandler; diff --git a/src/main/java/gregtech/common/config/Gregtech.java b/src/main/java/gregtech/common/config/Gregtech.java index a293b6cba7..e852a6b022 100644 --- a/src/main/java/gregtech/common/config/Gregtech.java +++ b/src/main/java/gregtech/common/config/Gregtech.java @@ -27,9 +27,6 @@ public class Gregtech { @Config.Comment("Ore drop behavior section") public static final OreDropBehavior oreDropBehavior = new OreDropBehavior(); - @Config.Comment("Pollution section") - public static final Pollution pollution = new Pollution(); - @Config.LangKey("GT5U.gui.config.gregtech.debug") public static class Debug { @@ -558,128 +555,4 @@ public class Gregtech { @Config.RequiresMcRestart public GTProxy.OreDropSystem setting = GTProxy.OreDropSystem.FortuneItem; } - - @Config.LangKey("GT5U.gui.config.gregtech.pollution") - public static class Pollution { - - @Config.Comment("if true, enables pollution in the game.") - @Config.DefaultBoolean(true) - @Config.RequiresMcRestart - public boolean pollution; - - @Config.Comment("Controls the threshold starting from which you can see fog.") - @Config.DefaultInt(550_000) - @Config.RequiresMcRestart - public int pollutionSmogLimit; - @Config.Comment("Controls the threshold starting from which players get poison effect.") - @Config.DefaultInt(750_000) - @Config.RequiresMcRestart - public int pollutionPoisonLimit; - @Config.Comment("Controls the threshold starting from which vegetation starts to be killed.") - @Config.DefaultInt(1_000_000) - @Config.RequiresMcRestart - public int pollutionVegetationLimit; - @Config.Comment("Controls the threshold starting from which if it rains, will turn cobblestone into gravel and gravel into sand.") - @Config.DefaultInt(2_000_000) - @Config.RequiresMcRestart - public int pollutionSourRainLimit; - @Config.Comment("Controls the pollution released by an explosion.") - @Config.DefaultInt(100_000) - @Config.RequiresMcRestart - public int pollutionOnExplosion; - @Config.Comment("Controls the pollution released per second by the bricked blast furnace.") - @Config.DefaultInt(200) - @Config.RequiresMcRestart - public int pollutionPrimitveBlastFurnacePerSecond; - @Config.Comment("Controls the pollution released per second by the charcoal pile igniter.") - @Config.DefaultInt(100) - @Config.RequiresMcRestart - public int pollutionCharcoalPitPerSecond; - @Config.Comment("Controls the pollution released per second by the EBF.") - @Config.DefaultInt(400) - @Config.RequiresMcRestart - public int pollutionEBFPerSecond; - @Config.Comment("Controls the pollution released per second by the large combustion engine.") - @Config.DefaultInt(480) - @Config.RequiresMcRestart - public int pollutionLargeCombustionEnginePerSecond; - @Config.Comment("Controls the pollution released per second by the extreme combustion engine.") - @Config.DefaultInt(3_840) - @Config.RequiresMcRestart - public int pollutionExtremeCombustionEnginePerSecond; - @Config.Comment("Controls the pollution released per second by the implosion compressor.") - @Config.DefaultInt(10_000) - @Config.RequiresMcRestart - public int pollutionImplosionCompressorPerSecond; - @Config.Comment("Controls the pollution released per second by the large bronze boiler.") - @Config.DefaultInt(1_000) - @Config.RequiresMcRestart - public int pollutionLargeBronzeBoilerPerSecond; - @Config.Comment("Controls the pollution released per second by the large steel boiler.") - @Config.DefaultInt(2_000) - @Config.RequiresMcRestart - public int pollutionLargeSteelBoilerPerSecond; - @Config.Comment("Controls the pollution released per second by the large titanium boiler.") - @Config.DefaultInt(3_000) - @Config.RequiresMcRestart - public int pollutionLargeTitaniumBoilerPerSecond; - @Config.Comment("Controls the pollution released per second by the large tungstensteel boiler.") - @Config.DefaultInt(4_000) - @Config.RequiresMcRestart - public int pollutionLargeTungstenSteelBoilerPerSecond; - @Config.Comment("Controls the pollution reduction obtained with each increment of the circuit when throttling large boilers.") - @Config.DefaultFloat(1.0f / 24.0f) // divided by 24 because there are 24 circuit configs. - @Config.RequiresMcRestart - public float pollutionReleasedByThrottle; - @Config.Comment("Controls the pollution released per second by the large gas turbine.") - @Config.DefaultInt(300) - @Config.RequiresMcRestart - public int pollutionLargeGasTurbinePerSecond; - @Config.Comment("Controls the pollution released per second by the multi smelter.") - @Config.DefaultInt(400) - @Config.RequiresMcRestart - public int pollutionMultiSmelterPerSecond; - @Config.Comment("Controls the pollution released per second by the pyrolyse oven.") - @Config.DefaultInt(300) - @Config.RequiresMcRestart - public int pollutionPyrolyseOvenPerSecond; - @Config.Comment("Controls the pollution released per second by the small coil boiler.") - @Config.DefaultInt(20) - @Config.RequiresMcRestart - public int pollutionSmallCoalBoilerPerSecond; - @Config.Comment("Controls the pollution released per second by the high pressure lava boiler.") - @Config.DefaultInt(20) - @Config.RequiresMcRestart - public int pollutionHighPressureLavaBoilerPerSecond; - @Config.Comment("Controls the pollution released per second by the high pressure coil boiler.") - @Config.DefaultInt(30) - @Config.RequiresMcRestart - public int pollutionHighPressureCoalBoilerPerSecond; - - @Config.Comment("Controls the pollution released per second by the base diesel generator.") - @Config.DefaultInt(40) - @Config.RequiresMcRestart - public int pollutionBaseDieselGeneratorPerSecond; - - // reading double as strings, not perfect, but better than nothing - @Config.Comment({ - "Pollution released by tier, with the following formula: PollutionBaseDieselGeneratorPerSecond * PollutionDieselGeneratorReleasedByTier[Tier]", - "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." }) - @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8 }) - @Config.RequiresMcRestart - public double[] pollutionDieselGeneratorReleasedByTier; - - @Config.Comment("Controls the pollution released per second by the base gas turbine.") - @Config.DefaultInt(40) - @Config.RequiresMcRestart - public int pollutionBaseGasTurbinePerSecond; - - // reading double as strings, not perfect, but better than nothing - @Config.Comment({ - "Pollution released by tier, with the following formula: PollutionBaseGasTurbinePerSecond * PollutionGasTurbineReleasedByTier[Tier]", - "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." }) - @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8, 0.7, 0.6 }) - @Config.RequiresMcRestart - public double[] pollutionGasTurbineReleasedByTier; - } } diff --git a/src/main/java/gregtech/common/misc/GTCommand.java b/src/main/java/gregtech/common/misc/GTCommand.java index f1590ec792..e6fbe12144 100644 --- a/src/main/java/gregtech/common/misc/GTCommand.java +++ b/src/main/java/gregtech/common/misc/GTCommand.java @@ -25,8 +25,8 @@ import gregtech.api.enums.GTValues; import gregtech.api.objects.GTChunkManager; import gregtech.api.util.GTMusicSystem; import gregtech.api.util.GTUtility; -import gregtech.common.Pollution; import gregtech.common.misc.spaceprojects.SpaceProjectManager; +import gregtech.common.pollution.Pollution; public final class GTCommand extends CommandBase { diff --git a/src/main/java/gregtech/common/pollution/BlockMatcher.java b/src/main/java/gregtech/common/pollution/BlockMatcher.java new file mode 100644 index 0000000000..a701d323bd --- /dev/null +++ b/src/main/java/gregtech/common/pollution/BlockMatcher.java @@ -0,0 +1,96 @@ +package gregtech.common.pollution; + +import java.util.Map; +import java.util.Set; + +import net.minecraft.block.Block; +import net.minecraft.client.multiplayer.WorldClient; +import net.minecraftforge.event.world.WorldEvent; + +import com.google.common.collect.Maps; +import com.google.common.collect.Sets; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry; +import cpw.mods.fml.common.registry.GameData; +import gregtech.GTMod; + +// Shamelessly Taken from BetterFoliage by octarine-noise +public class BlockMatcher { + + public Map<Class<?>, ColorOverrideType> whiteList = Maps.newHashMap(); + public Set<Class<?>> blackList = Sets.newHashSet(); + public Map<Integer, ColorOverrideType> blockIDs = Maps.newHashMap(); + + public ColorOverrideType matchesID(int blockId) { + return blockIDs.get(blockId); + } + + public ColorOverrideType matchesID(Block block) { + return blockIDs.get(Block.blockRegistry.getIDForObject(block)); + } + + public void updateClassList(String[] cfg) { + whiteList.clear(); + blackList.clear(); + for (String line : cfg) { + GTMod.GT_FML_LOGGER.info("Checking for block:" + line); + String[] lines = line.split(":"); + ColorOverrideType type = null; + if (lines.length > 1) { + try { + type = ColorOverrideType.fromName(lines[1].trim()); + } catch (NumberFormatException e) { + GTMod.GT_FML_LOGGER.error(String.format("Invalid type [%s]", line)); + continue; + } + } + + if (lines[0].startsWith("-")) { + try { + blackList.add(Class.forName(lines[0].substring(1))); + GTMod.GT_FML_LOGGER.info("\t added blacklist:" + lines[0].substring(1)); + } catch (ClassNotFoundException ignored) {} + } else { + if (type == null) { + GTMod.GT_FML_LOGGER.error(String.format("Invalid type [%s]", line)); + continue; + } + + try { + whiteList.put(Class.forName(lines[0]), type); + GTMod.GT_FML_LOGGER.info("\t added whitelist:" + lines[0]); + } catch (ClassNotFoundException ignored) {} + } + } + // updateBlockIDs(); + } + + private void updateBlockIDs() { + blockIDs.clear(); + FMLControlledNamespacedRegistry<Block> blockRegistry = GameData.getBlockRegistry(); + for (Block block : blockRegistry.typeSafeIterable()) { + ColorOverrideType t = matchesClass(block); + if (t != null) blockIDs.put(Block.blockRegistry.getIDForObject(block), t); + } + } + + private ColorOverrideType matchesClass(Block block) { + for (Class<?> clazz : blackList) if (clazz.isAssignableFrom(block.getClass())) return null; + for (Class<?> clazz : whiteList.keySet()) + if (clazz.isAssignableFrom(block.getClass())) return whiteList.get(clazz); + return null; + } + + /** + * Caches block IDs on world load for fast lookup + * + * @param event + */ + @SubscribeEvent + public void handleWorldLoad(WorldEvent.Load event) { + if (event.world instanceof WorldClient) { + updateBlockIDs(); + } + } +} diff --git a/src/main/java/gregtech/common/pollution/ColorOverrideType.java b/src/main/java/gregtech/common/pollution/ColorOverrideType.java new file mode 100644 index 0000000000..de0a44a835 --- /dev/null +++ b/src/main/java/gregtech/common/pollution/ColorOverrideType.java @@ -0,0 +1,28 @@ +package gregtech.common.pollution; + +public enum ColorOverrideType { + + FLOWER, + GRASS, + LEAVES, + LIQUID; + + public static ColorOverrideType fromName(String name) { + return switch (name) { + case "FLOWER" -> FLOWER; + case "GRASS" -> GRASS; + case "LEAVES" -> LEAVES; + case "LIQUID" -> LIQUID; + default -> throw new RuntimeException(); + }; + } + + public int getColor(int oColor, int x, int z) { + return switch (this) { + case FLOWER -> PollutionRenderer.colorFoliage(oColor, x, z); + case GRASS -> PollutionRenderer.colorGrass(oColor, x, z); + case LEAVES -> PollutionRenderer.colorLeaves(oColor, x, z); + case LIQUID -> PollutionRenderer.colorLiquid(oColor, x, z); + }; + } +} diff --git a/src/main/java/gregtech/common/entities/EntityFXPollution.java b/src/main/java/gregtech/common/pollution/EntityFXPollution.java index facd3d3364..f1a1f18447 100644 --- a/src/main/java/gregtech/common/entities/EntityFXPollution.java +++ b/src/main/java/gregtech/common/pollution/EntityFXPollution.java @@ -1,4 +1,4 @@ -package gregtech.common.entities; +package gregtech.common.pollution; import java.util.Random; diff --git a/src/main/java/gregtech/common/misc/GTClientPollutionMap.java b/src/main/java/gregtech/common/pollution/GTClientPollutionMap.java index 546f8e8d12..0fd1da309b 100644 --- a/src/main/java/gregtech/common/misc/GTClientPollutionMap.java +++ b/src/main/java/gregtech/common/pollution/GTClientPollutionMap.java @@ -1,4 +1,4 @@ -package gregtech.common.misc; +package gregtech.common.pollution; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityClientPlayerMP; diff --git a/src/main/java/gregtech/common/Pollution.java b/src/main/java/gregtech/common/pollution/Pollution.java index 4245a0ef12..10b8ffcfa7 100644 --- a/src/main/java/gregtech/common/Pollution.java +++ b/src/main/java/gregtech/common/pollution/Pollution.java @@ -1,4 +1,4 @@ -package gregtech.common; +package gregtech.common.pollution; import static gregtech.api.objects.XSTR.XSTR_INSTANCE; import static gregtech.common.GTProxy.dimensionWisePollution; @@ -45,7 +45,6 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.net.GTPacketPollution; import gregtech.api.util.GTChunkAssociatedData; import gregtech.api.util.GTUtility; -import gregtech.common.render.PollutionRenderer; public class Pollution { @@ -101,6 +100,33 @@ public class Pollution { pollutionInstance.tickPollutionInWorld((int) (aEvent.world.getTotalWorldTime() % cycleLen)); } + public static BlockMatcher standardBlocks; + public static BlockMatcher liquidBlocks; + public static BlockMatcher doublePlants; + public static BlockMatcher crossedSquares; + public static BlockMatcher blockVine; + + public static void onPostInitClient() { + if (PollutionConfig.pollution) { + standardBlocks = new BlockMatcher(); + liquidBlocks = new BlockMatcher(); + doublePlants = new BlockMatcher(); + crossedSquares = new BlockMatcher(); + blockVine = new BlockMatcher(); + standardBlocks.updateClassList(PollutionConfig.renderStandardBlock); + liquidBlocks.updateClassList(PollutionConfig.renderBlockLiquid); + doublePlants.updateClassList(PollutionConfig.renderBlockDoublePlant); + crossedSquares.updateClassList(PollutionConfig.renderCrossedSquares); + blockVine.updateClassList(PollutionConfig.renderblockVine); + MinecraftForge.EVENT_BUS.register(standardBlocks); + MinecraftForge.EVENT_BUS.register(liquidBlocks); + MinecraftForge.EVENT_BUS.register(doublePlants); + MinecraftForge.EVENT_BUS.register(crossedSquares); + MinecraftForge.EVENT_BUS.register(blockVine); + MinecraftForge.EVENT_BUS.register(new PollutionTooltip()); + } + } + private void tickPollutionInWorld(int aTickID) { // called from method above // gen data set if (aTickID == 0 || blank) { @@ -406,7 +432,7 @@ public class Pollution { addPollution(aWorld.getChunkFromBlockCoords(aPos.chunkPosX, aPos.chunkPosZ), aPollution); } - static void migrate(ChunkDataEvent.Load e) { + public static void migrate(ChunkDataEvent.Load e) { addPollution( e.getChunk(), e.getData() diff --git a/src/main/java/gregtech/common/pollution/PollutionConfig.java b/src/main/java/gregtech/common/pollution/PollutionConfig.java new file mode 100644 index 0000000000..90098791c4 --- /dev/null +++ b/src/main/java/gregtech/common/pollution/PollutionConfig.java @@ -0,0 +1,397 @@ +package gregtech.common.pollution; + +import com.gtnewhorizon.gtnhlib.config.Config; + +import gregtech.api.enums.Mods; + +// needs to be loaded early from the coremod because +// it decides to load some mixins or not +@Config(modid = Mods.Names.GREG_TECH, category = "Pollution", configSubDirectory = "GregTech", filename = "Pollution") +public class PollutionConfig { + + // override name to be at the top of the cfg file + @Config.Name("Activate Pollution") + @Config.Comment("if true, enables pollution in the game.") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public static boolean pollution; + + @Config.Comment("Controls the threshold starting from which you can see fog.") + @Config.DefaultInt(550_000) + @Config.RequiresMcRestart + public static int pollutionSmogLimit; + @Config.Comment("Controls the threshold starting from which players get poison effect.") + @Config.DefaultInt(750_000) + @Config.RequiresMcRestart + public static int pollutionPoisonLimit; + @Config.Comment("Controls the threshold starting from which vegetation starts to be killed.") + @Config.DefaultInt(1_000_000) + @Config.RequiresMcRestart + public static int pollutionVegetationLimit; + @Config.Comment("Controls the threshold starting from which if it rains, will turn cobblestone into gravel and gravel into sand.") + @Config.DefaultInt(2_000_000) + @Config.RequiresMcRestart + public static int pollutionSourRainLimit; + @Config.Comment("Controls the pollution released by an explosion.") + @Config.DefaultInt(100_000) + @Config.RequiresMcRestart + public static int pollutionOnExplosion; + @Config.Comment("Controls the pollution released per second by the bricked blast furnace.") + @Config.DefaultInt(200) + @Config.RequiresMcRestart + public static int pollutionPrimitveBlastFurnacePerSecond; + @Config.Comment("Controls the pollution released per second by the charcoal pile igniter.") + @Config.DefaultInt(100) + @Config.RequiresMcRestart + public static int pollutionCharcoalPitPerSecond; + @Config.Comment("Controls the pollution released per second by the EBF.") + @Config.DefaultInt(400) + @Config.RequiresMcRestart + public static int pollutionEBFPerSecond; + @Config.Comment("Controls the pollution released per second by the large combustion engine.") + @Config.DefaultInt(480) + @Config.RequiresMcRestart + public static int pollutionLargeCombustionEnginePerSecond; + @Config.Comment("Controls the pollution released per second by the extreme combustion engine.") + @Config.DefaultInt(3_840) + @Config.RequiresMcRestart + public static int pollutionExtremeCombustionEnginePerSecond; + @Config.Comment("Controls the pollution released per second by the implosion compressor.") + @Config.DefaultInt(10_000) + @Config.RequiresMcRestart + public static int pollutionImplosionCompressorPerSecond; + @Config.Comment("Controls the pollution released per second by the large bronze boiler.") + @Config.DefaultInt(1_000) + @Config.RequiresMcRestart + public static int pollutionLargeBronzeBoilerPerSecond; + @Config.Comment("Controls the pollution released per second by the large steel boiler.") + @Config.DefaultInt(2_000) + @Config.RequiresMcRestart + public static int pollutionLargeSteelBoilerPerSecond; + @Config.Comment("Controls the pollution released per second by the large titanium boiler.") + @Config.DefaultInt(3_000) + @Config.RequiresMcRestart + public static int pollutionLargeTitaniumBoilerPerSecond; + @Config.Comment("Controls the pollution released per second by the large tungstensteel boiler.") + @Config.DefaultInt(4_000) + @Config.RequiresMcRestart + public static int pollutionLargeTungstenSteelBoilerPerSecond; + @Config.Comment("Controls the pollution reduction obtained with each increment of the circuit when throttling large boilers.") + @Config.DefaultFloat(1.0f / 24.0f) // divided by 24 because there are 24 circuit configs. + @Config.RequiresMcRestart + public static float pollutionReleasedByThrottle; + @Config.Comment("Controls the pollution released per second by the large gas turbine.") + @Config.DefaultInt(300) + @Config.RequiresMcRestart + public static int pollutionLargeGasTurbinePerSecond; + @Config.Comment("Controls the pollution released per second by the multi smelter.") + @Config.DefaultInt(400) + @Config.RequiresMcRestart + public static int pollutionMultiSmelterPerSecond; + @Config.Comment("Controls the pollution released per second by the pyrolyse oven.") + @Config.DefaultInt(300) + @Config.RequiresMcRestart + public static int pollutionPyrolyseOvenPerSecond; + @Config.Comment("Controls the pollution released per second by the small coil boiler.") + @Config.DefaultInt(20) + @Config.RequiresMcRestart + public static int pollutionSmallCoalBoilerPerSecond; + @Config.Comment("Controls the pollution released per second by the high pressure lava boiler.") + @Config.DefaultInt(20) + @Config.RequiresMcRestart + public static int pollutionHighPressureLavaBoilerPerSecond; + @Config.Comment("Controls the pollution released per second by the high pressure coil boiler.") + @Config.DefaultInt(30) + @Config.RequiresMcRestart + public static int pollutionHighPressureCoalBoilerPerSecond; + + @Config.Comment("Controls the pollution released per second by the base diesel generator.") + @Config.DefaultInt(40) + @Config.RequiresMcRestart + public static int pollutionBaseDieselGeneratorPerSecond; + + // reading double as strings, not perfect, but better than nothing + @Config.Comment({ + "Pollution released by tier, with the following formula: PollutionBaseDieselGeneratorPerSecond * PollutionDieselGeneratorReleasedByTier[Tier]", + "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." }) + @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8 }) + @Config.RequiresMcRestart + public static double[] pollutionDieselGeneratorReleasedByTier; + + @Config.Comment("Controls the pollution released per second by the base gas turbine.") + @Config.DefaultInt(40) + @Config.RequiresMcRestart + public static int pollutionBaseGasTurbinePerSecond; + + // reading double as strings, not perfect, but better than nothing + @Config.Comment({ + "Pollution released by tier, with the following formula: PollutionBaseGasTurbinePerSecond * PollutionGasTurbineReleasedByTier[Tier]", + "The first entry has meaning as it is here to since machine tier with array index: LV is 1, etc." }) + @Config.DefaultDoubleList({ 0.1, 1.0, 0.9, 0.8, 0.7, 0.6 }) + @Config.RequiresMcRestart + public static double[] pollutionGasTurbineReleasedByTier; + + // Minecraft + @Config.Comment("Explosion pollution") + @Config.DefaultFloat(333.34f) + public static float explosionPollutionAmount; + + @Config.Comment("Make furnaces Pollute") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public static boolean furnacesPollute; + + @Config.Comment("Furnace pollution per second, min 1!") + @Config.DefaultInt(20) + public static int furnacePollutionAmount; + + // Galacticraft + + @Config.Comment("Pollution Amount for Rockets") + @Config.DefaultInt(10000) + public static int rocketPollutionAmount; + + @Config.Comment("Make rockets Pollute") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public static boolean rocketsPollute; + + // Railcraft + + @Config.Comment("Pollution Amount for Advanced Coke Ovens") + @Config.DefaultInt(80) + public static int advancedCokeOvenPollutionAmount; + + @Config.Comment("Pollution Amount for Coke Ovens") + @Config.DefaultInt(10) + public static int cokeOvenPollutionAmount; + + @Config.Comment("Pollution Amount for RC Firebox") + @Config.DefaultInt(20) + public static int fireboxPollutionAmount; + + @Config.Comment("Pollution Amount for hobbyist steam engine") + @Config.DefaultInt(20) + public static int hobbyistEnginePollutionAmount; + + @Config.Comment("Make Railcraft Pollute") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public static boolean railcraftPollutes; + + @Config.Comment("Pollution Amount for tunnel bore") + @Config.DefaultInt(2) + public static int tunnelBorePollutionAmount; + + // bartworks + @Config.Comment("How much should the Simple Stirling Water Pump produce pollution per second") + @Config.DefaultInt(5) + public static int pollutionHeatedWaterPumpSecond; + + @Config.Comment("How much should the MBF produce pollution per tick per ingot. Then it'll be multiplied by the amount of ingots done in parallel") + @Config.DefaultInt(400) + public static int basePollutionMBFSecond; + + @Config.Comment("Changes colors of certain blocks based on pollution levels") + @Config.DefaultBoolean(true) + @Config.RequiresMcRestart + public static boolean pollutionBlockRecolor; + + @Config.Comment("Double Plant Blocks - Recolor Block List") + @Config.DefaultStringList({ "net.minecraft.block.BlockDoublePlant:FLOWER", }) + @Config.RequiresMcRestart + public static String[] renderBlockDoublePlant; + + @Config.Comment("Liquid Blocks - Recolor Block List") + @Config.DefaultStringList({ "net.minecraft.block.BlockLiquid:LIQUID" }) + @Config.RequiresMcRestart + public static String[] renderBlockLiquid; + + @Config.Comment("Block Vine - Recolor Block List") + @Config.DefaultStringList({ "net.minecraft.block.BlockVine:FLOWER", }) + @Config.RequiresMcRestart + public static String[] renderblockVine; + + @Config.Comment("Crossed Squares - Recolor Block List") + @Config.DefaultStringList({ "net.minecraft.block.BlockTallGrass:FLOWER", "net.minecraft.block.BlockFlower:FLOWER", + "biomesoplenty.common.blocks.BlockBOPFlower:FLOWER", "biomesoplenty.common.blocks.BlockBOPFlower2:FLOWER", + "biomesoplenty.common.blocks.BlockBOPFoliage:FLOWER", }) + @Config.RequiresMcRestart + public static String[] renderCrossedSquares; + + @Config.Comment("Standard Blocks - Recolor Block List") + @Config.DefaultStringList({ "net.minecraft.block.BlockGrass:GRASS", "net.minecraft.block.BlockLeavesBase:LEAVES", + "biomesoplenty.common.blocks.BlockOriginGrass:GRASS", "biomesoplenty.common.blocks.BlockLongGrass:GRASS", + "biomesoplenty.common.blocks.BlockNewGrass:GRASS", "tconstruct.blocks.slime.SlimeGrass:GRASS", + "thaumcraft.common.blocks.BlockMagicalLeaves:LEAVES", }) + @Config.RequiresMcRestart + public static String[] renderStandardBlock; + + // gt++ + @Config.Comment("pollution rate in gibbl/s for the Amazon warehousing depot") + @Config.DefaultInt(40) + public static int pollutionPerSecondMultiPackager; + @Config.Comment("pollution rate in gibbl/s for the Alloy blast smelter") + @Config.DefaultInt(300) + public static int pollutionPerSecondMultiIndustrialAlloySmelter; + @Config.Comment("pollution rate in gibbl/s for the High current arc furnace") + @Config.DefaultInt(2_400) + public static int pollutionPerSecondMultiIndustrialArcFurnace; + @Config.Comment("pollution rate in gibbl/s for the Industrial centrifuge") + @Config.DefaultInt(300) + public static int pollutionPerSecondMultiIndustrialCentrifuge; + @Config.Comment("pollution rate in gibbl/s for the Industrial coke oven") + @Config.DefaultInt(80) + public static int pollutionPerSecondMultiIndustrialCokeOven; + @Config.Comment("pollution rate in gibbl/s for the Cutting factory") + @Config.DefaultInt(160) + public static int pollutionPerSecondMultiIndustrialCuttingMachine; + @Config.Comment("pollution rate in gibbl/s for the Utupu-Tanuri") + @Config.DefaultInt(500) + public static int pollutionPerSecondMultiIndustrialDehydrator; + @Config.Comment("pollution rate in gibbl/s for the Industrial electrolyzer") + @Config.DefaultInt(300) + public static int pollutionPerSecondMultiIndustrialElectrolyzer; + @Config.Comment("pollution rate in gibbl/s for the Industrial extrusion machine") + @Config.DefaultInt(1_000) + public static int pollutionPerSecondMultiIndustrialExtruder; + @Config.Comment("pollution rate in gibbl/s for the Maceration stack") + @Config.DefaultInt(400) + public static int pollutionPerSecondMultiIndustrialMacerator; + @Config.Comment("pollution rate in gibbl/s for the Industrial mixing machine") + @Config.DefaultInt(800) + public static int pollutionPerSecondMultiIndustrialMixer; + @Config.Comment("pollution rate in gibbl/s for the Large processing factory in metal mode") + @Config.DefaultInt(400) + public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeMetal; + @Config.Comment("pollution rate in gibbl/s for the Large processing factory in fluid mode") + @Config.DefaultInt(400) + public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeFluid; + @Config.Comment("pollution rate in gibbl/s for the Large processing factory in misc mode") + @Config.DefaultInt(600) + public static int pollutionPerSecondMultiIndustrialMultiMachine_ModeMisc; + @Config.Comment("pollution rate in gibbl/s for the Industrial material press in forming mode") + @Config.DefaultInt(240) |
