Reformatted all the code using the default intelji formatting options.
This commit is contained in:
parent
2f63a24070
commit
e0ab0af822
363 changed files with 20524 additions and 23016 deletions
|
@ -12,58 +12,53 @@ import techreborn.Core;
|
|||
import techreborn.client.GuiHandler;
|
||||
import techreborn.tiles.TileChunkLoader;
|
||||
|
||||
public class BlockChunkLoader extends BlockMachineBase{
|
||||
public class BlockChunkLoader extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockChunkLoader(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.chunkloader");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileChunkLoader();
|
||||
}
|
||||
|
||||
@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.chunkloaderID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/industrial_chunk_loader_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_chunk_loader_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
public BlockChunkLoader(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.chunkloader");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileChunkLoader();
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@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.chunkloaderID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/industrial_chunk_loader_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_chunk_loader_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,40 +8,37 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
public class BlockComputerCube extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockComputerCube(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.computercube");
|
||||
}
|
||||
public BlockComputerCube(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.computercube");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/computer_cube");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -14,55 +14,50 @@ import techreborn.tiles.TileDigitalChest;
|
|||
|
||||
public class BlockDigitalChest extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockDigitalChest()
|
||||
{
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.digitalChest");
|
||||
}
|
||||
public BlockDigitalChest() {
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.digitalChest");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return new TileDigitalChest();
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileDigitalChest();
|
||||
}
|
||||
|
||||
@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.digitalChestID, world, x,
|
||||
y, z);
|
||||
return true;
|
||||
}
|
||||
@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.digitalChestID, world, x,
|
||||
y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/qchest_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/quantum_chest");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/quantum_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/qchest_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/quantum_chest");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/quantum_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,40 +8,37 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
public class BlockElectricCraftingTable extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockElectricCraftingTable(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.electriccraftingtable");
|
||||
}
|
||||
public BlockElectricCraftingTable(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.electriccraftingtable");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/electric_crafting_table_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/electric_crafting_table_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/electric_crafting_table_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/electric_crafting_table_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ public class BlockFarm extends BlockMachineBase {
|
|||
|
||||
@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()){
|
||||
if (!player.isSneaking()) {
|
||||
player.openGui(Core.INSTANCE, GuiHandler.farmID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
@ -32,5 +32,4 @@ public class BlockFarm extends BlockMachineBase {
|
|||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -8,40 +8,37 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
public class BlockFusionCoil extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockFusionCoil(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.fusioncoil");
|
||||
}
|
||||
public BlockFusionCoil(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.fusioncoil");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/fusion_coil");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/fusion_coil");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/fusion_coil");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/fusion_coil");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/fusion_coil");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/fusion_coil");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/fusion_coil");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/fusion_coil");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,40 +8,37 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
public class BlockFusionControlComputer extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockFusionControlComputer(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.fusioncontrolcomputer");
|
||||
}
|
||||
public BlockFusionControlComputer(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.fusioncontrolcomputer");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/fusion_control_computer_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/fusion_control_computer_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -6,42 +6,39 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
public class BlockHighlyAdvancedMachine extends BlockMachineBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
public class BlockHighlyAdvancedMachine extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockHighlyAdvancedMachine(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.highlyAdvancedMachine");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
public BlockHighlyAdvancedMachine(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.highlyAdvancedMachine");
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/highlyadvancedmachine");
|
||||
}
|
||||
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.BlockDynamicLiquid;
|
||||
import net.minecraft.block.BlockLiquid;
|
||||
import net.minecraft.block.BlockStaticLiquid;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
|
@ -22,121 +18,101 @@ import java.util.Random;
|
|||
|
||||
public class BlockMachineBase extends BlockContainer {
|
||||
|
||||
public BlockMachineBase(Material material)
|
||||
{
|
||||
super(Material.rock);
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2f);
|
||||
setStepSound(soundTypeMetal);
|
||||
}
|
||||
public BlockMachineBase(Material material) {
|
||||
super(Material.rock);
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2f);
|
||||
setStepSound(soundTypeMetal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void onBlockAdded(World world, int x, int y, int z)
|
||||
{
|
||||
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
this.setDefaultDirection(world, x, y, z);
|
||||
|
||||
}
|
||||
|
||||
private void setDefaultDirection(World world, int x, int y, int z)
|
||||
{
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
Block block1 = world.getBlock(x, y, z - 1);
|
||||
Block block2 = world.getBlock(x, y, z + 1);
|
||||
Block block3 = world.getBlock(x - 1, y, z);
|
||||
Block block4 = world.getBlock(x + 1, y, z);
|
||||
|
||||
byte b = 3;
|
||||
|
||||
if (block1.func_149730_j() && !block2.func_149730_j())
|
||||
{
|
||||
b = 3;
|
||||
}
|
||||
if (block2.func_149730_j() && !block1.func_149730_j())
|
||||
{
|
||||
b = 2;
|
||||
}
|
||||
if (block3.func_149730_j() && !block4.func_149730_j())
|
||||
{
|
||||
b = 5;
|
||||
}
|
||||
if (block4.func_149730_j() && !block3.func_149730_j())
|
||||
{
|
||||
b = 4;
|
||||
}
|
||||
|
||||
world.setBlockMetadataWithNotify(x, y, z, b, 2);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z,
|
||||
EntityLivingBase player, ItemStack itemstack)
|
||||
{
|
||||
|
||||
int l = MathHelper
|
||||
.floor_double((double) (player.rotationYaw * 4.0F / 360F) + 0.5D) & 3;
|
||||
|
||||
if (l == 0)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
if (l == 1)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if (l == 2)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if (l == 3)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
||||
}
|
||||
|
||||
public boolean canCreatureSpawn(EnumCreatureType type, World world, int x,
|
||||
int y, int z)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta)
|
||||
{
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
this.setDefaultDirection(world, x, y, z);
|
||||
|
||||
}
|
||||
|
||||
private void setDefaultDirection(World world, int x, int y, int z) {
|
||||
|
||||
if (!world.isRemote) {
|
||||
Block block1 = world.getBlock(x, y, z - 1);
|
||||
Block block2 = world.getBlock(x, y, z + 1);
|
||||
Block block3 = world.getBlock(x - 1, y, z);
|
||||
Block block4 = world.getBlock(x + 1, y, z);
|
||||
|
||||
byte b = 3;
|
||||
|
||||
if (block1.func_149730_j() && !block2.func_149730_j()) {
|
||||
b = 3;
|
||||
}
|
||||
if (block2.func_149730_j() && !block1.func_149730_j()) {
|
||||
b = 2;
|
||||
}
|
||||
if (block3.func_149730_j() && !block4.func_149730_j()) {
|
||||
b = 5;
|
||||
}
|
||||
if (block4.func_149730_j() && !block3.func_149730_j()) {
|
||||
b = 4;
|
||||
}
|
||||
|
||||
world.setBlockMetadataWithNotify(x, y, z, b, 2);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z,
|
||||
EntityLivingBase player, ItemStack itemstack) {
|
||||
|
||||
int l = MathHelper
|
||||
.floor_double((double) (player.rotationYaw * 4.0F / 360F) + 0.5D) & 3;
|
||||
|
||||
if (l == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
if (l == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if (l == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if (l == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
||||
}
|
||||
|
||||
public boolean canCreatureSpawn(EnumCreatureType type, World world, int x,
|
||||
int y, int z) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
dropInventory(world, x, y, z);
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
protected void dropInventory(World world, int x, int y, int z)
|
||||
{
|
||||
|
||||
protected void dropInventory(World world, int x, int y, int z) {
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
if (!(tileEntity instanceof IInventory))
|
||||
{
|
||||
if (!(tileEntity instanceof IInventory)) {
|
||||
return;
|
||||
}
|
||||
|
||||
IInventory inventory = (IInventory) tileEntity;
|
||||
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++)
|
||||
{
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack itemStack = inventory.getStackInSlot(i);
|
||||
|
||||
if (itemStack != null && itemStack.stackSize > 0)
|
||||
{
|
||||
if(itemStack.getItem() instanceof ItemBlock){
|
||||
if(((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockLiquid || ((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockStaticLiquid || ((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockDynamicLiquid){
|
||||
if (itemStack != null && itemStack.stackSize > 0) {
|
||||
if (itemStack.getItem() instanceof ItemBlock) {
|
||||
if (((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockLiquid || ((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockStaticLiquid || ((ItemBlock) itemStack.getItem()).field_150939_a instanceof BlockDynamicLiquid) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -148,8 +124,7 @@ public class BlockMachineBase extends BlockContainer {
|
|||
|
||||
EntityItem entityItem = new EntityItem(world, x + dX, y + dY, z + dZ, itemStack.copy());
|
||||
|
||||
if (itemStack.hasTagCompound())
|
||||
{
|
||||
if (itemStack.hasTagCompound()) {
|
||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound) itemStack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
|
|
|
@ -21,77 +21,66 @@ import java.util.Random;
|
|||
|
||||
public class BlockMachineCasing extends BlockMultiblockBase {
|
||||
|
||||
public static final String[] types = new String[]
|
||||
{ "standard", "reinforced", "advanced" };
|
||||
private IIcon[] textures;
|
||||
public static final String[] types = new String[]
|
||||
{"standard", "reinforced", "advanced"};
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockMachineCasing(Material material)
|
||||
{
|
||||
super(material);
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setBlockName("techreborn.machineCasing");
|
||||
setHardness(2F);
|
||||
}
|
||||
public BlockMachineCasing(Material material) {
|
||||
super(material);
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setBlockName("techreborn.machineCasing");
|
||||
setHardness(2F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int meta = 0; meta < types.length; meta++)
|
||||
{
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||
for (int meta = 0; meta < types.length; meta++) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
return metaData;
|
||||
}
|
||||
@Override
|
||||
public int damageDropped(int metaData) {
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.textures = new IIcon[types.length];
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; i++)
|
||||
{
|
||||
textures[i] = iconRegister.registerIcon("techreborn:"
|
||||
+ "machine/casing" + types[i]);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:"
|
||||
+ "machine/casing" + types[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData)
|
||||
{
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
||||
{
|
||||
return textures[metaData];
|
||||
} else
|
||||
{
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return new TileMachineCasing();
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileMachineCasing();
|
||||
}
|
||||
|
||||
public static int getHeatFromMeta(int meta){
|
||||
switch (meta){
|
||||
public static int getHeatFromMeta(int meta) {
|
||||
switch (meta) {
|
||||
case 0:
|
||||
return 1020;
|
||||
case 1:
|
||||
|
|
|
@ -19,53 +19,46 @@ import java.util.List;
|
|||
|
||||
public class BlockMachineFrame extends Block {
|
||||
|
||||
public static ItemStack getFrameByName(String name, int count)
|
||||
{
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equalsIgnoreCase(name)) {
|
||||
return new ItemStack(ModBlocks.machineframe, count, i);
|
||||
}
|
||||
}
|
||||
throw new InvalidParameterException("The part " + name + " could not be found.");
|
||||
}
|
||||
public static ItemStack getFrameByName(String name, int count) {
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equalsIgnoreCase(name)) {
|
||||
return new ItemStack(ModBlocks.machineframe, count, i);
|
||||
}
|
||||
}
|
||||
throw new InvalidParameterException("The part " + name + " could not be found.");
|
||||
}
|
||||
|
||||
public static final String[] types = new String[]
|
||||
{ "aluminum", "iron", "bronze", "brass", "steel", "titanium" };
|
||||
{"aluminum", "iron", "bronze", "brass", "steel", "titanium"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockMachineFrame(Material material)
|
||||
{
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockMachineFrame(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.machineFrame");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(1f);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int meta = 0; meta < types.length; meta++)
|
||||
{
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||
for (int meta = 0; meta < types.length; meta++) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
public int damageDropped(int metaData) {
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; i++)
|
||||
{
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "machine/"
|
||||
+ types[i] + "_machine_block");
|
||||
}
|
||||
|
@ -73,16 +66,13 @@ public class BlockMachineFrame extends Block {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData)
|
||||
{
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
||||
{
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||
return textures[metaData];
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,48 +8,45 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
public class BlockMetalShelf extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontEmpty;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontBooks;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontCans;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontPaper;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontEmpty;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontBooks;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontCans;
|
||||
|
||||
public BlockMetalShelf(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.metalshelf");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontPaper;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFrontEmpty = icon.registerIcon("techreborn:machine/metal_shelf_empty");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFrontEmpty
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFrontEmpty : this.blockIcon));
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
}
|
||||
public BlockMetalShelf(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.metalshelf");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFrontEmpty = icon.registerIcon("techreborn:machine/metal_shelf_empty");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFrontEmpty
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFrontEmpty : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -27,165 +27,140 @@ import java.util.List;
|
|||
|
||||
public class BlockOre extends Block {
|
||||
|
||||
public static ItemStack getOreByName(String name, int count)
|
||||
{
|
||||
int index = -1;
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equals(name)) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return new ItemStack(ModBlocks.ore, count, index);
|
||||
}
|
||||
|
||||
public static ItemStack getOreByName(String name)
|
||||
{
|
||||
return getOreByName(name, 1);
|
||||
}
|
||||
public static ItemStack getOreByName(String name, int count) {
|
||||
int index = -1;
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equals(name)) {
|
||||
index = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return new ItemStack(ModBlocks.ore, count, index);
|
||||
}
|
||||
|
||||
public static final String[] types = new String[]
|
||||
{ "Galena", "Iridium", "Ruby", "Sapphire", "Bauxite", "Pyrite", "Cinnabar",
|
||||
"Sphalerite", "Tungston", "Sheldonite", "Peridot", "Sodalite",
|
||||
"Tetrahedrite", "Cassiterite", "Lead", "Silver" };
|
||||
public static ItemStack getOreByName(String name) {
|
||||
return getOreByName(name, 1);
|
||||
}
|
||||
|
||||
private IIcon[] textures;
|
||||
public static final String[] types = new String[]
|
||||
{"Galena", "Iridium", "Ruby", "Sapphire", "Bauxite", "Pyrite", "Cinnabar",
|
||||
"Sphalerite", "Tungston", "Sheldonite", "Peridot", "Sodalite",
|
||||
"Tetrahedrite", "Cassiterite", "Lead", "Silver"};
|
||||
|
||||
public BlockOre(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.ore");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2.0f);
|
||||
}
|
||||
private IIcon[] textures;
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune)
|
||||
{
|
||||
//Ruby
|
||||
if (metadata == 2)
|
||||
{
|
||||
OreDrop ruby = new OreDrop(ItemGems.getGemByName("ruby"));
|
||||
OreDrop redGarnet = new OreDrop(ItemGems.getGemByName("redGarnet"), 0.02);
|
||||
OreDropSet set = new OreDropSet(ruby, redGarnet);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
public BlockOre(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.ore");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2.0f);
|
||||
}
|
||||
|
||||
//Sapphire
|
||||
if (metadata == 3)
|
||||
{
|
||||
OreDrop sapphire = new OreDrop(ItemGems.getGemByName("sapphire"));
|
||||
OreDrop peridot = new OreDrop(ItemGems.getGemByName("peridot"), 0.03);
|
||||
OreDropSet set = new OreDropSet(sapphire, peridot);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
|
||||
//Pyrite
|
||||
if (metadata == 5)
|
||||
{
|
||||
OreDrop pyriteDust = new OreDrop(ItemDusts.getDustByName("pyrite"));
|
||||
OreDropSet set = new OreDropSet(pyriteDust);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
|
||||
//Sodolite
|
||||
if (metadata == 11)
|
||||
{
|
||||
OreDrop sodalite = new OreDrop(ItemDusts.getDustByName("sodalite", 6));
|
||||
OreDrop aluminum = new OreDrop(ItemDusts.getDustByName("aluminum"), 0.50);
|
||||
OreDropSet set = new OreDropSet(sodalite, aluminum);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
|
||||
//Cinnabar
|
||||
if (metadata == 6)
|
||||
{
|
||||
OreDrop cinnabar = new OreDrop(ItemDusts.getDustByName("cinnabar"));
|
||||
OreDrop redstone = new OreDrop(new ItemStack(Items.redstone), 0.25);
|
||||
OreDropSet set = new OreDropSet(cinnabar, redstone);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
|
||||
//Sphalerite 1, 1/8 yellow garnet
|
||||
if (metadata == 7)
|
||||
{
|
||||
OreDrop sphalerite = new OreDrop(ItemDusts.getDustByName("sphalerite"));
|
||||
OreDrop yellowGarnet = new OreDrop(ItemGems.getGemByName("yellowGarnet"), 0.125);
|
||||
OreDropSet set = new OreDropSet(sphalerite, yellowGarnet);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
|
||||
ArrayList<ItemStack> block = new ArrayList<ItemStack>();
|
||||
block.add(new ItemStack(Item.getItemFromBlock(this), 1, metadata));
|
||||
return block;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canSilkHarvest()
|
||||
{
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
//Ruby
|
||||
if (metadata == 2) {
|
||||
OreDrop ruby = new OreDrop(ItemGems.getGemByName("ruby"));
|
||||
OreDrop redGarnet = new OreDrop(ItemGems.getGemByName("redGarnet"), 0.02);
|
||||
OreDropSet set = new OreDropSet(ruby, redGarnet);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
|
||||
//Sapphire
|
||||
if (metadata == 3) {
|
||||
OreDrop sapphire = new OreDrop(ItemGems.getGemByName("sapphire"));
|
||||
OreDrop peridot = new OreDrop(ItemGems.getGemByName("peridot"), 0.03);
|
||||
OreDropSet set = new OreDropSet(sapphire, peridot);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
|
||||
//Pyrite
|
||||
if (metadata == 5) {
|
||||
OreDrop pyriteDust = new OreDrop(ItemDusts.getDustByName("pyrite"));
|
||||
OreDropSet set = new OreDropSet(pyriteDust);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
|
||||
//Sodolite
|
||||
if (metadata == 11) {
|
||||
OreDrop sodalite = new OreDrop(ItemDusts.getDustByName("sodalite", 6));
|
||||
OreDrop aluminum = new OreDrop(ItemDusts.getDustByName("aluminum"), 0.50);
|
||||
OreDropSet set = new OreDropSet(sodalite, aluminum);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
|
||||
//Cinnabar
|
||||
if (metadata == 6) {
|
||||
OreDrop cinnabar = new OreDrop(ItemDusts.getDustByName("cinnabar"));
|
||||
OreDrop redstone = new OreDrop(new ItemStack(Items.redstone), 0.25);
|
||||
OreDropSet set = new OreDropSet(cinnabar, redstone);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
|
||||
//Sphalerite 1, 1/8 yellow garnet
|
||||
if (metadata == 7) {
|
||||
OreDrop sphalerite = new OreDrop(ItemDusts.getDustByName("sphalerite"));
|
||||
OreDrop yellowGarnet = new OreDrop(ItemGems.getGemByName("yellowGarnet"), 0.125);
|
||||
OreDropSet set = new OreDropSet(sphalerite, yellowGarnet);
|
||||
return set.drop(fortune, world.rand);
|
||||
}
|
||||
|
||||
ArrayList<ItemStack> block = new ArrayList<ItemStack>();
|
||||
block.add(new ItemStack(Item.getItemFromBlock(this), 1, metadata));
|
||||
return block;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canSilkHarvest() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int meta = 0; meta < types.length; meta++)
|
||||
{
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||
for (int meta = 0; meta < types.length; meta++) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
if(metaData == 2 )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if(metaData == 3)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if(metaData == 5)
|
||||
{
|
||||
return 60;
|
||||
}
|
||||
return metaData;
|
||||
}
|
||||
@Override
|
||||
public int damageDropped(int metaData) {
|
||||
if (metaData == 2) {
|
||||
return 0;
|
||||
} else if (metaData == 3) {
|
||||
return 1;
|
||||
} else if (metaData == 5) {
|
||||
return 60;
|
||||
}
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.textures = new IIcon[types.length];
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; i++)
|
||||
{
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "ore/ore"
|
||||
+ types[i]);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "ore/ore"
|
||||
+ types[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData)
|
||||
{
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
||||
{
|
||||
return textures[metaData];
|
||||
}
|
||||
else
|
||||
{
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
return new ItemStack(ModBlocks.ore,1 , world.getBlockMetadata(x, y, z));
|
||||
return new ItemStack(ModBlocks.ore, 1, world.getBlockMetadata(x, y, z));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,125 +20,109 @@ import techreborn.tiles.TileQuantumChest;
|
|||
|
||||
public class BlockQuantumChest extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockQuantumChest()
|
||||
{
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.quantumChest");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2.0F);
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return new TileQuantumChest();
|
||||
}
|
||||
public BlockQuantumChest() {
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.quantumChest");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2.0F);
|
||||
}
|
||||
|
||||
@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.quantumChestID, world, x,
|
||||
y, z);
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileQuantumChest();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/qchest_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/quantum_chest");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/quantum_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
@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.quantumChestID, world, x,
|
||||
y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/qchest_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/quantum_chest");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/quantum_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
}
|
||||
|
||||
public void onBlockAdded(World world, int x, int y, int z)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
this.setDefaultDirection(world, x, y, z);
|
||||
}
|
||||
|
||||
}
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
|
||||
private void setDefaultDirection(World world, int x, int y, int z)
|
||||
{
|
||||
super.onBlockAdded(world, x, y, z);
|
||||
this.setDefaultDirection(world, x, y, z);
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
Block block1 = world.getBlock(x, y, z - 1);
|
||||
Block block2 = world.getBlock(x, y, z + 1);
|
||||
Block block3 = world.getBlock(x - 1, y, z);
|
||||
Block block4 = world.getBlock(x + 1, y, z);
|
||||
}
|
||||
|
||||
byte b = 3;
|
||||
private void setDefaultDirection(World world, int x, int y, int z) {
|
||||
|
||||
if (block1.func_149730_j() && !block2.func_149730_j())
|
||||
{
|
||||
b = 3;
|
||||
}
|
||||
if (block2.func_149730_j() && !block1.func_149730_j())
|
||||
{
|
||||
b = 2;
|
||||
}
|
||||
if (block3.func_149730_j() && !block4.func_149730_j())
|
||||
{
|
||||
b = 5;
|
||||
}
|
||||
if (block4.func_149730_j() && !block3.func_149730_j())
|
||||
{
|
||||
b = 4;
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
Block block1 = world.getBlock(x, y, z - 1);
|
||||
Block block2 = world.getBlock(x, y, z + 1);
|
||||
Block block3 = world.getBlock(x - 1, y, z);
|
||||
Block block4 = world.getBlock(x + 1, y, z);
|
||||
|
||||
world.setBlockMetadataWithNotify(x, y, z, b, 2);
|
||||
byte b = 3;
|
||||
|
||||
}
|
||||
if (block1.func_149730_j() && !block2.func_149730_j()) {
|
||||
b = 3;
|
||||
}
|
||||
if (block2.func_149730_j() && !block1.func_149730_j()) {
|
||||
b = 2;
|
||||
}
|
||||
if (block3.func_149730_j() && !block4.func_149730_j()) {
|
||||
b = 5;
|
||||
}
|
||||
if (block4.func_149730_j() && !block3.func_149730_j()) {
|
||||
b = 4;
|
||||
}
|
||||
|
||||
}
|
||||
world.setBlockMetadataWithNotify(x, y, z, b, 2);
|
||||
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z,
|
||||
EntityLivingBase player, ItemStack itemstack)
|
||||
{
|
||||
}
|
||||
|
||||
int l = MathHelper
|
||||
.floor_double((double) (player.rotationYaw * 4.0F / 360F) + 0.5D) & 3;
|
||||
}
|
||||
|
||||
if (l == 0)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
if (l == 1)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if (l == 2)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if (l == 3)
|
||||
{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z,
|
||||
EntityLivingBase player, ItemStack itemstack) {
|
||||
|
||||
int l = MathHelper
|
||||
.floor_double((double) (player.rotationYaw * 4.0F / 360F) + 0.5D) & 3;
|
||||
|
||||
if (l == 0) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||
}
|
||||
if (l == 1) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||
}
|
||||
if (l == 2) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||
}
|
||||
if (l == 3) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||
}
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,50 +14,43 @@ import techreborn.tiles.TileQuantumTank;
|
|||
|
||||
public class BlockQuantumTank extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon top;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon other;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon top;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon other;
|
||||
|
||||
public BlockQuantumTank()
|
||||
{
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.quantumTank");
|
||||
setHardness(2.0F);
|
||||
}
|
||||
public BlockQuantumTank() {
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.quantumTank");
|
||||
setHardness(2.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return new TileQuantumTank();
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileQuantumTank();
|
||||
}
|
||||
|
||||
@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.quantumTankID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
@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.quantumTankID, world, x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
top = icon.registerIcon("techreborn:machine/quantum_top");
|
||||
other = icon.registerIcon("techreborn:machine/ThermalGenerator_other");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
top = icon.registerIcon("techreborn:machine/quantum_top");
|
||||
other = icon.registerIcon("techreborn:machine/ThermalGenerator_other");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int currentSide, int meta)
|
||||
{
|
||||
if (currentSide == 1)
|
||||
{
|
||||
return top;
|
||||
} else
|
||||
{
|
||||
return other;
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int currentSide, int meta) {
|
||||
if (currentSide == 1) {
|
||||
return top;
|
||||
} else {
|
||||
return other;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,85 +19,73 @@ import java.util.Random;
|
|||
|
||||
public class BlockStorage extends Block {
|
||||
|
||||
public static ItemStack getStorageBlockByName(String name, int count)
|
||||
{
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equals(name)) {
|
||||
return new ItemStack(ModBlocks.storage, count, i);
|
||||
}
|
||||
}
|
||||
return BlockStorage2.getStorageBlockByName(name, count);
|
||||
}
|
||||
public static ItemStack getStorageBlockByName(String name, int count) {
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equals(name)) {
|
||||
return new ItemStack(ModBlocks.storage, count, i);
|
||||
}
|
||||
}
|
||||
return BlockStorage2.getStorageBlockByName(name, count);
|
||||
}
|
||||
|
||||
public static ItemStack getStorageBlockByName(String name)
|
||||
{
|
||||
return getStorageBlockByName(name, 1);
|
||||
}
|
||||
public static ItemStack getStorageBlockByName(String name) {
|
||||
return getStorageBlockByName(name, 1);
|
||||
}
|
||||
|
||||
public static final String[] types = new String[]
|
||||
{ "silver", "aluminum", "titanium", "chrome", "steel", "brass", "lead",
|
||||
"electrum", "zinc", "platinum", "tungsten", "nickel", "invar", "osmium",
|
||||
"iridium" };
|
||||
public static final String[] types = new String[]
|
||||
{"silver", "aluminum", "titanium", "chrome", "steel", "brass", "lead",
|
||||
"electrum", "zinc", "platinum", "tungsten", "nickel", "invar", "osmium",
|
||||
"iridium"};
|
||||
|
||||
private IIcon[] textures;
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockStorage(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.storage");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2f);
|
||||
}
|
||||
public BlockStorage(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.storage");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int par1, Random random, int par2)
|
||||
{
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
@Override
|
||||
public Item getItemDropped(int par1, Random random, int par2) {
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int meta = 0; meta < types.length; meta++)
|
||||
{
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||
for (int meta = 0; meta < types.length; meta++) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
return metaData;
|
||||
}
|
||||
@Override
|
||||
public int damageDropped(int metaData) {
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
this.textures = new IIcon[types.length];
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; i++)
|
||||
{
|
||||
textures[i] = iconRegister.registerIcon("techreborn:"
|
||||
+ "storage/" + types[i] + "_block");
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:"
|
||||
+ "storage/" + types[i] + "_block");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData)
|
||||
{
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
||||
{
|
||||
return textures[metaData];
|
||||
} else
|
||||
{
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,24 +20,22 @@ import java.util.Random;
|
|||
|
||||
public class BlockStorage2 extends Block {
|
||||
|
||||
public static ItemStack getStorageBlockByName(String name, int count)
|
||||
{
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equals(name)) {
|
||||
return new ItemStack(ModBlocks.storage2, count, i);
|
||||
}
|
||||
}
|
||||
throw new InvalidParameterException("The storage block " + name + " could not be found.");
|
||||
}
|
||||
public static ItemStack getStorageBlockByName(String name, int count) {
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equals(name)) {
|
||||
return new ItemStack(ModBlocks.storage2, count, i);
|
||||
}
|
||||
}
|
||||
throw new InvalidParameterException("The storage block " + name + " could not be found.");
|
||||
}
|
||||
|
||||
public static final String[] types = new String[]
|
||||
{ "tungstensteel", "lodestone", "tellurium", "iridium_reinforced_tungstensteel",
|
||||
"iridium_reinforced_stone", "ruby", "sapphire", "peridot", "yellow_garnet", "red_garnet" };
|
||||
{"tungstensteel", "lodestone", "tellurium", "iridium_reinforced_tungstensteel",
|
||||
"iridium_reinforced_stone", "ruby", "sapphire", "peridot", "yellow_garnet", "red_garnet"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockStorage2(Material material)
|
||||
{
|
||||
public BlockStorage2(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.storage2");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
|
@ -45,35 +43,29 @@ public class BlockStorage2 extends Block {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int par1, Random random, int par2)
|
||||
{
|
||||
public Item getItemDropped(int par1, Random random, int par2) {
|
||||
return Item.getItemFromBlock(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int meta = 0; meta < types.length; meta++)
|
||||
{
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
|
||||
for (int meta = 0; meta < types.length; meta++) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int metaData)
|
||||
{
|
||||
public int damageDropped(int metaData) {
|
||||
return metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister)
|
||||
{
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; i++)
|
||||
{
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:"
|
||||
+ "storage/" + types[i] + "_block");
|
||||
}
|
||||
|
@ -82,16 +74,13 @@ public class BlockStorage2 extends Block {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData)
|
||||
{
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN)
|
||||
{
|
||||
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
|
||||
return textures[metaData];
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,40 +8,37 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
public class BlockSupercondensator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockSupercondensator(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.supercondensator");
|
||||
}
|
||||
public BlockSupercondensator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.supercondensator");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/supercondensator_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/supercondensator_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/supercondensator_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/supercondensator_side");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/supercondensator_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/supercondensator_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/supercondensator_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/supercondensator_side");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,40 +8,37 @@ import net.minecraft.util.IIcon;
|
|||
|
||||
public class BlockWoodenshelf extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockWoodenshelf(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.woodenshelf");
|
||||
}
|
||||
public BlockWoodenshelf(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.woodenshelf");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/wood_shelf_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/wood_shelf_empty");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/wood_shelf_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/wood_shelf_side");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/wood_shelf_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/wood_shelf_empty");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/wood_shelf_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/wood_shelf_side");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -12,48 +12,43 @@ import net.minecraftforge.fluids.Fluid;
|
|||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class BlockFluidBase extends BlockFluidClassic{
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon stillIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon flowingIcon;
|
||||
|
||||
public BlockFluidBase(Fluid fluid, Material material)
|
||||
{
|
||||
super(fluid, material);
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
return (side == 0 || side == 1) ? stillIcon : flowingIcon;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister register)
|
||||
{
|
||||
stillIcon = register.registerIcon(ModInfo.MOD_ID.toLowerCase() + ":" + "fluids/" + getUnlocalizedName().substring(16) + "_flowing");
|
||||
flowingIcon = register.registerIcon(ModInfo.MOD_ID.toLowerCase() + ":" + "fluids/" + getUnlocalizedName().substring(16) + "_flowing");
|
||||
|
||||
this.stack.getFluid().setIcons(stillIcon, flowingIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDisplace(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
if (world.getBlock(x, y, z).getMaterial().isLiquid())
|
||||
return false;
|
||||
return super.canDisplace(world, x, y, z);
|
||||
}
|
||||
public class BlockFluidBase extends BlockFluidClassic {
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon stillIcon;
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected IIcon flowingIcon;
|
||||
|
||||
@Override
|
||||
public boolean displaceIfPossible(World world, int x, int y, int z)
|
||||
{
|
||||
if (world.getBlock(x, y, z).getMaterial().isLiquid())
|
||||
return false;
|
||||
return super.displaceIfPossible(world, x, y, z);
|
||||
}
|
||||
public BlockFluidBase(Fluid fluid, Material material) {
|
||||
super(fluid, material);
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return (side == 0 || side == 1) ? stillIcon : flowingIcon;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
stillIcon = register.registerIcon(ModInfo.MOD_ID.toLowerCase() + ":" + "fluids/" + getUnlocalizedName().substring(16) + "_flowing");
|
||||
flowingIcon = register.registerIcon(ModInfo.MOD_ID.toLowerCase() + ":" + "fluids/" + getUnlocalizedName().substring(16) + "_flowing");
|
||||
|
||||
this.stack.getFluid().setIcons(stillIcon, flowingIcon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDisplace(IBlockAccess world, int x, int y, int z) {
|
||||
if (world.getBlock(x, y, z).getMaterial().isLiquid())
|
||||
return false;
|
||||
return super.canDisplace(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean displaceIfPossible(World world, int x, int y, int z) {
|
||||
if (world.getBlock(x, y, z).getMaterial().isLiquid())
|
||||
return false;
|
||||
return super.displaceIfPossible(world, x, y, z);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,12 +3,11 @@ package techreborn.blocks.fluid;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
public class BlockFluidTechReborn extends BlockFluidBase{
|
||||
public class BlockFluidTechReborn extends BlockFluidBase {
|
||||
|
||||
public BlockFluidTechReborn(Fluid fluid, Material material, String name)
|
||||
{
|
||||
super(fluid, material);
|
||||
setBlockName(name);
|
||||
}
|
||||
public BlockFluidTechReborn(Fluid fluid, Material material, String name) {
|
||||
super(fluid, material);
|
||||
setBlockName(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,62 +19,56 @@ import java.util.Random;
|
|||
|
||||
public class BlockDieselGenerator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockDieselGenerator(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.dieselgenerator");
|
||||
}
|
||||
public BlockDieselGenerator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.dieselgenerator");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/diesel_generator_top_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileDieselGenerator();
|
||||
}
|
||||
|
||||
@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.dieselGeneratorID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/diesel_generator_top_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileDieselGenerator();
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@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.dieselGeneratorID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,52 +16,47 @@ import java.util.Random;
|
|||
|
||||
public class BlockDragonEggSiphoner extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockDragonEggSiphoner(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.dragoneggsiphoner");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_side_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_side_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileDragonEggSiphoner();
|
||||
}
|
||||
public BlockDragonEggSiphoner(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.dragoneggsiphoner");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_side_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_side_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/dragon_egg_energy_siphon_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileDragonEggSiphoner();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,62 +19,56 @@ import java.util.Random;
|
|||
|
||||
public class BlockGasTurbine extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockGasTurbine(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.gasTurbine");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileGasTurbine();
|
||||
}
|
||||
|
||||
@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.gasTurbineID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
public BlockGasTurbine(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.gasTurbine");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/gas_generator_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/gas_generator_bottom");
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileGasTurbine();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@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.gasTurbineID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/gas_generator_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/gas_generator_bottom");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,54 +14,49 @@ import techreborn.tiles.TileHeatGenerator;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockHeatGenerator extends BlockMachineBase{
|
||||
public class BlockHeatGenerator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockHeatGenerator(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.heatgenerator");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/heat_generator_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/heat_generator_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/heat_generator_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/heat_generator_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileHeatGenerator();
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
public BlockHeatGenerator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.heatgenerator");
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/heat_generator_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/heat_generator_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/heat_generator_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/heat_generator_bottom");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileHeatGenerator();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,46 +13,42 @@ import java.util.Random;
|
|||
|
||||
public class BlockLightningRod extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockLightningRod(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.lightningrod");
|
||||
}
|
||||
public BlockLightningRod(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.lightningrod");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/idsu_front");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/idsu_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/lightning_rod_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/extreme_voltage_machine_side");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/idsu_front");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/idsu_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/lightning_rod_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/extreme_voltage_machine_side");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,46 +13,42 @@ import java.util.Random;
|
|||
|
||||
public class BlockMagicEnergyAbsorber extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockMagicEnergyAbsorber(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.magicenergyabsorber");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/magic_energy_absorber_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/magic_energy_absorber_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/magic_energy_absorber_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/magic_energy_absorber_bottom");
|
||||
}
|
||||
public BlockMagicEnergyAbsorber(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.magicenergyabsorber");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/magic_energy_absorber_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/magic_energy_absorber_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/magic_energy_absorber_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/magic_energy_absorber_bottom");
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,46 +13,42 @@ import java.util.Random;
|
|||
|
||||
public class BlockMagicEnergyConverter extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockMagicEnergyConverter(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.magicenergyconverter");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/magic_energy_converter_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/magic_energy_converter_front_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/magic_energy_converter_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/magic_energy_converter_bottom");
|
||||
}
|
||||
public BlockMagicEnergyConverter(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.magicenergyconverter");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/magic_energy_converter_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/magic_energy_converter_front_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/magic_energy_converter_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/magic_energy_converter_bottom");
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,46 +13,42 @@ import java.util.Random;
|
|||
|
||||
public class BlockPlasmaGenerator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockPlasmaGenerator(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.plasmagenerator");
|
||||
}
|
||||
public BlockPlasmaGenerator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.plasmagenerator");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/plasma_generator_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/plasma_generator_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/plasma_generator_side_off");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,62 +19,56 @@ import java.util.Random;
|
|||
|
||||
public class BlockSemiFluidGenerator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockSemiFluidGenerator(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.semifluidgenerator");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileSemifluidGenerator();
|
||||
}
|
||||
|
||||
@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.semifluidGeneratorID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
public BlockSemiFluidGenerator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.semifluidgenerator");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/semifluid_generator_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/semifluid_generator_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileSemifluidGenerator();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@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.semifluidGeneratorID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/semifluid_generator_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/semifluid_generator_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,62 +19,56 @@ import java.util.Random;
|
|||
|
||||
public class BlockThermalGenerator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockThermalGenerator()
|
||||
{
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.thermalGenerator");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileThermalGenerator();
|
||||
}
|
||||
|
||||
@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.thermalGeneratorID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
public BlockThermalGenerator() {
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.thermalGenerator");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/thermal_generator_side_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/thermal_generator_side_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/thermal_generator_top_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileThermalGenerator();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@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.thermalGeneratorID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/thermal_generator_side_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/thermal_generator_side_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/thermal_generator_top_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,59 +15,54 @@ import techreborn.tiles.TileAlloyFurnace;
|
|||
|
||||
public class BlockAlloyFurnace extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockAlloyFurnace(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.alloyfurnace");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileAlloyFurnace();
|
||||
}
|
||||
|
||||
@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.alloyFurnaceID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/alloy_furnace_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/alloy_furnace_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/alloy_furnace_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/alloy_furnace_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/alloy_furnace_bottom");
|
||||
}
|
||||
public BlockAlloyFurnace(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.alloyfurnace");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileAlloyFurnace();
|
||||
}
|
||||
|
||||
}
|
||||
@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.alloyFurnaceID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/alloy_furnace_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/alloy_furnace_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/alloy_furnace_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/alloy_furnace_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/alloy_furnace_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,77 +20,71 @@ import java.util.Random;
|
|||
|
||||
public class BlockAlloySmelter extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockAlloySmelter(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.alloysmelter");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileAlloySmelter();
|
||||
}
|
||||
|
||||
@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.alloySmelterID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
public BlockAlloySmelter(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.alloysmelter");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/electric_alloy_furnace_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/electric_alloy_furnace_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileAlloySmelter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileAlloySmelter tileAlloySmelter = (TileAlloySmelter) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileAlloySmelter.crafter.isActive()){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@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.alloySmelterID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/electric_alloy_furnace_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/electric_alloy_furnace_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileAlloySmelter tileAlloySmelter = (TileAlloySmelter) blockAccess.getTileEntity(x, y, z);
|
||||
if (side == metadata && tileAlloySmelter.crafter.isActive()) {
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,79 +20,73 @@ import java.util.Random;
|
|||
|
||||
public class BlockAssemblingMachine extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
public BlockAssemblingMachine(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.assemblingmachine");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/assembling_machine_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/assembling_machine_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/assembling_machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileAssemblingMachine();
|
||||
}
|
||||
|
||||
@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.assemblingmachineID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
public BlockAssemblingMachine(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.assemblingmachine");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileAssemblingMachine tileAssemblingMachine = (TileAssemblingMachine) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileAssemblingMachine.crafter.isActive()){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/assembling_machine_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/assembling_machine_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/assembling_machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileAssemblingMachine();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@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.assemblingmachineID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileAssemblingMachine tileAssemblingMachine = (TileAssemblingMachine) blockAccess.getTileEntity(x, y, z);
|
||||
if (side == metadata && tileAssemblingMachine.crafter.isActive()) {
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,66 +19,60 @@ import java.util.Random;
|
|||
|
||||
public class BlockBlastFurnace extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockBlastFurnace(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.blastfurnace");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileBlastFurnace();
|
||||
}
|
||||
public BlockBlastFurnace(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.blastfurnace");
|
||||
}
|
||||
|
||||
@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.blastFurnaceID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileBlastFurnace();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_blast_furnace_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_blast_furnace_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
}
|
||||
@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.blastFurnaceID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_blast_furnace_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_blast_furnace_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,88 +20,82 @@ import java.util.Random;
|
|||
|
||||
public class BlockCentrifuge extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTopOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockCentrifuge()
|
||||
{
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.centrifuge");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTopOn;
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return new TileCentrifuge();
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@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.centrifugeID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
public BlockCentrifuge() {
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.centrifuge");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_centrifuge_side_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_centrifuge_side_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/industrial_centrifuge_top_off");
|
||||
this.iconTopOn = icon.registerIcon("techreborn:machine/industrial_centrifuge_top_on");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/industrial_centrifuge_bottom");
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileCentrifuge();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileCentrifuge tileCentrifuge = (TileCentrifuge) blockAccess.getTileEntity(x, y, z);
|
||||
if(side >= 2 && tileCentrifuge.crafter.isActive()){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
if(side == 1 && tileCentrifuge.crafter.isActive()){
|
||||
return this.iconTopOn;
|
||||
}
|
||||
@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.centrifugeID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_centrifuge_side_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_centrifuge_side_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/industrial_centrifuge_top_off");
|
||||
this.iconTopOn = icon.registerIcon("techreborn:machine/industrial_centrifuge_top_on");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/industrial_centrifuge_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileCentrifuge tileCentrifuge = (TileCentrifuge) blockAccess.getTileEntity(x, y, z);
|
||||
if (side >= 2 && tileCentrifuge.crafter.isActive()) {
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
if (side == 1 && tileCentrifuge.crafter.isActive()) {
|
||||
return this.iconTopOn;
|
||||
}
|
||||
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.iconFront));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.iconFront));
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.iconFront));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.iconFront));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,58 +15,53 @@ import techreborn.tiles.TileChargeBench;
|
|||
|
||||
public class BlockChargeBench extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockChargeBench(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.chargebench");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileChargeBench();
|
||||
}
|
||||
|
||||
@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);
|
||||
return true;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_side");
|
||||
}
|
||||
public BlockChargeBench(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.chargebench");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileChargeBench();
|
||||
}
|
||||
|
||||
}
|
||||
@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);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_side");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,80 +20,74 @@ import java.util.Random;
|
|||
|
||||
public class BlockChemicalReactor extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockChemicalReactor(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.chemicalreactor");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileChemicalReactor();
|
||||
}
|
||||
|
||||
@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.chemicalReactorID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/chemical_reactor_side_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/chemical_reactor_side_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
public BlockChemicalReactor(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.chemicalreactor");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileChemicalReactor tileChemicalReactor = (TileChemicalReactor) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileChemicalReactor.crafter.isActive()){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileChemicalReactor();
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@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.chemicalReactorID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/chemical_reactor_side_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/chemical_reactor_side_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileChemicalReactor tileChemicalReactor = (TileChemicalReactor) blockAccess.getTileEntity(x, y, z);
|
||||
if (side == metadata && tileChemicalReactor.crafter.isActive()) {
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,46 +13,42 @@ import java.util.Random;
|
|||
|
||||
public class BlockDistillationTower extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockDistillationTower(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.distillationtower");
|
||||
}
|
||||
public BlockDistillationTower(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.distillationtower");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/distillation_tower_front_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/distillation_tower_front_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,91 +18,85 @@ import techreborn.tiles.TileGrinder;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockGrinder extends BlockMachineBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
public class BlockGrinder extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTopOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
public BlockGrinder(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.grinder");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return new TileGrinder();
|
||||
}
|
||||
|
||||
@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.grinderID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_grinder_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_grinder_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/industrial_grinder_top_off");
|
||||
this.iconTopOn = icon.registerIcon("techreborn:machine/industrial_grinder_top_on");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTopOn;
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileGrinder tileGrinder = (TileGrinder) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileGrinder.crafter.isActive()){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
if(side == 1 && tileGrinder.crafter.isActive()){
|
||||
return this.iconTopOn;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockGrinder(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.grinder");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileGrinder();
|
||||
}
|
||||
|
||||
@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.grinderID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_grinder_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_grinder_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/industrial_grinder_top_off");
|
||||
this.iconTopOn = icon.registerIcon("techreborn:machine/industrial_grinder_top_on");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileGrinder tileGrinder = (TileGrinder) blockAccess.getTileEntity(x, y, z);
|
||||
if (side == metadata && tileGrinder.crafter.isActive()) {
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
if (side == 1 && tileGrinder.crafter.isActive()) {
|
||||
return this.iconTopOn;
|
||||
}
|
||||
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,80 +18,74 @@ import techreborn.tiles.TileImplosionCompressor;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockImplosionCompressor extends BlockMachineBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
public class BlockImplosionCompressor extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockImplosionCompressor(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.implosioncompressor");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return new TileImplosionCompressor();
|
||||
}
|
||||
|
||||
@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.compresserID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/implosion_compressor_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/implosion_compressor_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/implosion_compressor_bottom");
|
||||
}
|
||||
public BlockImplosionCompressor(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.implosioncompressor");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileImplosionCompressor tileImplosionCompressor = (TileImplosionCompressor) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileImplosionCompressor.crafter.isActive()){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileImplosionCompressor();
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@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.compresserID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/implosion_compressor_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/implosion_compressor_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/implosion_compressor_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileImplosionCompressor tileImplosionCompressor = (TileImplosionCompressor) blockAccess.getTileEntity(x, y, z);
|
||||
if (side == metadata && tileImplosionCompressor.crafter.isActive()) {
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,82 +20,76 @@ import java.util.Random;
|
|||
|
||||
public class BlockIndustrialElectrolyzer extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockIndustrialElectrolyzer(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.industrialelectrolyzer");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileIndustrialElectrolyzer();
|
||||
}
|
||||
|
||||
@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.industrialElectrolyzerID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockIndustrialElectrolyzer(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.industrialelectrolyzer");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileIndustrialElectrolyzer();
|
||||
}
|
||||
|
||||
@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.industrialElectrolyzerID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_off");
|
||||
this.iconFrontOn= icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileIndustrialElectrolyzer tileIndustrialElectrolyzer = (TileIndustrialElectrolyzer) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileIndustrialElectrolyzer.crafter.isActive()){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileIndustrialElectrolyzer tileIndustrialElectrolyzer = (TileIndustrialElectrolyzer) blockAccess.getTileEntity(x, y, z);
|
||||
if (side == metadata && tileIndustrialElectrolyzer.crafter.isActive()) {
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,81 +20,75 @@ import java.util.Random;
|
|||
|
||||
public class BlockIndustrialSawmill extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockIndustrialSawmill(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.industrialsawmill");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileIndustrialSawmill();
|
||||
}
|
||||
|
||||
@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.sawMillID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
public BlockIndustrialSawmill(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.industrialsawmill");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_sawmill_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_sawmill_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileIndustrialSawmill tileIndustrialSawmill = (TileIndustrialSawmill) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileIndustrialSawmill.crafter.isActive()){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileIndustrialSawmill();
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@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.sawMillID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_sawmill_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/industrial_sawmill_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileIndustrialSawmill tileIndustrialSawmill = (TileIndustrialSawmill) blockAccess.getTileEntity(x, y, z);
|
||||
if (side == metadata && tileIndustrialSawmill.crafter.isActive()) {
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,79 +20,73 @@ import java.util.Random;
|
|||
|
||||
public class BlockLathe extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockLathe(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.lathe");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/lathe_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/lathe_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileLathe();
|
||||
}
|
||||
|
||||
@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.latheID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
public BlockLathe(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.lathe");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileLathe tileLathe = (TileLathe) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tileLathe.crafter.isActive()){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/lathe_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/lathe_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileLathe();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@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.latheID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TileLathe tileLathe = (TileLathe) blockAccess.getTileEntity(x, y, z);
|
||||
if (side == metadata && tileLathe.crafter.isActive()) {
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,68 +17,62 @@ import techreborn.tiles.TileMatterFabricator;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockMatterFabricator extends BlockMachineBase{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
public class BlockMatterFabricator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
public BlockMatterFabricator(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.matterfabricator");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return new TileMatterFabricator();
|
||||
}
|
||||
|
||||
@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.matterfabID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/matterfab_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/matterfab_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/matterfab_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/matterfab_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/matterfab_off");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
public BlockMatterFabricator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.matterfabricator");
|
||||
}
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileMatterFabricator();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
@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.matterfabID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/matterfab_off");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/matterfab_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/matterfab_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/matterfab_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/matterfab_off");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,79 +20,73 @@ import java.util.Random;
|
|||
|
||||
public class BlockPlateCuttingMachine extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
public BlockPlateCuttingMachine(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.platecuttingmachine");
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/plate_cutting_machine_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/plate_cutting_machine_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TilePlateCuttingMachine();
|
||||
}
|
||||
|
||||
@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.platecuttingmachineID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
public BlockPlateCuttingMachine(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.platecuttingmachine");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TilePlateCuttingMachine tilePlateCuttingMachine = (TilePlateCuttingMachine) blockAccess.getTileEntity(x, y, z);
|
||||
if(side == metadata && tilePlateCuttingMachine.crafter.isActive()){
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/plate_cutting_machine_front_off");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/plate_cutting_machine_front_on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TilePlateCuttingMachine();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
@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.platecuttingmachineID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = blockAccess.getBlockMetadata(x, y, z);
|
||||
TilePlateCuttingMachine tilePlateCuttingMachine = (TilePlateCuttingMachine) blockAccess.getTileEntity(x, y, z);
|
||||
if (side == metadata && tilePlateCuttingMachine.crafter.isActive()) {
|
||||
return this.iconFrontOn;
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,61 +19,55 @@ import java.util.Random;
|
|||
|
||||
public class BlockRollingMachine extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockRollingMachine(Material material)
|
||||
{
|
||||
super(material.rock);
|
||||
setBlockName("techreborn.rollingmachine");
|
||||
}
|
||||
public BlockRollingMachine(Material material) {
|
||||
super(material.rock);
|
||||
setBlockName("techreborn.rollingmachine");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
return new TileRollingMachine();
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileRollingMachine();
|
||||
}
|
||||
|
||||
@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.rollingMachineID, world,
|
||||
x, y, z);
|
||||
return true;
|
||||
}
|
||||
@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.rollingMachineID, world,
|
||||
x, y, z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/rolling_machine_side_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/rolling_machine_side_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("machine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,46 +13,42 @@ import java.util.Random;
|
|||
|
||||
public class BlockVacuumFreezer extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockVacuumFreezer(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.vacuumfreezer");
|
||||
}
|
||||
public BlockVacuumFreezer(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.vacuumfreezer");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/vacuum_freezer_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/vacuum_freezer_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/vacuum_freezer_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/vacuum_freezer_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune)
|
||||
{
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random random, int fortune) {
|
||||
return IC2Items.getItem("advancedMachine").getItem();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,64 +17,60 @@ import techreborn.tiles.TileAesu;
|
|||
|
||||
public class BlockAesu extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockAesu(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.aesu");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileAesu();
|
||||
}
|
||||
|
||||
@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.aesuID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
public BlockAesu(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.aesu");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_) {
|
||||
return new TileAesu();
|
||||
}
|
||||
|
||||
@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.aesuID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/aesu_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/aesu_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/aesu_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/aesu_side");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/aesu_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/aesu_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/aesu_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/aesu_side");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if(side == metadata)
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if (side == metadata)
|
||||
return this.iconFront;
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
}
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemstack) {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile instanceof TileAesu){
|
||||
((TileAesu) tile).setFacing((short) world.getBlockMetadata(x, y, z));
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemstack) {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (tile instanceof TileAesu) {
|
||||
((TileAesu) tile).setFacing((short) world.getBlockMetadata(x, y, z));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
package techreborn.blocks.storage;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
@ -15,70 +13,64 @@ import net.minecraft.world.World;
|
|||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.packets.PacketHandler;
|
||||
import techreborn.tiles.idsu.IDSUManager;
|
||||
import techreborn.tiles.idsu.TileIDSU;
|
||||
|
||||
public class BlockIDSU extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockIDSU(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.idsu");
|
||||
}
|
||||
public BlockIDSU(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.idsu");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/idsu_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/idsu_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/idsu_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/idsu_side");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/idsu_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/idsu_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/idsu_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/idsu_side");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileIDSU(5, 2048, 100000000);
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileIDSU(5, 2048, 100000000);
|
||||
}
|
||||
|
||||
|
||||
@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.idsuID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
@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.idsuID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemstack) {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile instanceof TileIDSU){
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemstack) {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if (tile instanceof TileIDSU) {
|
||||
((TileIDSU) tile).ownerUdid = player.getUniqueID().toString();
|
||||
System.out.println(((TileIDSU) tile).ownerUdid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,51 +15,47 @@ import techreborn.tiles.lesu.TileLesu;
|
|||
|
||||
public class BlockLesu extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockLesu(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.lesu");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/lesu_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/lesu_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/lesu_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/lesu_side");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if(side == metadata)
|
||||
return this.iconFront;
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
}
|
||||
public BlockLesu(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.lesu");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/lesu_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/lesu_front");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/lesu_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/lesu_side");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if (side == metadata)
|
||||
return this.iconFront;
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileLesu();
|
||||
}
|
||||
|
||||
@Override
|
||||
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())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.lesuID, world, x, y,
|
||||
z);
|
||||
|
|
|
@ -15,63 +15,58 @@ import techreborn.tiles.lesu.TileLesuStorage;
|
|||
|
||||
public class BlockLesuStorage extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockLesuStorage(Material material)
|
||||
{
|
||||
super(material);
|
||||
setBlockName("techreborn.lesustorage");
|
||||
}
|
||||
public BlockLesuStorage(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.lesustorage");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/lesu_block");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/lesu_block");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/lesu_block");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/lesu_block");
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/lesu_block");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/lesu_block");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/lesu_block");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/lesu_block");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom: (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
return metadata == 0 && side == 3 ? this.iconFront
|
||||
: side == 1 ? this.iconTop :
|
||||
side == 0 ? this.iconBottom : (side == 0 ? this.iconTop
|
||||
: (side == metadata ? this.iconFront : this.blockIcon));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemstack) {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, itemstack);
|
||||
if(world.getTileEntity(x, y, z) instanceof TileLesuStorage){
|
||||
if (world.getTileEntity(x, y, z) instanceof TileLesuStorage) {
|
||||
((TileLesuStorage) world.getTileEntity(x, y, z)).rebuildNetwork();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
if(world.getTileEntity(x, y, z) instanceof TileLesuStorage) {
|
||||
if (world.getTileEntity(x, y, z) instanceof TileLesuStorage) {
|
||||
((TileLesuStorage) world.getTileEntity(x, y, z)).removeFromNetwork();
|
||||
}
|
||||
super.breakBlock(world, x, y, z, block, meta);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@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 TileLesuStorage();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue