Skip to content

Commit 90b8e04

Browse files
committed
trim lossless wire configs
1 parent 4f36d36 commit 90b8e04

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

src/main/java/gregtech/api/unification/material/properties/WireProperties.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public class WireProperties implements IMaterialProperty<WireProperties> {
77
public final int voltage;
88
public final int amperage;
99
public final int lossPerBlock;
10+
public final boolean isSuperconductor = false; // todo implement
1011

1112
public WireProperties(int voltage, int baseAmperage, int lossPerBlock) {
1213
this.voltage = voltage;

src/main/java/gregtech/common/ConfigHolder.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,6 @@ public class ConfigHolder {
113113
@Config.RequiresMcRestart
114114
public static int gasTurbineBonusOutput = 6144;
115115

116-
@Config.Comment("If true, powered zero loss wires will damage the player. Default: false")
117-
public static boolean doLosslessWiresDamage = false;
118-
119-
@Config.Comment("If true, lossless cables will have lossy wires. Default: false")
120-
@Config.RequiresMcRestart
121-
public static boolean doLosslessWiresMakeLossyCables = false;
122-
123116
@Config.Comment("Array of blacklisted dimension IDs in which Air Collector does not work. Default: none")
124117
public static int[] airCollectorDimensionBlacklist = new int[]{};
125118

src/main/java/gregtech/common/pipelike/cable/BlockCable.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,10 @@ public boolean canPipeConnectToBlock(IPipeTile<Insulation, WireProperties> selfT
124124
public void onEntityCollision(World worldIn, @Nonnull BlockPos pos, @Nonnull IBlockState state, @Nonnull Entity entityIn) {
125125
if (worldIn.isRemote) return;
126126
Insulation insulation = getPipeTileEntity(worldIn, pos).getPipeType();
127-
boolean damageOnLossless = ConfigHolder.doLosslessWiresDamage;
128127
if (!worldIn.isRemote && insulation.insulationLevel == -1 && entityIn instanceof EntityLivingBase) {
129128
EntityLivingBase entityLiving = (EntityLivingBase) entityIn;
130129
EnergyNet energyNet = getWorldPipeNet(worldIn).getNetFromPos(pos);
131-
if (energyNet != null && (damageOnLossless || energyNet.getAllNodes().get(pos).data.lossPerBlock > 0)) {
130+
if (energyNet != null && (energyNet.getAllNodes().get(pos).data.lossPerBlock > 0)) {
132131
long voltage = energyNet.getLastMaxVoltage();
133132
long amperage = energyNet.getLastAmperage();
134133
if (voltage > 0L && amperage > 0L) {

src/main/java/gregtech/common/pipelike/cable/Insulation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public OrePrefix getOrePrefix() {
5858
public WireProperties modifyProperties(WireProperties baseProperties) {
5959

6060
int lossPerBlock;
61-
if (ConfigHolder.doLosslessWiresMakeLossyCables && baseProperties.lossPerBlock == 0)
61+
if (!baseProperties.isSuperconductor && baseProperties.lossPerBlock == 0)
6262
lossPerBlock = (int) (0.75 * lossMultiplier);
6363
else lossPerBlock = baseProperties.lossPerBlock * lossMultiplier;
6464

0 commit comments

Comments
 (0)