Small code clean up
This commit is contained in:
parent
b99df6f0a8
commit
87d41aaa53
15 changed files with 20 additions and 74 deletions
|
@ -20,7 +20,6 @@ import techreborn.tiles.TileAlloyFurnace;
|
|||
|
||||
public class BlockAlloyFurnace extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockAlloyFurnace(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.alloyfurnace");
|
||||
|
|
|
@ -13,7 +13,6 @@ import techreborn.tiles.TileAlloySmelter;
|
|||
|
||||
public class BlockAlloySmelter extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockAlloySmelter(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.alloysmelter");
|
||||
|
@ -26,11 +25,9 @@ public class BlockAlloySmelter extends BlockMachineBase implements IRotationText
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.alloySmelterID, world, x, y,
|
||||
z);
|
||||
player.openGui(Core.INSTANCE, GuiHandler.alloySmelterID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -60,5 +57,4 @@ public class BlockAlloySmelter extends BlockMachineBase implements IRotationText
|
|||
public String getBottom() {
|
||||
return prefix + "machine_bottom";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import techreborn.tiles.TileAssemblingMachine;
|
|||
|
||||
public class BlockAssemblingMachine extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockAssemblingMachine(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.assemblingmachine");
|
||||
|
@ -27,11 +26,9 @@ public class BlockAssemblingMachine extends BlockMachineBase implements IRotatio
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.assemblingmachineID, world, x, y,
|
||||
z);
|
||||
player.openGui(Core.INSTANCE, GuiHandler.assemblingmachineID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -61,5 +58,4 @@ public class BlockAssemblingMachine extends BlockMachineBase implements IRotatio
|
|||
public String getBottom() {
|
||||
return prefix + "assembling_machine_top";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import techreborn.tiles.TileBlastFurnace;
|
|||
|
||||
public class BlockBlastFurnace extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockBlastFurnace(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.blastfurnace");
|
||||
|
@ -26,16 +25,12 @@ public class BlockBlastFurnace extends BlockMachineBase implements IRotationText
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.blastFurnaceID, world, x, y,
|
||||
z);
|
||||
player.openGui(Core.INSTANCE, GuiHandler.blastFurnaceID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isAdvanced() {
|
||||
return true;
|
||||
|
@ -67,5 +62,4 @@ public class BlockBlastFurnace extends BlockMachineBase implements IRotationText
|
|||
public String getBottom() {
|
||||
return prefix + "assembling_machine_top";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -57,5 +57,4 @@ public class BlockCentrifuge extends BlockMachineBase implements IRotationTextur
|
|||
public String getBottom() {
|
||||
return prefix + "industrial_centrifuge_bottom";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import techreborn.tiles.TileChargeBench;
|
|||
|
||||
public class BlockChargeBench extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockChargeBench(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.chargebench");
|
||||
|
@ -28,8 +27,7 @@ public class BlockChargeBench extends BlockMachineBase implements IRotationTextu
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.chargeBench, world, x, y,
|
||||
z);
|
||||
player.openGui(Core.INSTANCE, GuiHandler.chargeBench, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -59,5 +57,4 @@ public class BlockChargeBench extends BlockMachineBase implements IRotationTextu
|
|||
public String getBottom() {
|
||||
return prefix + "chargeBench_side";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,8 +13,6 @@ import techreborn.tiles.TileChemicalReactor;
|
|||
|
||||
public class BlockChemicalReactor extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
|
||||
public BlockChemicalReactor(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.chemicalreactor");
|
||||
|
@ -30,8 +28,7 @@ public class BlockChemicalReactor extends BlockMachineBase implements IRotationT
|
|||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.chemicalReactorID, world, x, y,
|
||||
z);
|
||||
player.openGui(Core.INSTANCE, GuiHandler.chemicalReactorID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -61,5 +58,4 @@ public class BlockChemicalReactor extends BlockMachineBase implements IRotationT
|
|||
public String getBottom() {
|
||||
return prefix + "industrial_centrifuge_bottom";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import techreborn.tiles.TileImplosionCompressor;
|
|||
|
||||
public class BlockImplosionCompressor extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockImplosionCompressor(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.implosioncompressor");
|
||||
|
@ -26,11 +25,9 @@ public class BlockImplosionCompressor extends BlockMachineBase implements IRotat
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.implosionCompresserID, world, x, y,
|
||||
z);
|
||||
player.openGui(Core.INSTANCE, GuiHandler.implosionCompresserID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -60,5 +57,4 @@ public class BlockImplosionCompressor extends BlockMachineBase implements IRotat
|
|||
public String getBottom() {
|
||||
return prefix + "implosion_compressor_bottom";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import techreborn.tiles.TileIndustrialElectrolyzer;
|
|||
|
||||
public class BlockIndustrialElectrolyzer extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockIndustrialElectrolyzer(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.industrialelectrolyzer");
|
||||
|
@ -26,11 +25,9 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase implements IRo
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.industrialElectrolyzerID, world, x, y,
|
||||
z);
|
||||
player.openGui(Core.INSTANCE, GuiHandler.industrialElectrolyzerID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -60,5 +57,4 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase implements IRo
|
|||
public String getBottom() {
|
||||
return prefix + "machine_bottom";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ import techreborn.tiles.TileIndustrialGrinder;
|
|||
|
||||
public class BlockIndustrialGrinder extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockIndustrialGrinder(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.industrialgrinder");
|
||||
|
@ -62,5 +61,4 @@ public class BlockIndustrialGrinder extends BlockMachineBase implements IRotatio
|
|||
public String getBottom() {
|
||||
return prefix + "industrial_centrifuge_bottom";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -26,14 +26,12 @@ public class BlockIndustrialSawmill extends BlockMachineBase implements IRotatio
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(fillBlockWithFluid(world, new BlockPos(x, y, z), player)){
|
||||
return true;
|
||||
}
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.sawMillID, world, x, y,
|
||||
z);
|
||||
player.openGui(Core.INSTANCE, GuiHandler.sawMillID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -63,6 +61,4 @@ public class BlockIndustrialSawmill extends BlockMachineBase implements IRotatio
|
|||
public String getBottom() {
|
||||
return prefix + "advanced_machine_side";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ import techreborn.tiles.TileMatterFabricator;
|
|||
|
||||
public class BlockMatterFabricator extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockMatterFabricator(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.matterfabricator");
|
||||
|
@ -26,11 +25,9 @@ public class BlockMatterFabricator extends BlockMachineBase implements IAdvanced
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.matterfabID, world, x, y,
|
||||
z);
|
||||
player.openGui(Core.INSTANCE, GuiHandler.matterfabID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,8 +13,6 @@ import techreborn.tiles.TileRollingMachine;
|
|||
|
||||
public class BlockRollingMachine extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
|
||||
public BlockRollingMachine(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.rollingmachine");
|
||||
|
@ -27,11 +25,9 @@ public class BlockRollingMachine extends BlockMachineBase implements IAdvancedRo
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.rollingMachineID, world,
|
||||
x, y, z);
|
||||
player.openGui(Core.INSTANCE, GuiHandler.rollingMachineID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,29 +14,23 @@ import techreborn.tiles.TileVacuumFreezer;
|
|||
|
||||
public class BlockVacuumFreezer extends BlockMachineBase implements IAdvancedRotationTexture{
|
||||
|
||||
|
||||
public BlockVacuumFreezer(Material material) {
|
||||
super();
|
||||
setUnlocalizedName("techreborn.vacuumfreezer");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileVacuumFreezer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
TileVacuumFreezer tileVacuumFreezer = (TileVacuumFreezer) world.getTileEntity(new BlockPos(x, y, z));
|
||||
tileVacuumFreezer.multiBlockStatus = tileVacuumFreezer.checkMachine() ? 1 : 0;
|
||||
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.vacuumFreezerID, world, x, y,
|
||||
z);
|
||||
player.openGui(Core.INSTANCE, GuiHandler.vacuumFreezerID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,10 +46,6 @@ public class TileIronFurnace extends TileMachineBase implements IInventory {
|
|||
public int fuelGague;
|
||||
public int progress;
|
||||
public int fuelScale = 200;
|
||||
byte direction;
|
||||
private static final int[] slots_top = new int[] { 0 };
|
||||
private static final int[] slots_bottom = new int[] { 2, 1 };
|
||||
private static final int[] slots_sides = new int[] { 1 };
|
||||
|
||||
public int gaugeProgressScaled (int scale)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue