859
This commit is contained in:
parent
b88fe49ee2
commit
30879a534a
107 changed files with 265 additions and 2518 deletions
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
|
@ -15,18 +10,10 @@ import techreborn.tiles.TileChunkLoader;
|
|||
|
||||
public class BlockChunkLoader extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockChunkLoader(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.chunkloader");
|
||||
setUnlocalizedName("techreborn.chunkloader");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -42,27 +29,4 @@ public class BlockChunkLoader extends BlockMachineBase {
|
|||
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");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
|
@ -16,19 +11,7 @@ public class BlockComputerCube extends BlockMachineBase {
|
|||
|
||||
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");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
return this.blockIcon;
|
||||
setUnlocalizedName("techreborn.computercube");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
|
@ -15,18 +10,9 @@ import techreborn.tiles.TileDigitalChest;
|
|||
|
||||
public class BlockDigitalChest extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockDigitalChest() {
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.digitalChest");
|
||||
setUnlocalizedName("techreborn.digitalChest");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -43,36 +29,4 @@ public class BlockDigitalChest extends BlockMachineBase {
|
|||
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 IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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 IIcon getIcon(int side, int meta) {
|
||||
if(side == 1){
|
||||
return this.iconTop;
|
||||
} else if(side == 3){
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,56 +1,15 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
|
||||
public class BlockElectricCraftingTable extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockElectricCraftingTable(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.electriccraftingtable");
|
||||
setUnlocalizedName("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 IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, 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));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,48 +1,15 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class BlockFusionCoil extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockFusionCoil(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.fusioncoil");
|
||||
setUnlocalizedName("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 IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
|
@ -15,46 +11,17 @@ import techreborn.tiles.fusionReactor.TileEntityFusionController;
|
|||
|
||||
public class BlockFusionControlComputer extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
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 IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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));
|
||||
setUnlocalizedName("techreborn.fusioncontrolcomputer");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
TileEntityFusionController tileEntityFusionController = (TileEntityFusionController) world.getTileEntity(x, y, z);
|
||||
TileEntityFusionController tileEntityFusionController = (TileEntityFusionController) world.getTileEntity(new BlockPos(x, y, z));
|
||||
tileEntityFusionController.checkCoils();
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.fusionID, world, x, y,
|
||||
|
|
|
@ -1,48 +1,12 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class BlockHighlyAdvancedMachine extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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));
|
||||
setUnlocalizedName("techreborn.highlyAdvancedMachine");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import ic2.api.item.IC2Items;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
|
@ -17,11 +16,12 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.tiles.TileMachineBase;
|
||||
|
|
|
@ -1,22 +1,17 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.client.texture.ConnectedTexture;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.multiblock.BlockMultiblockBase;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.client.texture.CasingConnectedTextureGenerator;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.tiles.TileMachineCasing;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -26,12 +21,11 @@ public class BlockMachineCasing extends BlockMultiblockBase {
|
|||
|
||||
public static final String[] types = new String[]
|
||||
{"standard", "reinforced", "advanced"};
|
||||
public IIcon[][] icons;
|
||||
|
||||
public BlockMachineCasing(Material material) {
|
||||
super(material);
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setBlockName("techreborn.machineCasing");
|
||||
setUnlocalizedName("techreborn.machineCasing");
|
||||
setHardness(2F);
|
||||
}
|
||||
|
||||
|
@ -65,363 +59,11 @@ public class BlockMachineCasing extends BlockMultiblockBase {
|
|||
return metaData;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.icons = new IIcon[types.length][16];
|
||||
if (!ConfigTechReborn.useConnectedTextures) {
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
for (int j = 0; j < 16; j++) {
|
||||
icons[i][j] = iconRegister.registerIcon("techreborn:" + "machine/casing"
|
||||
+ types[i] + "_full");
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
// up down left right
|
||||
icons[i][0] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(true, true, true, true), iconRegister, 0, i, types);
|
||||
icons[i][1] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(true, false, true, true), iconRegister, 1, i, types);
|
||||
icons[i][2] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(false, true, true, true), iconRegister, 2, i, types);
|
||||
icons[i][3] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(true, true, true, false), iconRegister, 3, i, types);
|
||||
icons[i][4] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(true, true, false, true), iconRegister, 4, i, types);
|
||||
icons[i][5] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(true, true, false, false), iconRegister, 5, i, types);
|
||||
icons[i][6] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(false, false, true, true), iconRegister, 6, i, types);
|
||||
icons[i][7] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(false, true, false, true), iconRegister, 7, i, types);
|
||||
icons[i][8] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(false, true, true, false), iconRegister, 8, i, types);
|
||||
icons[i][9] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(true, false, false, true), iconRegister, 9, i, types);
|
||||
icons[i][10] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(true, false, true, false), iconRegister, 10, i, types);
|
||||
icons[i][11] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(false, true, false, false), iconRegister, 11, i, types);
|
||||
icons[i][12] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(true, false, false, false), iconRegister, 12, i, types);
|
||||
icons[i][13] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(false, false, false, true), iconRegister, 13, i, types);
|
||||
icons[i][14] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(false, false, true, false), iconRegister, 14, i, types);
|
||||
icons[i][15] = CasingConnectedTextureGenerator.genIcon(new ConnectedTexture(false, false, false, false), iconRegister, 15, i, types);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int meta = blockAccess.getBlockMetadata(x, y, z);
|
||||
return getConnectedBlockTexture(blockAccess, x, y, z, side, icons[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return icons[meta][0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileMachineCasing();
|
||||
}
|
||||
|
||||
/**
|
||||
* This is taken from https://github.com/SlimeKnights/TinkersConstruct/blob/a7405a3d10318bb5c486ec75fb62897a8149d1a6/src/main/java/tconstruct/smeltery/blocks/GlassBlockConnected.java
|
||||
*/
|
||||
public IIcon getConnectedBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5, IIcon[] icons) {
|
||||
boolean isOpenUp = false, isOpenDown = false, isOpenLeft = false, isOpenRight = false;
|
||||
|
||||
switch (par5) {
|
||||
case 0:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[11];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[13];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[14];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[5];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[6];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[8];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[10];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[7];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[9];
|
||||
} else if (isOpenDown) {
|
||||
return icons[3];
|
||||
} else if (isOpenUp) {
|
||||
return icons[4];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[2];
|
||||
} else if (isOpenRight) {
|
||||
return icons[1];
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[11];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[13];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[14];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[5];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[6];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[8];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[10];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[7];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[9];
|
||||
} else if (isOpenDown) {
|
||||
return icons[3];
|
||||
} else if (isOpenUp) {
|
||||
return icons[4];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[2];
|
||||
} else if (isOpenRight) {
|
||||
return icons[1];
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[13];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[14];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[11];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[6];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[5];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[9];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[10];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[7];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[8];
|
||||
} else if (isOpenDown) {
|
||||
return icons[1];
|
||||
} else if (isOpenUp) {
|
||||
return icons[2];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[4];
|
||||
} else if (isOpenRight) {
|
||||
return icons[3];
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[14];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[13];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[11];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[6];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[5];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[10];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[9];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[8];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[7];
|
||||
} else if (isOpenDown) {
|
||||
return icons[1];
|
||||
} else if (isOpenUp) {
|
||||
return icons[2];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[3];
|
||||
} else if (isOpenRight) {
|
||||
return icons[4];
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[14];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[13];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[11];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[6];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[5];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[10];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[9];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[8];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[7];
|
||||
} else if (isOpenDown) {
|
||||
return icons[1];
|
||||
} else if (isOpenUp) {
|
||||
return icons[2];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[3];
|
||||
} else if (isOpenRight) {
|
||||
return icons[4];
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[13];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[14];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[11];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[6];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[5];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[9];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[10];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[7];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[8];
|
||||
} else if (isOpenDown) {
|
||||
return icons[1];
|
||||
} else if (isOpenUp) {
|
||||
return icons[2];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[4];
|
||||
} else if (isOpenRight) {
|
||||
return icons[3];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return icons[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) {
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
|
@ -31,11 +27,10 @@ public class BlockMachineFrame extends Block {
|
|||
public static final String[] types = new String[]
|
||||
{"aluminum", "iron", "bronze", "brass", "steel", "titanium"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockMachineFrame(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.machineFrame");
|
||||
setUnlocalizedName("techreborn.machineFrame");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(1f);
|
||||
}
|
||||
|
@ -53,28 +48,4 @@ public class BlockMachineFrame extends Block {
|
|||
return metaData;
|
||||
}
|
||||
|
||||
@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/"
|
||||
+ types[i] + "_machine_block");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (EnumFacing.getOrientation(side) == EnumFacing.UP
|
||||
|| EnumFacing.getOrientation(side) == EnumFacing.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,20 +1,16 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.util.OreDrop;
|
||||
import reborncore.common.util.OreDropSet;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
|
@ -48,11 +44,10 @@ public class BlockOre extends Block {
|
|||
"Sphalerite", "Tungston", "Sheldonite", "Peridot", "Sodalite",
|
||||
"Tetrahedrite", "Cassiterite", "Lead", "Silver"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockOre(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.ore");
|
||||
setUnlocalizedName("techreborn.ore");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2.0f);
|
||||
}
|
||||
|
@ -136,29 +131,6 @@ public class BlockOre extends Block {
|
|||
return metaData;
|
||||
}
|
||||
|
||||
@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]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (EnumFacing.getOrientation(side) == EnumFacing.UP
|
||||
|| EnumFacing.getOrientation(side) == EnumFacing.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -13,10 +10,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TilePlayerDectector;
|
||||
|
||||
|
@ -27,7 +24,7 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
|||
|
||||
public BlockPlayerDetector() {
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.playerDetector");
|
||||
setUnlocalizedName("techreborn.playerDetector");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2f);
|
||||
}
|
||||
|
@ -35,7 +32,6 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
|||
public static final String[] types = new String[]
|
||||
{"all", "others", "you"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int par1, Random random, int par2) {
|
||||
|
@ -55,22 +51,6 @@ public class BlockPlayerDetector extends BlockMachineBase {
|
|||
return metaData;
|
||||
}
|
||||
|
||||
@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/player_detector_" + types[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
return textures[MathHelper.clamp_int(metaData, 0, types.length - 1)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
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.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
|
@ -20,18 +16,9 @@ import techreborn.tiles.TileQuantumChest;
|
|||
|
||||
public class BlockQuantumChest extends BlockContainer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockQuantumChest() {
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.quantumChest");
|
||||
setUnlocalizedName("techreborn.quantumChest");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2.0F);
|
||||
}
|
||||
|
@ -50,24 +37,7 @@ public class BlockQuantumChest extends BlockContainer {
|
|||
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");
|
||||
}
|
||||
|
||||
@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));
|
||||
|
||||
}
|
||||
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
|
@ -14,14 +10,10 @@ import techreborn.tiles.TileQuantumTank;
|
|||
|
||||
public class BlockQuantumTank extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon top;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon other;
|
||||
|
||||
public BlockQuantumTank() {
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.quantumTank");
|
||||
setUnlocalizedName("techreborn.quantumTank");
|
||||
setHardness(2.0F);
|
||||
}
|
||||
|
||||
|
@ -40,20 +32,4 @@ public class BlockQuantumTank extends BlockMachineBase {
|
|||
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 IIcon getIcon(int currentSide, int meta) {
|
||||
if (currentSide == 1) {
|
||||
return top;
|
||||
} else {
|
||||
return other;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
|
@ -37,11 +33,10 @@ public class BlockStorage extends Block {
|
|||
"electrum", "zinc", "platinum", "tungsten", "nickel", "invar", "osmium",
|
||||
"iridium"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockStorage(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.storage");
|
||||
setUnlocalizedName("techreborn.storage");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2f);
|
||||
}
|
||||
|
@ -64,28 +59,6 @@ public class BlockStorage extends Block {
|
|||
return metaData;
|
||||
}
|
||||
|
||||
@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");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (EnumFacing.getOrientation(side) == EnumFacing.UP
|
||||
|| EnumFacing.getOrientation(side) == EnumFacing.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
|
@ -33,11 +29,9 @@ public class BlockStorage2 extends Block {
|
|||
{"tungstensteel", "lodestone", "tellurium", "iridium_reinforced_tungstensteel",
|
||||
"iridium_reinforced_stone", "ruby", "sapphire", "peridot", "yellowGarnet", "redGarnet"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public BlockStorage2(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.storage2");
|
||||
setUnlocalizedName("techreborn.storage2");
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
setHardness(2f);
|
||||
}
|
||||
|
@ -60,29 +54,6 @@ public class BlockStorage2 extends Block {
|
|||
return metaData;
|
||||
}
|
||||
|
||||
@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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metaData) {
|
||||
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
|
||||
|
||||
if (EnumFacing.getOrientation(side) == EnumFacing.UP
|
||||
|| EnumFacing.getOrientation(side) == EnumFacing.DOWN) {
|
||||
return textures[metaData];
|
||||
} else {
|
||||
return textures[metaData];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,48 +1,13 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
public class BlockSupercondensator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
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 IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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));
|
||||
setUnlocalizedName("techreborn.supercondensator");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,41 +1,19 @@
|
|||
package techreborn.blocks.fluid;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.BlockFluidClassic;
|
||||
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) {
|
||||
|
|
|
@ -7,7 +7,7 @@ public class BlockFluidTechReborn extends BlockFluidBase {
|
|||
|
||||
public BlockFluidTechReborn(Fluid fluid, Material material, String name) {
|
||||
super(fluid, material);
|
||||
setBlockName(name);
|
||||
setUnlocalizedName(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -15,28 +11,12 @@ import techreborn.tiles.TileDieselGenerator;
|
|||
|
||||
public class BlockDieselGenerator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockDieselGenerator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.dieselgenerator");
|
||||
setUnlocalizedName("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_) {
|
||||
|
@ -55,14 +35,5 @@ public class BlockDieselGenerator extends BlockMachineBase {
|
|||
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));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,53 +1,26 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.tiles.TileDragonEggSiphoner;
|
||||
|
||||
public class BlockDragonEggSiphoner extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockDragonEggSiphoner(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.dragoneggsiphoner");
|
||||
setUnlocalizedName("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();
|
||||
}
|
||||
|
||||
@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,12 +1,8 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -15,18 +11,10 @@ import techreborn.tiles.TileGasTurbine;
|
|||
|
||||
public class BlockGasTurbine extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockGasTurbine(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.gasTurbine");
|
||||
setUnlocalizedName("techreborn.gasTurbine");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -46,23 +34,6 @@ public class BlockGasTurbine extends BlockMachineBase {
|
|||
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/gas_generator_top");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/gas_generator_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));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,53 +1,26 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.tiles.TileHeatGenerator;
|
||||
|
||||
public class BlockHeatGenerator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockHeatGenerator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.heatgenerator");
|
||||
setUnlocalizedName("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)
|
||||
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,45 +1,14 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
||||
public class BlockLightningRod extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
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");
|
||||
}
|
||||
|
||||
@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));
|
||||
|
||||
setUnlocalizedName("techreborn.lightningrod");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,45 +1,16 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
||||
public class BlockMagicEnergyAbsorber extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
@
|
||||
|
||||
public BlockMagicEnergyAbsorber(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.magicenergyabsorber");
|
||||
setUnlocalizedName("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");
|
||||
}
|
||||
|
||||
@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,45 +1,17 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
||||
public class BlockMagicEnergyConverter extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockMagicEnergyConverter(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.magicenergyconverter");
|
||||
setUnlocalizedName("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");
|
||||
}
|
||||
|
||||
@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,45 +1,17 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
||||
public class BlockPlasmaGenerator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockPlasmaGenerator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.plasmagenerator");
|
||||
setUnlocalizedName("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");
|
||||
}
|
||||
|
||||
@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,12 +1,8 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -15,18 +11,11 @@ import techreborn.tiles.TileSemifluidGenerator;
|
|||
|
||||
public class BlockSemiFluidGenerator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockSemiFluidGenerator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.semifluidgenerator");
|
||||
setUnlocalizedName("techreborn.semifluidgenerator");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -46,23 +35,6 @@ public class BlockSemiFluidGenerator extends BlockMachineBase {
|
|||
return true;
|
||||
}
|
||||
|
||||
@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");
|
||||
}
|
||||
|
||||
@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,12 +1,8 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -15,18 +11,11 @@ import techreborn.tiles.TileThermalGenerator;
|
|||
|
||||
public class BlockThermalGenerator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockThermalGenerator() {
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.thermalGenerator");
|
||||
setUnlocalizedName("techreborn.thermalGenerator");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -46,23 +35,4 @@ public class BlockThermalGenerator extends BlockMachineBase {
|
|||
return true;
|
||||
}
|
||||
|
||||
@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");
|
||||
}
|
||||
|
||||
@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,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,21 +11,10 @@ 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 iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockAlloyFurnace(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.alloyfurnace");
|
||||
setUnlocalizedName("techreborn.alloyfurnace");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,38 +31,4 @@ public class BlockAlloyFurnace extends BlockMachineBase {
|
|||
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");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,21 +11,10 @@ import techreborn.tiles.TileAlloySmelter;
|
|||
|
||||
public class BlockAlloySmelter extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockAlloySmelter(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.alloysmelter");
|
||||
setUnlocalizedName("techreborn.alloysmelter");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,38 +31,4 @@ public class BlockAlloySmelter extends BlockMachineBase {
|
|||
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/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
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,32 +11,12 @@ import techreborn.tiles.TileAssemblingMachine;
|
|||
|
||||
public class BlockAssemblingMachine extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockAssemblingMachine(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.assemblingmachine");
|
||||
setUnlocalizedName("techreborn.assemblingmachine");
|
||||
}
|
||||
|
||||
@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_) {
|
||||
|
@ -57,27 +32,4 @@ public class BlockAssemblingMachine extends BlockMachineBase {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,21 +11,10 @@ import techreborn.tiles.TileBlastFurnace;
|
|||
|
||||
public class BlockBlastFurnace extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockBlastFurnace(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.blastfurnace");
|
||||
setUnlocalizedName("techreborn.blastfurnace");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,43 +31,12 @@ public class BlockBlastFurnace extends BlockMachineBase {
|
|||
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_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
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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
|
||||
public boolean isAdvanced() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,24 +11,11 @@ import techreborn.tiles.TileCentrifuge;
|
|||
|
||||
public class BlockCentrifuge extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTopOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockCentrifuge() {
|
||||
super(Material.rock);
|
||||
setBlockName("techreborn.centrifuge");
|
||||
setUnlocalizedName("techreborn.centrifuge");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,47 +32,4 @@ public class BlockCentrifuge extends BlockMachineBase {
|
|||
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
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
if (side == 1) {
|
||||
return this.iconTopOn;
|
||||
} else if (side == 0) {
|
||||
return this.iconBottom;
|
||||
}
|
||||
return this.iconFrontOn;
|
||||
} else {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 0) {
|
||||
return this.iconBottom;
|
||||
}
|
||||
return this.iconFront;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.iconFront;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,21 +11,10 @@ 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 iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockChargeBench(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.chargebench");
|
||||
setUnlocalizedName("techreborn.chargebench");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -46,38 +30,6 @@ public class BlockChargeBench extends BlockMachineBase {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/chargeBench_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/chargeBench_side");
|
||||
this.iconFrontOn = icon.registerIcon("techreborn:machine/chargeBench_side");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/chargeBench_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/chargeBench_side");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,21 +11,11 @@ import techreborn.tiles.TileChemicalReactor;
|
|||
|
||||
public class BlockChemicalReactor extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockChemicalReactor(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.chemicalreactor");
|
||||
setUnlocalizedName("techreborn.chemicalreactor");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,38 +32,4 @@ public class BlockChemicalReactor extends BlockMachineBase {
|
|||
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/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
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,57 +1,12 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
||||
public class BlockDistillationTower extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
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 IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, 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));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
setUnlocalizedName("techreborn.distillationtower");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,24 +11,10 @@ import techreborn.tiles.TileGrinder;
|
|||
|
||||
public class BlockGrinder extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTopOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockGrinder(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.grinder");
|
||||
setUnlocalizedName("techreborn.grinder");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -53,38 +34,5 @@ public class BlockGrinder extends BlockMachineBase {
|
|||
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
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,21 +11,10 @@ import techreborn.tiles.TileImplosionCompressor;
|
|||
|
||||
public class BlockImplosionCompressor extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockImplosionCompressor(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.implosioncompressor");
|
||||
setUnlocalizedName("techreborn.implosioncompressor");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,42 +31,5 @@ public class BlockImplosionCompressor extends BlockMachineBase {
|
|||
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");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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
|
||||
public boolean isAdvanced() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,21 +11,10 @@ import techreborn.tiles.TileIndustrialElectrolyzer;
|
|||
|
||||
public class BlockIndustrialElectrolyzer extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockIndustrialElectrolyzer(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.industrialelectrolyzer");
|
||||
setUnlocalizedName("techreborn.industrialelectrolyzer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -47,39 +31,4 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase {
|
|||
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
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,21 +11,9 @@ import techreborn.tiles.TileIndustrialSawmill;
|
|||
|
||||
public class BlockIndustrialSawmill extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFrontOn;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockIndustrialSawmill(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.industrialsawmill");
|
||||
setUnlocalizedName("techreborn.industrialsawmill");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,43 +33,5 @@ public class BlockIndustrialSawmill extends BlockMachineBase {
|
|||
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");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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
|
||||
public boolean isAdvanced() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,15 +11,10 @@ import techreborn.tiles.TileMatterFabricator;
|
|||
|
||||
public class BlockMatterFabricator extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconOff;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconOn;
|
||||
|
||||
public BlockMatterFabricator(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.matterfabricator");
|
||||
setUnlocalizedName("techreborn.matterfabricator");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -41,32 +31,10 @@ public class BlockMatterFabricator extends BlockMachineBase {
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
return this.iconOn;
|
||||
} else {
|
||||
return this.iconOff;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAdvanced() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return iconOff;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon) {
|
||||
this.iconOn = icon.registerIcon("techreborn:machine/matter_fabricator_off");
|
||||
this.iconOff = icon.registerIcon("techreborn:machine/matter_fabricator_on");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,18 +11,11 @@ import techreborn.tiles.TileRollingMachine;
|
|||
|
||||
public class BlockRollingMachine extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockRollingMachine(Material material) {
|
||||
super(material.rock);
|
||||
setBlockName("techreborn.rollingmachine");
|
||||
setUnlocalizedName("techreborn.rollingmachine");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -44,33 +32,5 @@ public class BlockRollingMachine extends BlockMachineBase {
|
|||
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 IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, 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));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,54 +11,12 @@ import techreborn.tiles.TileVacuumFreezer;
|
|||
|
||||
public class BlockVacuumFreezer extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockVacuumFreezer(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.vacuumfreezer");
|
||||
setUnlocalizedName("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 IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, 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));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAdvanced() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if (side == 1) {
|
||||
return this.iconTop;
|
||||
} else if (side == 3) {
|
||||
return this.iconFront;
|
||||
} else {
|
||||
return this.blockIcon;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.storage;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,18 +11,11 @@ import techreborn.tiles.TileAesu;
|
|||
|
||||
public class BlockAesu extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockAesu(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.aesu");
|
||||
setUnlocalizedName("techreborn.aesu");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -44,27 +32,27 @@ public class BlockAesu extends BlockMachineBase {
|
|||
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 IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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
|
||||
// @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 IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
// int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
// if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
// 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));
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package techreborn.blocks.storage;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
|
@ -11,6 +9,8 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.client.GuiHandler;
|
||||
|
@ -29,7 +29,7 @@ public class BlockIDSU extends BlockMachineBase {
|
|||
|
||||
public BlockIDSU(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.idsu");
|
||||
setUnlocalizedName("techreborn.idsu");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package techreborn.blocks.storage;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
|
@ -16,41 +11,12 @@ import techreborn.tiles.lesu.TileLesu;
|
|||
|
||||
public class BlockLesu extends BlockMachineBase {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconFront;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconTop;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon iconBottom;
|
||||
|
||||
public BlockLesu(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.lesu");
|
||||
setUnlocalizedName("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");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
int metadata = getTileRotation(blockAccess, x, y, z);
|
||||
if (side == metadata && blockAccess.getBlockMetadata(x, y, z) == 1) {
|
||||
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_) {
|
||||
|
|
|
@ -1,71 +1,20 @@
|
|||
package techreborn.blocks.storage;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.client.texture.ConnectedTexture;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.client.texture.LesuConnectedTextureGenerator;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.tiles.lesu.TileLesuStorage;
|
||||
|
||||
public class BlockLesuStorage extends BlockMachineBase {
|
||||
|
||||
public IIcon[][] icons;
|
||||
|
||||
public BlockLesuStorage(Material material) {
|
||||
super(material);
|
||||
setBlockName("techreborn.lesustorage");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||
this.icons = new IIcon[1][16];
|
||||
// up down left right
|
||||
if (!ConfigTechReborn.useConnectedTextures) {
|
||||
for (int j = 0; j < 16; j++) {
|
||||
icons[0][j] = iconRegister.registerIcon("techreborn:" + "machine/lesu_block");
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
icons[i][0] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(true, true, true, true), iconRegister, 0, i);
|
||||
icons[i][1] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(true, false, true, true), iconRegister, 1, i);
|
||||
icons[i][2] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(false, true, true, true), iconRegister, 2, i);
|
||||
icons[i][3] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(true, true, true, false), iconRegister, 3, i);
|
||||
icons[i][4] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(true, true, false, true), iconRegister, 4, i);
|
||||
icons[i][5] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(true, true, false, false), iconRegister, 5, i);
|
||||
icons[i][6] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(false, false, true, true), iconRegister, 6, i);
|
||||
icons[i][7] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(false, true, false, true), iconRegister, 7, i);
|
||||
icons[i][8] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(false, true, true, false), iconRegister, 8, i);
|
||||
icons[i][9] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(true, false, false, true), iconRegister, 9, i);
|
||||
icons[i][10] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(true, false, true, false), iconRegister, 10, i);
|
||||
icons[i][11] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(false, true, false, false), iconRegister, 11, i);
|
||||
icons[i][12] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(true, false, false, false), iconRegister, 12, i);
|
||||
icons[i][13] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(false, false, false, true), iconRegister, 13, i);
|
||||
icons[i][14] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(false, false, true, false), iconRegister, 14, i);
|
||||
icons[i][15] = LesuConnectedTextureGenerator.genIcon(new ConnectedTexture(false, false, false, false), iconRegister, 15, i);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int side) {
|
||||
return getConnectedBlockTexture(blockAccess, x, y, z, side, icons[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return icons[0][0];
|
||||
setUnlocalizedName("techreborn.lesustorage");
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,313 +40,6 @@ public class BlockLesuStorage extends BlockMachineBase {
|
|||
return new TileLesuStorage();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This is taken from https://github.com/SlimeKnights/TinkersConstruct/blob/a7405a3d10318bb5c486ec75fb62897a8149d1a6/src/main/java/tconstruct/smeltery/blocks/GlassBlockConnected.java
|
||||
*/
|
||||
public IIcon getConnectedBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5, IIcon[] icons) {
|
||||
boolean isOpenUp = false, isOpenDown = false, isOpenLeft = false, isOpenRight = false;
|
||||
|
||||
switch (par5) {
|
||||
case 0:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[11];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[13];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[14];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[5];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[6];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[8];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[10];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[7];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[9];
|
||||
} else if (isOpenDown) {
|
||||
return icons[3];
|
||||
} else if (isOpenUp) {
|
||||
return icons[4];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[2];
|
||||
} else if (isOpenRight) {
|
||||
return icons[1];
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[11];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[13];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[14];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[5];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[6];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[8];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[10];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[7];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[9];
|
||||
} else if (isOpenDown) {
|
||||
return icons[3];
|
||||
} else if (isOpenUp) {
|
||||
return icons[4];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[2];
|
||||
} else if (isOpenRight) {
|
||||
return icons[1];
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[13];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[14];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[11];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[6];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[5];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[9];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[10];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[7];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[8];
|
||||
} else if (isOpenDown) {
|
||||
return icons[1];
|
||||
} else if (isOpenUp) {
|
||||
return icons[2];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[4];
|
||||
} else if (isOpenRight) {
|
||||
return icons[3];
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 - 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 - 1, par3, par4))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2 + 1, par3, par4), par1IBlockAccess.getBlockMetadata(par2 + 1, par3, par4))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[14];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[13];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[11];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[6];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[5];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[10];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[9];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[8];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[7];
|
||||
} else if (isOpenDown) {
|
||||
return icons[1];
|
||||
} else if (isOpenUp) {
|
||||
return icons[2];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[3];
|
||||
} else if (isOpenRight) {
|
||||
return icons[4];
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[14];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[13];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[11];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[6];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[5];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[10];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[9];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[8];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[7];
|
||||
} else if (isOpenDown) {
|
||||
return icons[1];
|
||||
} else if (isOpenUp) {
|
||||
return icons[2];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[3];
|
||||
} else if (isOpenRight) {
|
||||
return icons[4];
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 - 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 - 1, par4))) {
|
||||
isOpenDown = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3 + 1, par4), par1IBlockAccess.getBlockMetadata(par2, par3 + 1, par4))) {
|
||||
isOpenUp = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 - 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 - 1))) {
|
||||
isOpenLeft = true;
|
||||
}
|
||||
|
||||
if (shouldConnectToBlock(par1IBlockAccess, par2, par3, par4, par1IBlockAccess.getBlock(par2, par3, par4 + 1), par1IBlockAccess.getBlockMetadata(par2, par3, par4 + 1))) {
|
||||
isOpenRight = true;
|
||||
}
|
||||
|
||||
if (isOpenUp && isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[15];
|
||||
} else if (isOpenUp && isOpenDown && isOpenLeft) {
|
||||
return icons[13];
|
||||
} else if (isOpenUp && isOpenDown && isOpenRight) {
|
||||
return icons[14];
|
||||
} else if (isOpenUp && isOpenLeft && isOpenRight) {
|
||||
return icons[11];
|
||||
} else if (isOpenDown && isOpenLeft && isOpenRight) {
|
||||
return icons[12];
|
||||
} else if (isOpenDown && isOpenUp) {
|
||||
return icons[6];
|
||||
} else if (isOpenLeft && isOpenRight) {
|
||||
return icons[5];
|
||||
} else if (isOpenDown && isOpenLeft) {
|
||||
return icons[9];
|
||||
} else if (isOpenDown && isOpenRight) {
|
||||
return icons[10];
|
||||
} else if (isOpenUp && isOpenLeft) {
|
||||
return icons[7];
|
||||
} else if (isOpenUp && isOpenRight) {
|
||||
return icons[8];
|
||||
} else if (isOpenDown) {
|
||||
return icons[1];
|
||||
} else if (isOpenUp) {
|
||||
return icons[2];
|
||||
} else if (isOpenLeft) {
|
||||
return icons[4];
|
||||
} else if (isOpenRight) {
|
||||
return icons[3];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return icons[0];
|
||||
}
|
||||
|
||||
public boolean shouldConnectToBlock(IBlockAccess blockAccess, int x, int y, int z, Block block, int meta) {
|
||||
return block == (Block) this;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue