From 02c9582b21ac6a59d4c65411c7e6878a7fb8ad36 Mon Sep 17 00:00:00 2001 From: Boblet Date: Mon, 15 Jul 2024 14:29:53 +0200 Subject: [PATCH] fuck, whatever --- .../network/TileEntityConverterHeRf.java | 16 ++++++++-------- .../network/TileEntityConverterRfHe.java | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/hbm/tileentity/network/TileEntityConverterHeRf.java b/src/main/java/com/hbm/tileentity/network/TileEntityConverterHeRf.java index f154fe94d..723b414c9 100644 --- a/src/main/java/com/hbm/tileentity/network/TileEntityConverterHeRf.java +++ b/src/main/java/com/hbm/tileentity/network/TileEntityConverterHeRf.java @@ -22,8 +22,8 @@ public class TileEntityConverterHeRf extends TileEntityLoadedBase implements IEn public long power; public final long maxPower = 5_000_000; - public static long heInput = 1; - public static long rfOutput = 5; + public static long heInput = 5; + public static long rfOutput = 1; public static double inputDecay = 0.05; public EnergyStorage storage = new EnergyStorage(1_000_000, 1_000_000, 1_000_000); @@ -32,8 +32,8 @@ public class TileEntityConverterHeRf extends TileEntityLoadedBase implements IEn if (!worldObj.isRemote) { - long rfCreated = Math.min(storage.getMaxEnergyStored() - storage.getEnergyStored(), power / rfOutput * heInput); - this.power -= rfCreated * rfOutput / heInput; + long rfCreated = Math.min(storage.getMaxEnergyStored() - storage.getEnergyStored(), power / heInput * rfOutput); + this.power -= rfCreated * heInput / rfOutput; this.storage.setEnergyStored((int) (storage.getEnergyStored() + rfCreated)); if(power > 0) this.power *= (1D - inputDecay); if(rfCreated > 0) this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this); @@ -91,15 +91,15 @@ public class TileEntityConverterHeRf extends TileEntityLoadedBase implements IEn @Override public void readIfPresent(JsonObject obj) { - heInput = IConfigurableMachine.grab(obj, "L:HEUsed", heInput); - rfOutput = IConfigurableMachine.grab(obj, "L:RFCreated", rfOutput); + heInput = IConfigurableMachine.grab(obj, "L:HE_Used", heInput); + rfOutput = IConfigurableMachine.grab(obj, "L:RF_Created", rfOutput); inputDecay = IConfigurableMachine.grab(obj, "D:inputDecay", inputDecay); } @Override public void writeConfig(JsonWriter writer) throws IOException { - writer.name("L:HEUsed").value(heInput); - writer.name("L:RFCreated").value(rfOutput); + writer.name("L:HE_Used").value(heInput); + writer.name("L:RF_Created").value(rfOutput); writer.name("D:inputDecay").value(inputDecay); } } diff --git a/src/main/java/com/hbm/tileentity/network/TileEntityConverterRfHe.java b/src/main/java/com/hbm/tileentity/network/TileEntityConverterRfHe.java index 41c7ea769..8e939ba1d 100644 --- a/src/main/java/com/hbm/tileentity/network/TileEntityConverterRfHe.java +++ b/src/main/java/com/hbm/tileentity/network/TileEntityConverterRfHe.java @@ -17,8 +17,8 @@ public class TileEntityConverterRfHe extends TileEntityLoadedBase implements IEn public long power; public final long maxPower = 5_000_000; - public static long rfInput = 5; - public static long heOutput = 1; + public static long rfInput = 1; + public static long heOutput = 5; public static double inputDecay = 0.05; public EnergyStorage storage = new EnergyStorage(1_000_000, 1_000_000, 1_000_000); @@ -28,9 +28,9 @@ public class TileEntityConverterRfHe extends TileEntityLoadedBase implements IEn if (!worldObj.isRemote) { - long rfCreated = Math.min(storage.getEnergyStored(), (maxPower - power) * heOutput / rfInput); + long rfCreated = Math.min(storage.getEnergyStored(), (maxPower - power) * rfInput / heOutput); storage.setEnergyStored((int) (storage.getEnergyStored() - rfCreated)); - power += rfCreated * rfInput / heOutput; + power += rfCreated * heOutput / rfInput; if(storage.getEnergyStored() > 0) storage.extractEnergy((int) Math.ceil(storage.getEnergyStored() * inputDecay), false); if(rfCreated > 0) this.worldObj.markTileEntityChunkModified(this.xCoord, this.yCoord, this.zCoord, this); @@ -73,15 +73,15 @@ public class TileEntityConverterRfHe extends TileEntityLoadedBase implements IEn @Override public void readIfPresent(JsonObject obj) { - rfInput = IConfigurableMachine.grab(obj, "L:RFUsed", rfInput); - heOutput = IConfigurableMachine.grab(obj, "L:HECreated", heOutput); + rfInput = IConfigurableMachine.grab(obj, "L:RF_Used", rfInput); + heOutput = IConfigurableMachine.grab(obj, "L:HE_Created", heOutput); inputDecay = IConfigurableMachine.grab(obj, "D:inputDecay", inputDecay); } @Override public void writeConfig(JsonWriter writer) throws IOException { - writer.name("L:RFUsed").value(rfInput); - writer.name("L:HECreated").value(heOutput); + writer.name("L:RF_Used").value(rfInput); + writer.name("L:HE_Created").value(heOutput); writer.name("D:inputDecay").value(inputDecay); } }