Formatting + set proper frame drop for advanced machines
This commit is contained in:
parent
649a6bf67f
commit
45669e8aa9
43 changed files with 149 additions and 98 deletions
|
@ -48,7 +48,7 @@ public class BlockComputerCube extends BlockMachineBase {
|
||||||
public BlockComputerCube() {
|
public BlockComputerCube() {
|
||||||
super();
|
super();
|
||||||
this.setUnlocalizedName("techreborn.computercube");
|
this.setUnlocalizedName("techreborn.computercube");
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class BlockFusionControlComputer extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockFusionControlComputer() {
|
public BlockFusionControlComputer() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -104,4 +104,9 @@ public class BlockFusionControlComputer extends BlockMachineBase {
|
||||||
public TileEntity createNewTileEntity(final World world, final int meta) {
|
public TileEntity createNewTileEntity(final World world, final int meta) {
|
||||||
return new TileFusionControlComputer();
|
return new TileFusionControlComputer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,12 +40,9 @@ import techreborn.tiles.generator.TileDieselGenerator;
|
||||||
*/
|
*/
|
||||||
public class BlockDieselGenerator extends BlockMachineBase {
|
public class BlockDieselGenerator extends BlockMachineBase {
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public BlockDieselGenerator() {
|
public BlockDieselGenerator() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ public class BlockDragonEggSyphon extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockDragonEggSyphon() {
|
public BlockDragonEggSyphon() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,5 +51,4 @@ public class BlockDragonEggSyphon extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockGasTurbine extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockGasTurbine() {
|
public BlockGasTurbine() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,5 +52,4 @@ public class BlockGasTurbine extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.GAS_TURBINE;
|
return EGui.GAS_TURBINE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,6 @@ public class BlockLightningRod extends BlockMachineBase {
|
||||||
return new TileLightningRod();
|
return new TileLightningRod();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -56,5 +56,4 @@ public class BlockMagicEnergyAbsorber extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,9 +40,6 @@ import techreborn.tiles.generator.TilePlasmaGenerator;
|
||||||
*/
|
*/
|
||||||
public class BlockPlasmaGenerator extends BlockMachineBase {
|
public class BlockPlasmaGenerator extends BlockMachineBase {
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public BlockPlasmaGenerator() {
|
public BlockPlasmaGenerator() {
|
||||||
super();
|
super();
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockSemiFluidGenerator extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockSemiFluidGenerator() {
|
public BlockSemiFluidGenerator() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockSolidFuelGenerator extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockSolidFuelGenerator() {
|
public BlockSolidFuelGenerator() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockThermalGenerator extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockThermalGenerator() {
|
public BlockThermalGenerator() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/generators"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,5 +50,4 @@ public class BlockWaterMill extends BaseTileBlock {
|
||||||
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
||||||
return new TileWaterMill();
|
return new TileWaterMill();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -39,6 +39,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockAdjustableSU extends BlockEnergyStorage {
|
public class BlockAdjustableSU extends BlockEnergyStorage {
|
||||||
|
|
||||||
public BlockAdjustableSU() {
|
public BlockAdjustableSU() {
|
||||||
super("AESU", EGui.AESU.ordinal());
|
super("AESU", EGui.AESU.ordinal());
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,9 +42,9 @@ import java.util.List;
|
||||||
* Created by modmuss50 on 14/03/2016.
|
* Created by modmuss50 on 14/03/2016.
|
||||||
*/
|
*/
|
||||||
public class BlockHighVoltageSU extends BlockEnergyStorage {
|
public class BlockHighVoltageSU extends BlockEnergyStorage {
|
||||||
|
|
||||||
public BlockHighVoltageSU() {
|
public BlockHighVoltageSU() {
|
||||||
super("high_voltage_su", EGui.HIGH_VOLTAGE_SU.ordinal());
|
super("high_voltage_su", EGui.HIGH_VOLTAGE_SU.ordinal());
|
||||||
this.setHardness(2f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -35,6 +35,7 @@ import techreborn.client.EGui;
|
||||||
import techreborn.tiles.idsu.TileInterdimensionalSU;
|
import techreborn.tiles.idsu.TileInterdimensionalSU;
|
||||||
|
|
||||||
public class BlockInterdimensionalSU extends BlockEnergyStorage {
|
public class BlockInterdimensionalSU extends BlockEnergyStorage {
|
||||||
|
|
||||||
public BlockInterdimensionalSU() {
|
public BlockInterdimensionalSU() {
|
||||||
super("IDSU", EGui.IDSU.ordinal());
|
super("IDSU", EGui.IDSU.ordinal());
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,7 @@ import techreborn.client.EGui;
|
||||||
import techreborn.tiles.lesu.TileLapotronicSU;
|
import techreborn.tiles.lesu.TileLapotronicSU;
|
||||||
|
|
||||||
public class BlockLapotronicSU extends BlockEnergyStorage {
|
public class BlockLapotronicSU extends BlockEnergyStorage {
|
||||||
|
|
||||||
public BlockLapotronicSU() {
|
public BlockLapotronicSU() {
|
||||||
super("LESU", EGui.LESU.ordinal());
|
super("LESU", EGui.LESU.ordinal());
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ import techreborn.tiles.storage.TileLowVoltageSU;
|
||||||
* Created by modmuss50 on 14/03/2016.
|
* Created by modmuss50 on 14/03/2016.
|
||||||
*/
|
*/
|
||||||
public class BlockLowVoltageSU extends BlockEnergyStorage {
|
public class BlockLowVoltageSU extends BlockEnergyStorage {
|
||||||
|
|
||||||
public BlockLowVoltageSU() {
|
public BlockLowVoltageSU() {
|
||||||
super("low_voltage_su", EGui.LOW_VOLTAGE_SU.ordinal());
|
super("low_voltage_su", EGui.LOW_VOLTAGE_SU.ordinal());
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,7 @@ import java.util.List;
|
||||||
* Created by modmuss50 on 14/03/2016.
|
* Created by modmuss50 on 14/03/2016.
|
||||||
*/
|
*/
|
||||||
public class BlockMediumVoltageSU extends BlockEnergyStorage {
|
public class BlockMediumVoltageSU extends BlockEnergyStorage {
|
||||||
|
|
||||||
public BlockMediumVoltageSU() {
|
public BlockMediumVoltageSU() {
|
||||||
super("medium_voltage_su", EGui.MEDIUM_VOLTAGE_SU.ordinal());
|
super("medium_voltage_su", EGui.MEDIUM_VOLTAGE_SU.ordinal());
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public class BlockIronAlloyFurnace extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockIronAlloyFurnace() {
|
public BlockIronAlloyFurnace() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier0_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier0_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ public class BlockIronFurnace extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockIronFurnace() {
|
public BlockIronFurnace() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier0_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier0_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockAlloySmelter extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockAlloySmelter() {
|
public BlockAlloySmelter() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockCompressor extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockCompressor() {
|
public BlockCompressor() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockElectricFurnace extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockElectricFurnace() {
|
public BlockElectricFurnace() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockExtractor extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockExtractor() {
|
public BlockExtractor() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockGrinder extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockGrinder() {
|
public BlockGrinder() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,64 +74,18 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
||||||
public BlockPlayerDetector() {
|
public BlockPlayerDetector() {
|
||||||
super(true);
|
super(true);
|
||||||
setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
setHardness(2f);
|
|
||||||
this.setDefaultState(this.getDefaultState().withProperty(TYPE, "all"));
|
this.setDefaultState(this.getDefaultState().withProperty(TYPE, "all"));
|
||||||
for (int i = 0; i < types.length; i++) {
|
for (int i = 0; i < types.length; i++) {
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, i, "machines/tier1_machines").setInvVariant("type=" + types[i]));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, i, "machines/tier1_machines").setInvVariant("type=" + types[i]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
// BlockMachineBase
|
||||||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
|
|
||||||
return new ItemStack(ModBlocks.PLAYER_DETECTOR, 1, typeNamesList.indexOf(state.getValue(TYPE)));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
|
||||||
return Item.getItemFromBlock(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void getSubBlocks(CreativeTabs creativeTabs, NonNullList<ItemStack> list) {
|
|
||||||
for (int meta = 0; meta < types.length; meta++) {
|
|
||||||
list.add(new ItemStack(this, 1, meta));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(final World world, final int meta) {
|
public TileEntity createNewTileEntity(final World world, final int meta) {
|
||||||
return new TilePlayerDectector();
|
return new TilePlayerDectector();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canProvidePower(IBlockState state) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getWeakPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
|
|
||||||
TileEntity entity = blockAccess.getTileEntity(pos);
|
|
||||||
if (entity instanceof TilePlayerDectector) {
|
|
||||||
return ((TilePlayerDectector) entity).isProvidingPower() ? 15 : 0;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
|
|
||||||
TileEntity entity = blockAccess.getTileEntity(pos);
|
|
||||||
if (entity instanceof TilePlayerDectector) {
|
|
||||||
return ((TilePlayerDectector) entity).isProvidingPower() ? 15 : 0;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer,
|
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer,
|
||||||
ItemStack stack) {
|
ItemStack stack) {
|
||||||
|
@ -141,7 +95,7 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
||||||
((TilePlayerDectector) tile).owenerUdid = placer.getUniqueID().toString();
|
((TilePlayerDectector) tile).owenerUdid = placer.getUniqueID().toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn,
|
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn,
|
||||||
EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
EnumHand hand, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||||
|
@ -194,7 +148,7 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected BlockStateContainer createBlockState() {
|
protected BlockStateContainer createBlockState() {
|
||||||
TYPE = new PropertyString("type", types);
|
TYPE = new PropertyString("type", types);
|
||||||
|
@ -218,4 +172,51 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Block
|
||||||
|
@Override
|
||||||
|
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
|
||||||
|
return new ItemStack(ModBlocks.PLAYER_DETECTOR, 1, typeNamesList.indexOf(state.getValue(TYPE)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Item getItemDropped(IBlockState state, Random rand, int fortune) {
|
||||||
|
return Item.getItemFromBlock(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void getSubBlocks(CreativeTabs creativeTabs, NonNullList<ItemStack> list) {
|
||||||
|
for (int meta = 0; meta < types.length; meta++) {
|
||||||
|
list.add(new ItemStack(this, 1, meta));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canProvidePower(IBlockState state) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getWeakPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
|
||||||
|
TileEntity entity = blockAccess.getTileEntity(pos);
|
||||||
|
if (entity instanceof TilePlayerDectector) {
|
||||||
|
return ((TilePlayerDectector) entity).isProvidingPower() ? 15 : 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getStrongPower(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
|
||||||
|
TileEntity entity = blockAccess.getTileEntity(pos);
|
||||||
|
if (entity instanceof TilePlayerDectector) {
|
||||||
|
return ((TilePlayerDectector) entity).isProvidingPower() ? 15 : 0;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockRecycler extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockRecycler() {
|
public BlockRecycler() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,6 +51,5 @@ public class BlockRecycler extends BlockMachineBase {
|
||||||
@Override
|
@Override
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.RECYCLER;
|
return EGui.RECYCLER;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockRollingMachine extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockRollingMachine() {
|
public BlockRollingMachine() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockScrapboxinator extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockScrapboxinator() {
|
public BlockScrapboxinator() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier1_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,5 +52,4 @@ public class BlockScrapboxinator extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.SCRAPBOXINATOR;
|
return EGui.SCRAPBOXINATOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockChargeOMat extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockChargeOMat() {
|
public BlockChargeOMat() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +52,9 @@ public class BlockChargeOMat extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.CHARGEBENCH;
|
return EGui.CHARGEBENCH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockChemicalReactor extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockChemicalReactor() {
|
public BlockChemicalReactor() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +52,9 @@ public class BlockChemicalReactor extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.CHEMICAL_REACTOR;
|
return EGui.CHEMICAL_REACTOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class BlockDigitalChest extends BlockMachineBase {
|
||||||
public BlockDigitalChest() {
|
public BlockDigitalChest() {
|
||||||
super();
|
super();
|
||||||
this.setUnlocalizedName("techreborn.digitalChest");
|
this.setUnlocalizedName("techreborn.digitalChest");
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,4 +80,9 @@ public class BlockDigitalChest extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.DIGITAL_CHEST;
|
return EGui.DIGITAL_CHEST;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockImplosionCompressor extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockImplosionCompressor() {
|
public BlockImplosionCompressor() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +52,9 @@ public class BlockImplosionCompressor extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.IMPLOSION_COMPRESSOR;
|
return EGui.IMPLOSION_COMPRESSOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockIndustrialBlastFurnace extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockIndustrialBlastFurnace() {
|
public BlockIndustrialBlastFurnace() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockIndustrialCentrifuge extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockIndustrialCentrifuge() {
|
public BlockIndustrialCentrifuge() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +52,9 @@ public class BlockIndustrialCentrifuge extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.CENTRIFUGE;
|
return EGui.CENTRIFUGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockIndustrialElectrolyzer() {
|
public BlockIndustrialElectrolyzer() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +52,9 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.INDUSTRIAL_ELECTROLYZER;
|
return EGui.INDUSTRIAL_ELECTROLYZER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockIndustrialGrinder extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockIndustrialGrinder() {
|
public BlockIndustrialGrinder() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +52,9 @@ public class BlockIndustrialGrinder extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.INDUSTRIAL_GRINDER;
|
return EGui.INDUSTRIAL_GRINDER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockIndustrialSawmill extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockIndustrialSawmill() {
|
public BlockIndustrialSawmill() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier2_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +52,9 @@ public class BlockIndustrialSawmill extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.SAWMILL;
|
return EGui.SAWMILL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,4 +52,9 @@ public class BlockVacuumFreezer extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.VACUUM_FREEZER;
|
return EGui.VACUUM_FREEZER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockChunkLoader extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockChunkLoader() {
|
public BlockChunkLoader() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier3_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier3_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,4 +52,9 @@ public class BlockChunkLoader extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.CHUNK_LOADER;
|
return EGui.CHUNK_LOADER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class BlockMatterFabricator extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockMatterFabricator() {
|
public BlockMatterFabricator() {
|
||||||
super();
|
super();
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier3_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier3_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,8 +50,7 @@ public class BlockQuantumChest extends BlockMachineBase {
|
||||||
public BlockQuantumChest() {
|
public BlockQuantumChest() {
|
||||||
super();
|
super();
|
||||||
this.setUnlocalizedName("techreborn.quantumChest");
|
this.setUnlocalizedName("techreborn.quantumChest");
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
this.setHardness(2.0F);
|
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier3_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier3_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,7 @@ public class BlockQuantumTank extends BlockMachineBase {
|
||||||
|
|
||||||
public BlockQuantumTank() {
|
public BlockQuantumTank() {
|
||||||
super();
|
super();
|
||||||
this.setHardness(2.0F);
|
setCreativeTab(TechRebornCreativeTab.instance);
|
||||||
this.setCreativeTab(TechRebornCreativeTab.instance);
|
|
||||||
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier3_machines"));
|
ShootingStar.registerModel(new ModelCompound(ModInfo.MOD_ID, this, "machines/tier3_machines"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,4 +52,9 @@ public class BlockQuantumTank extends BlockMachineBase {
|
||||||
public IMachineGuiHandler getGui() {
|
public IMachineGuiHandler getGui() {
|
||||||
return EGui.QUANTUM_TANK;
|
return EGui.QUANTUM_TANK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAdvanced() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue