mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-27 15:23:16 +00:00
Dedupe a bunch of code (#27)
* Initial work on deduplicating code for tiles * Dedupe Energy Cube and Induction Matrix Container * Dedupe Robit Gui * Move robit gui code into its own subpackage * Dedupe DM Filter guis * Dedupe fluid storage containers * Move filter guis into one package * Dedupe filter select * Dedupe Some Transport Filters * Further Dedupe Some Text Filter Code * Dedupe Miner ItemStack/Material GUI Filters * Move gui filter implementations into a sub package * Dedupe Gui Transport ItemStack/Material Filters * Fix copy pasting wrong buttons * Dedupe Gui Type filter some * Dedupe Gui Filter code some * Dedupe Gui Oredictionificator Filter * Dedupe generator containers * Dedupe Mekanism Tools, pickaxe, shovel, paxel * Dedupe code in TileEntityDigitalMiner
This commit is contained in:
1 parent
61ed4e8e4e
commit
083c764b7b
59 files changed
+1542
-3310
No files matched your search
@@ -50,6 +50,7 @@ import mekanism.common.tile.component.TileComponentConfig;
|
||||
import mekanism.common.tile.component.TileComponentEjector;
|
||||
import mekanism.common.tile.prefab.TileEntityAdvancedElectricMachine;
|
||||
import mekanism.common.tile.prefab.TileEntityMachine;
|
||||
import mekanism.common.util.TileUtils;
|
||||
import mekanism.common.util.ChargeUtils;
|
||||
import mekanism.common.util.GasUtils;
|
||||
import mekanism.common.util.InventoryUtils;
|
||||
@@ -793,15 +794,8 @@ public class TileEntityFactory extends TileEntityMachine implements IComputerInt
|
||||
{
|
||||
progress[i] = dataStream.readInt();
|
||||
}
|
||||
|
||||
if(dataStream.readBoolean())
|
||||
{
|
||||
gasTank.setGas(new GasStack(dataStream.readInt(), dataStream.readInt()));
|
||||
}
|
||||
else {
|
||||
gasTank.setGas(null);
|
||||
}
|
||||
|
||||
|
||||
TileUtils.readTankData(dataStream, gasTank);
|
||||
if(upgraded)
|
||||
{
|
||||
markDirty();
|
||||
@@ -881,16 +875,7 @@ public class TileEntityFactory extends TileEntityMachine implements IComputerInt
|
||||
}
|
||||
|
||||
data.add(progress);
|
||||
|
||||
if(gasTank.getGas() != null)
|
||||
{
|
||||
data.add(true);
|
||||
data.add(gasTank.getGas().getGas().getID());
|
||||
data.add(gasTank.getStored());
|
||||
}
|
||||
else {
|
||||
data.add(false);
|
||||
}
|
||||
TileUtils.addTankData(data, gasTank);
|
||||
|
||||
upgraded = false;
|
||||
|
||||
|
||||
Reference in new issue
Block a user