Moved some machines to enum

This commit is contained in:
drcrazy 2018-09-24 16:13:35 +03:00
parent dd94ff31c9
commit 86a2612b97
24 changed files with 79 additions and 142 deletions

View file

@ -50,7 +50,7 @@ public class TileIndustrialCentrifuge extends TileGenericMachine implements ICon
public static int maxEnergy = 10_000;
public TileIndustrialCentrifuge() {
super("IndustrialCentrifuge", maxInput, maxEnergy, TRContent.INDUSTRIAL_CENTRIFUGE, 6);
super("IndustrialCentrifuge", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_CENTRIFUGE.block, 6);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2, 3, 4, 5 };
this.inventory = new Inventory<>(7, "TileIndustrialCentrifuge", 64, this).withConfiguredAccess();

View file

@ -196,7 +196,7 @@ public class TileMatterFabricator extends TilePowerAcceptor
// IToolDrop
@Override
public ItemStack getToolDrop(EntityPlayer entityPlayer) {
return new ItemStack(TRContent.MATTER_FABRICATOR, 1);
return TRContent.Machine.MATTER_FABRICATOR.getStack();
}
// ItemHandlerProvider

View file

@ -297,7 +297,7 @@ public class TileIronAlloyFurnace extends TileMachineBase
@Override
public ItemStack getToolDrop(final EntityPlayer entityPlayer) {
return new ItemStack(TRContent.IRON_ALLOY_FURNACE, 1);
return TRContent.Machine.IRON_ALLOY_FURNACE.getStack();
}
public boolean isComplete() {

View file

@ -50,7 +50,7 @@ public class TileDistillationTower extends TileGenericMachine implements IContai
public MultiblockChecker multiblockChecker;
public TileDistillationTower() {
super("DistillationTower", maxInput, maxEnergy, TRContent.DISTILLATION_TOWER, 6);
super("DistillationTower", maxInput, maxEnergy, TRContent.Machine.DISTILLATION_TOWER.block, 6);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2, 3, 4, 5 };
this.inventory = new Inventory<>(7, "TileDistillationTower", 64, this).withConfiguredAccess();

View file

@ -63,7 +63,7 @@ public class TileFluidReplicator extends TileGenericMachine implements IContaine
int ticksSinceLastChange;
public TileFluidReplicator() {
super("FluidReplicator", maxInput, maxEnergy, TRContent.FLUID_REPLICATOR, 3);
super("FluidReplicator", maxInput, maxEnergy, TRContent.Machine.FLUID_REPLICATOR.block, 3);
final int[] inputs = new int[] { 0 };
this.inventory = new Inventory<>(4, "TileFluidReplicator", 64, this, getInventoryAccess());
this.crafter = new FluidReplicatorRecipeCrafter(this, this.inventory, inputs, null);

View file

@ -49,7 +49,7 @@ public class TileImplosionCompressor extends TileGenericMachine implements ICont
public MultiblockChecker multiblockChecker;
public TileImplosionCompressor() {
super("ImplosionCompressor", maxInput, maxEnergy, TRContent.IMPLOSION_COMPRESSOR, 4);
super("ImplosionCompressor", maxInput, maxEnergy, TRContent.Machine.IMPLOSION_COMPRESSOR.block, 4);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2, 3 };
this.inventory = new Inventory<>(5, "TileImplosionCompressor", 64, this);

View file

@ -61,7 +61,7 @@ public class TileIndustrialBlastFurnace extends TileGenericMachine implements IC
private int cachedHeat;
public TileIndustrialBlastFurnace() {
super("IndustrialBlastFurnace", maxInput, maxEnergy, TRContent.INDUSTRIAL_BLAST_FURNACE, 4);
super("IndustrialBlastFurnace", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_BLAST_FURNACE.block, 4);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2, 3 };
this.inventory = new Inventory<>(5, "TileIndustrialBlastFurnace", 64, this).withConfiguredAccess();

View file

@ -67,7 +67,7 @@ public class TileIndustrialGrinder extends TileGenericMachine implements IContai
int ticksSinceLastChange;
public TileIndustrialGrinder() {
super("IndustrialGrinder", maxInput, maxEnergy, TRContent.INDUSTRIAL_GRINDER, 7);
super("IndustrialGrinder", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_GRINDER.block, 7);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] {2, 3, 4, 5};
this.inventory = new Inventory<>(8, "TileIndustrialGrinder", 64, this, getInventoryAccess());

View file

@ -66,7 +66,7 @@ public class TileIndustrialSawmill extends TileGenericMachine implements IContai
int ticksSinceLastChange;
public TileIndustrialSawmill() {
super("IndustrialSawmill", maxInput, maxEnergy, TRContent.INDUSTRIAL_SAWMILL, 6);
super("IndustrialSawmill", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_SAWMILL.block, 6);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2, 3, 4 };
this.inventory = new Inventory<>(7, "TileSawmill", 64, this, getInventoryAccess());

View file

@ -48,7 +48,7 @@ public class TileVacuumFreezer extends TileGenericMachine implements IContainerP
public MultiblockChecker multiblockChecker;
public TileVacuumFreezer() {
super("VacuumFreezer", maxInput, maxEnergy, TRContent.VACUUM_FREEZER, 2);
super("VacuumFreezer", maxInput, maxEnergy, TRContent.Machine.VACUUM_FREEZER.block, 2);
final int[] inputs = new int[] { 0 };
final int[] outputs = new int[] { 1 };
this.inventory = new Inventory<>(3, "TileVacuumFreezer", 64, this).withConfiguredAccess();

View file

@ -49,7 +49,7 @@ public class TileAlloySmelter extends TileGenericMachine implements IContainerPr
public static int maxEnergy = 1_000;
public TileAlloySmelter() {
super("AlloySmelter", maxInput, maxEnergy, TRContent.ALLOY_SMELTER, 3);
super("AlloySmelter", maxInput, maxEnergy, TRContent.Machine.ALLOY_SMELTER.block, 3);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2 };
this.inventory = new Inventory<>(4, "TileAlloySmelter", 64, this).withConfiguredAccess();

View file

@ -46,7 +46,7 @@ public class TileAssemblingMachine extends TileGenericMachine implements IContai
public static int maxEnergy = 10_000;
public TileAssemblingMachine() {
super("AssemblingMachine", maxInput, maxEnergy, TRContent.ASSEMBLY_MACHINE, 3);
super("AssemblingMachine", maxInput, maxEnergy, TRContent.Machine.ASSEMBLY_MACHINE.block, 3);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2 };
this.inventory = new Inventory<>(4, "TileAssemblingMachine", 64, this).withConfiguredAccess();

View file

@ -425,7 +425,7 @@ public class TileAutoCraftingTable extends TilePowerAcceptor
// IToolDrop
@Override
public ItemStack getToolDrop(EntityPlayer playerIn) {
return new ItemStack(TRContent.AUTO_CRAFTING_TABLE, 1);
return TRContent.Machine.AUTO_CRAFTING_TABLE.getStack();
}
// ItemHandlerProvider

View file

@ -46,7 +46,7 @@ public class TileChemicalReactor extends TileGenericMachine implements IContaine
public static int maxEnergy = 10_000;
public TileChemicalReactor() {
super("ChemicalReactor", maxInput, maxEnergy, TRContent.CHEMICAL_REACTOR, 3);
super("ChemicalReactor", maxInput, maxEnergy, TRContent.Machine.CHEMICAL_REACTOR.block, 3);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2 };
this.inventory = new Inventory<>(4, "TileChemicalReactor", 64, this).withConfiguredAccess();

View file

@ -46,7 +46,7 @@ public class TileCompressor extends TileGenericMachine implements IContainerProv
public static int maxEnergy = 1000;
public TileCompressor() {
super("Compressor", maxInput, maxEnergy, TRContent.COMPRESSOR, 2);
super("Compressor", maxInput, maxEnergy, TRContent.Machine.COMPRESSOR.block, 2);
final int[] inputs = new int[] { 0 };
final int[] outputs = new int[] { 1 };
this.inventory = new Inventory<>(3, "TileCompressor", 64, this).withConfiguredAccess();

View file

@ -204,7 +204,7 @@ public class TileElectricFurnace extends TilePowerAcceptor
// IToolDrop
@Override
public ItemStack getToolDrop(final EntityPlayer entityPlayer) {
return new ItemStack(TRContent.ELECTRIC_FURNACE, 1);
return TRContent.Machine.ELECTRIC_FURNACE.getStack();
}
// ItemHandlerProvider

View file

@ -46,7 +46,7 @@ public class TileExtractor extends TileGenericMachine implements IContainerProvi
public static int maxEnergy = 1_000;
public TileExtractor() {
super("Extractor", maxInput, maxEnergy, TRContent.EXTRACTOR, 2);
super("Extractor", maxInput, maxEnergy, TRContent.Machine.EXTRACTOR.block, 2);
final int[] inputs = new int[] { 0 };
final int[] outputs = new int[] { 1 };
this.inventory = new Inventory<>(3, "TileExtractor", 64, this).withConfiguredAccess();

View file

@ -46,7 +46,7 @@ public class TileGrinder extends TileGenericMachine implements IContainerProvide
public static int maxEnergy = 1_000;
public TileGrinder() {
super("Grinder", maxInput, maxEnergy, TRContent.GRINDER, 2);
super("Grinder", maxInput, maxEnergy, TRContent.Machine.GRINDER.block, 2);
final int[] inputs = new int[] { 0 };
final int[] outputs = new int[] { 1 };
this.inventory = new Inventory<>(3, "TileGrinder", 64, this).withConfiguredAccess();

View file

@ -48,7 +48,7 @@ public class TileIndustrialElectrolyzer extends TileGenericMachine implements IC
public static int maxEnergy = 10_000;
public TileIndustrialElectrolyzer() {
super("IndustrialElectrolyzer", maxInput, maxEnergy, TRContent.INDUSTRIAL_ELECTROLYZER, 6);
super("IndustrialElectrolyzer", maxInput, maxEnergy, TRContent.Machine.INDUSTRIAL_ELECTROLYZER.block, 6);
final int[] inputs = new int[] { 0, 1 };
final int[] outputs = new int[] { 2, 3, 4, 5 };
this.inventory = new Inventory<>(7, "TileIndustrialElectrolyzer", 64, this).withConfiguredAccess();

View file

@ -187,7 +187,7 @@ public class TileRecycler extends TilePowerAcceptor
// IToolDrop
@Override
public ItemStack getToolDrop(EntityPlayer entityPlayer) {
return new ItemStack(TRContent.RECYCLER, 1);
return TRContent.Machine.RECYCLER.getStack();
}
// ItemHandlerProvider

View file

@ -274,7 +274,7 @@ public class TileRollingMachine extends TilePowerAcceptor
@Override
public ItemStack getToolDrop(final EntityPlayer entityPlayer) {
return new ItemStack(TRContent.ROLLING_MACHINE, 1);
return TRContent.Machine.ROLLING_MACHINE.getStack();
}
@Override

View file

@ -45,7 +45,7 @@ public class TileScrapboxinator extends TileGenericMachine implements IContainer
public static int maxEnergy = 1_000;
public TileScrapboxinator() {
super("Scrapboxinator", maxInput, maxEnergy, TRContent.SCRAPBOXINATOR, 2);
super("Scrapboxinator", maxInput, maxEnergy, TRContent.Machine.SCRAPBOXINATOR.block, 2);
final int[] inputs = new int[] { 0 };
final int[] outputs = new int[] { 1 };
this.inventory = new Inventory<>(3, "TileScrapboxinator", 64, this).withConfiguredAccess();