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