From 90b8e041f5483a91d008aacdada61c55626017dd Mon Sep 17 00:00:00 2001 From: DStrand1 Date: Mon, 9 Aug 2021 00:25:49 -0500 Subject: [PATCH] trim lossless wire configs --- .../unification/material/properties/WireProperties.java | 1 + src/main/java/gregtech/common/ConfigHolder.java | 7 ------- .../java/gregtech/common/pipelike/cable/BlockCable.java | 3 +-- .../java/gregtech/common/pipelike/cable/Insulation.java | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/main/java/gregtech/api/unification/material/properties/WireProperties.java b/src/main/java/gregtech/api/unification/material/properties/WireProperties.java index 6cf89ba741c..557b0f59823 100644 --- a/src/main/java/gregtech/api/unification/material/properties/WireProperties.java +++ b/src/main/java/gregtech/api/unification/material/properties/WireProperties.java @@ -7,6 +7,7 @@ public class WireProperties implements IMaterialProperty { public final int voltage; public final int amperage; public final int lossPerBlock; + public final boolean isSuperconductor = false; // todo implement public WireProperties(int voltage, int baseAmperage, int lossPerBlock) { this.voltage = voltage; diff --git a/src/main/java/gregtech/common/ConfigHolder.java b/src/main/java/gregtech/common/ConfigHolder.java index d8e97c86aa1..87e5db93963 100644 --- a/src/main/java/gregtech/common/ConfigHolder.java +++ b/src/main/java/gregtech/common/ConfigHolder.java @@ -113,13 +113,6 @@ public class ConfigHolder { @Config.RequiresMcRestart public static int gasTurbineBonusOutput = 6144; - @Config.Comment("If true, powered zero loss wires will damage the player. Default: false") - public static boolean doLosslessWiresDamage = false; - - @Config.Comment("If true, lossless cables will have lossy wires. Default: false") - @Config.RequiresMcRestart - public static boolean doLosslessWiresMakeLossyCables = false; - @Config.Comment("Array of blacklisted dimension IDs in which Air Collector does not work. Default: none") public static int[] airCollectorDimensionBlacklist = new int[]{}; diff --git a/src/main/java/gregtech/common/pipelike/cable/BlockCable.java b/src/main/java/gregtech/common/pipelike/cable/BlockCable.java index c1f2d1124db..9e71868fe4f 100644 --- a/src/main/java/gregtech/common/pipelike/cable/BlockCable.java +++ b/src/main/java/gregtech/common/pipelike/cable/BlockCable.java @@ -124,11 +124,10 @@ public boolean canPipeConnectToBlock(IPipeTile selfT public void onEntityCollision(World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull Entity entityIn) { if (worldIn.isRemote) return; Insulation insulation = getPipeTileEntity(worldIn, pos).getPipeType(); - boolean damageOnLossless = ConfigHolder.doLosslessWiresDamage; if (!worldIn.isRemote && insulation.insulationLevel == -1 && entityIn instanceof EntityLivingBase) { EntityLivingBase entityLiving = (EntityLivingBase) entityIn; EnergyNet energyNet = getWorldPipeNet(worldIn).getNetFromPos(pos); - if (energyNet != null && (damageOnLossless || energyNet.getAllNodes().get(pos).data.lossPerBlock > 0)) { + if (energyNet != null && (energyNet.getAllNodes().get(pos).data.lossPerBlock > 0)) { long voltage = energyNet.getLastMaxVoltage(); long amperage = energyNet.getLastAmperage(); if (voltage > 0L && amperage > 0L) { diff --git a/src/main/java/gregtech/common/pipelike/cable/Insulation.java b/src/main/java/gregtech/common/pipelike/cable/Insulation.java index 2dd737df190..5e57db09663 100644 --- a/src/main/java/gregtech/common/pipelike/cable/Insulation.java +++ b/src/main/java/gregtech/common/pipelike/cable/Insulation.java @@ -58,7 +58,7 @@ public OrePrefix getOrePrefix() { public WireProperties modifyProperties(WireProperties baseProperties) { int lossPerBlock; - if (ConfigHolder.doLosslessWiresMakeLossyCables && baseProperties.lossPerBlock == 0) + if (!baseProperties.isSuperconductor && baseProperties.lossPerBlock == 0) lossPerBlock = (int) (0.75 * lossMultiplier); else lossPerBlock = baseProperties.lossPerBlock * lossMultiplier;