mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 05:44:27 +00:00
Port config rewrite (#5378)
Port Config system, Remove some unused code, Refactored various Tier enums out into their own package
This commit is contained in:
1 parent
a776879eed
commit
9d98ef575d
209 files changed
+3275
-2763
No files matched your search
@@ -15,8 +15,8 @@ import mekanism.api.gas.IGasItem;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.SideData;
|
||||
import mekanism.common.Tier.BaseTier;
|
||||
import mekanism.common.Tier.GasTankTier;
|
||||
import mekanism.common.tier.BaseTier;
|
||||
import mekanism.common.tier.GasTankTier;
|
||||
import mekanism.common.base.IRedstoneControl;
|
||||
import mekanism.common.base.ISideConfiguration;
|
||||
import mekanism.common.base.ITierUpgradeable;
|
||||
@@ -83,7 +83,7 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasH
|
||||
configComponent.setIOConfig(TransmissionType.GAS);
|
||||
configComponent.setEjecting(TransmissionType.GAS, true);
|
||||
|
||||
gasTank = new GasTank(tier.storage);
|
||||
gasTank = new GasTank(tier.getStorage());
|
||||
inventory = NonNullList.withSize(2, ItemStack.EMPTY);
|
||||
dumping = GasMode.IDLE;
|
||||
controlType = RedstoneControl.DISABLED;
|
||||
@@ -107,7 +107,7 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasH
|
||||
|| dumping != GasMode.DUMPING)) {
|
||||
if (configComponent.isEjecting(TransmissionType.GAS)) {
|
||||
GasStack toSend = new GasStack(gasTank.getGas().getGas(),
|
||||
Math.min(gasTank.getStored(), tier.output));
|
||||
Math.min(gasTank.getStored(), tier.getOutput()));
|
||||
gasTank.draw(GasUtils
|
||||
.emit(toSend, this, configComponent.getSidesForData(TransmissionType.GAS, facing, 2)),
|
||||
tier != GasTankTier.CREATIVE);
|
||||
@@ -116,11 +116,11 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasH
|
||||
|
||||
if (tier != GasTankTier.CREATIVE) {
|
||||
if (dumping == GasMode.DUMPING) {
|
||||
gasTank.draw(tier.storage / 400, true);
|
||||
gasTank.draw(tier.getStorage() / 400, true);
|
||||
}
|
||||
|
||||
if (dumping == GasMode.DUMPING_EXCESS && gasTank.getNeeded() < tier.output) {
|
||||
gasTank.draw(tier.output - gasTank.getNeeded(), true);
|
||||
if (dumping == GasMode.DUMPING_EXCESS && gasTank.getNeeded() < tier.getOutput()) {
|
||||
gasTank.draw(tier.getOutput() - gasTank.getNeeded(), true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasH
|
||||
}
|
||||
|
||||
tier = GasTankTier.values()[upgradeTier.ordinal()];
|
||||
gasTank.setMaxGas(tier.storage);
|
||||
gasTank.setMaxGas(tier.getStorage());
|
||||
|
||||
Mekanism.packetHandler
|
||||
.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new TileNetworkList())),
|
||||
@@ -289,7 +289,7 @@ public class TileEntityGasTank extends TileEntityContainerBlock implements IGasH
|
||||
GasTankTier prevTier = tier;
|
||||
|
||||
tier = GasTankTier.values()[dataStream.readInt()];
|
||||
gasTank.setMaxGas(tier.storage);
|
||||
gasTank.setMaxGas(tier.getStorage());
|
||||
TileUtils.readTankData(dataStream, gasTank);
|
||||
|
||||
dumping = GasMode.values()[dataStream.readInt()];
|
||||
|
||||
Reference in new issue
Block a user