859
This commit is contained in:
parent
b88fe49ee2
commit
30879a534a
107 changed files with 265 additions and 2518 deletions
|
@ -1,7 +1,9 @@
|
|||
package techreborn;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
|
@ -10,8 +12,6 @@ import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
|||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import org.apache.commons.lang3.time.StopWatch;
|
||||
import reborncore.common.multiblock.MultiblockEventHandler;
|
||||
import reborncore.common.multiblock.MultiblockServerTickHandler;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.achievement;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.PlayerEvent.ItemCraftedEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.PlayerEvent.ItemPickupEvent;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import reborncore.common.achievement.ICraftAchievement;
|
||||
import reborncore.common.achievement.IPickupAchievement;
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package techreborn.achievement;
|
||||
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraftforge.common.AchievementPage;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package techreborn.client;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.network.IGuiHandler;
|
||||
import techreborn.client.container.*;
|
||||
import techreborn.client.gui.*;
|
||||
import techreborn.pda.GuiManual;
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package techreborn.client;
|
||||
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
|
||||
//TODO recode for 1.8
|
||||
public class IconSupplier {
|
||||
// public static IIcon insulatedCopperCable;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package techreborn.client;
|
||||
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.event.entity.player.ItemTooltipEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import reborncore.api.IListInfoProvider;
|
||||
import reborncore.common.util.Color;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package techreborn.client;
|
||||
|
||||
import net.minecraftforge.fml.client.GuiModList;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.event.GuiScreenEvent;
|
||||
import net.minecraftforge.fml.client.GuiModList;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import reborncore.client.gui.GuiUtil;
|
||||
import techreborn.Core;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import techreborn.tiles.TileAesu;
|
||||
|
||||
|
|
|
@ -61,8 +61,8 @@ public class ContainerBlastFurnace extends ContainerCrafting {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
public void onCraftGuiOpened(ICrafting crafting) {
|
||||
super.onCraftGuiOpened(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 10, tile.getHeat());
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import techreborn.api.recipe.RecipeCrafter;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotFake;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import techreborn.tiles.fusionReactor.TileEntityFusionController;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import techreborn.tiles.idsu.TileIDSU;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.tiles.lesu.TileLesu;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import techreborn.tiles.TileMatterFabricator;
|
||||
|
|
|
@ -5,7 +5,6 @@ import net.minecraft.inventory.ICrafting;
|
|||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import reborncore.client.gui.SlotFake;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import reborncore.common.container.RebornContainer;
|
||||
import techreborn.api.RollingMachineRecipe;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.client.container;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.client.gui.SlotOutput;
|
||||
import techreborn.tiles.TileVacuumFreezer;
|
||||
|
||||
|
@ -60,8 +60,8 @@ public class ContainerVacuumFreezer extends ContainerCrafting {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addCraftingToCrafters(ICrafting crafting) {
|
||||
super.addCraftingToCrafters(crafting);
|
||||
public void onCraftGuiOpened(ICrafting crafting) {
|
||||
super.onCraftGuiOpened(crafting);
|
||||
crafting.sendProgressBarUpdate(this, 3, tile.multiBlockStatus);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,9 +4,9 @@ import net.minecraft.client.gui.GuiButton;
|
|||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.client.gui.GuiUtil;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import reborncore.client.multiblock.MultiblockSet;
|
||||
|
|
|
@ -4,16 +4,14 @@ import net.minecraft.client.gui.GuiButton;
|
|||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.client.multiblock.Multiblock;
|
||||
import reborncore.client.multiblock.MultiblockSet;
|
||||
import reborncore.common.misc.Location;
|
||||
import reborncore.common.multiblock.CoordTriplet;
|
||||
import techreborn.client.ClientMultiBlocks;
|
||||
import techreborn.client.container.ContainerFusionReactor;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.proxies.ClientProxy;
|
||||
import techreborn.tiles.fusionReactor.TileEntityFusionController;
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package techreborn.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
|
|
@ -6,7 +6,6 @@ import net.minecraft.client.resources.I18n;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.client.gui.GuiUtil;
|
||||
import reborncore.client.multiblock.MultiblockSet;
|
||||
import reborncore.common.misc.Location;
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
package techreborn.client.hud;
|
||||
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import reborncore.common.util.Color;
|
||||
import techreborn.api.power.IEnergyInterfaceItem;
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package techreborn.client.texture;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.IResource;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.client.resources.data.AnimationMetadataSection;
|
||||
|
|
|
@ -2,7 +2,6 @@ package techreborn.client.texture;
|
|||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.IResource;
|
||||
import net.minecraft.client.resources.IResourceManager;
|
||||
import net.minecraft.client.resources.data.AnimationMetadataSection;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package techreborn.config;
|
||||
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
package techreborn.config;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.fml.client.config.DummyConfigElement;
|
||||
import net.minecraftforge.fml.client.config.GuiConfig;
|
||||
import net.minecraftforge.fml.client.config.GuiConfigEntries;
|
||||
import net.minecraftforge.fml.client.config.GuiConfigEntries.CategoryEntry;
|
||||
import net.minecraftforge.fml.client.config.IConfigElement;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package techreborn.config;
|
||||
|
||||
import net.minecraftforge.fml.client.IModGuiFactory;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.fml.client.IModGuiFactory;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.events;
|
||||
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package techreborn.events;
|
||||
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
public class TRTickHandler {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.init;
|
||||
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.*;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.init;
|
||||
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import reborncore.api.fuel.FluidPowerManager;
|
||||
import techreborn.blocks.fluid.BlockFluidTechReborn;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package techreborn.init;
|
||||
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import reborncore.common.util.BucketHandler;
|
||||
import techreborn.Core;
|
||||
import techreborn.events.OreUnifier;
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package techreborn.init;
|
||||
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class ModParts {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package techreborn.init;
|
||||
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import reborncore.common.util.CraftingHelper;
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
package techreborn.itemblocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.tiles.TileAesu;
|
||||
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package techreborn.itemblocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.init.ModBlocks;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.tiles.TileDigitalChest;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
package techreborn.itemblocks;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.init.ModBlocks;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.tiles.TileQuantumChest;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
@ -8,7 +8,6 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.tiles.TileQuantumTank;
|
||||
|
||||
public class ItemBlockQuantumTank extends ItemBlock {
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
package techreborn.items;
|
||||
|
||||
import ic2.api.item.IC2Items;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidContainerItem;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModItems;
|
||||
|
||||
|
@ -18,6 +14,8 @@ import java.util.List;
|
|||
|
||||
public class ItemCells extends ItemTR {
|
||||
|
||||
public static final PropertyEnum<EnumCells> VARIANT_PROP = PropertyEnum.create("variant", EnumCells.class);
|
||||
|
||||
public static ItemStack getCellByName(String name, int count) {
|
||||
return getCellByName(name, count, true);
|
||||
}
|
||||
|
@ -25,19 +23,19 @@ public class ItemCells extends ItemTR {
|
|||
|
||||
public static ItemStack getCellByName(String name, int count, boolean lookForIC2) {
|
||||
Fluid fluid = FluidRegistry.getFluid("fluid" + name.toLowerCase());
|
||||
if (lookForIC2 && IC2Items.getItem("FluidCell") != null) {
|
||||
if (fluid != null) {
|
||||
ItemStack stack = IC2Items.getItem("FluidCell").copy();
|
||||
if (stack != null && stack.getItem() instanceof IFluidContainerItem) {
|
||||
IFluidContainerItem containerItem = (IFluidContainerItem) stack.getItem();
|
||||
containerItem.fill(stack, new FluidStack(fluid.getID(), 2147483647), true);
|
||||
stack.stackSize = count;
|
||||
return stack;
|
||||
}
|
||||
} else {
|
||||
Core.logHelper.debug("Could not find " + "fluid" + name + " in the fluid registry!");
|
||||
}
|
||||
}
|
||||
// if (lookForIC2 && IC2Items.getItem("FluidCell") != null) {
|
||||
// if (fluid != null) {
|
||||
// ItemStack stack = IC2Items.getItem("FluidCell").copy();
|
||||
// if (stack != null && stack.getItem() instanceof IFluidContainerItem) {
|
||||
// IFluidContainerItem containerItem = (IFluidContainerItem) stack.getItem();
|
||||
// containerItem.fill(stack, new FluidStack(fluid.getID(), 2147483647), true);
|
||||
// stack.stackSize = count;
|
||||
// return stack;
|
||||
// }
|
||||
// } else {
|
||||
// Core.logHelper.debug("Could not find " + "fluid" + name + " in the fluid registry!");
|
||||
// }
|
||||
// } //TODO ic2
|
||||
int index = -1;
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equals(name)) {
|
||||
|
@ -61,7 +59,70 @@ public class ItemCells extends ItemTR {
|
|||
"seedOil", "silicon", "sodium", "sodiumPersulfate",
|
||||
"sodiumSulfide", "sulfur", "sulfuricAcid", "tritium", "wolframium", "empty"};
|
||||
|
||||
private IIcon[] textures;
|
||||
|
||||
public enum EnumCells implements IStringSerializable{
|
||||
Berylium(0, "Berylium"),
|
||||
biomass(1, "biomass"),
|
||||
calciumCarbonate(2, "calciumCarbonate"),
|
||||
calcium(3, "calcium"),
|
||||
carbon(4, "carbon"),
|
||||
chlorine(0, "chlorine"),
|
||||
deuterium(0, "deuterium"),
|
||||
diesel(0, "diesel"),
|
||||
ethanol(0, "ethanol"),
|
||||
glyceryl(0, "glyceryl"),
|
||||
helium3(0, "helium3"),
|
||||
helium(0, "helium"),
|
||||
heliumPlasma(0, "heliumPlasma"),
|
||||
hydrogen(0, "hydrogen"),
|
||||
ice(0, "ice"),
|
||||
lithium(0, "lithium"),
|
||||
mercury(0, "mercury"),
|
||||
methane(0, "methane"),
|
||||
nitrocarbon(0, "nitrocarbon"),
|
||||
nitroCoalfuel(0, "nitroCoalfuel"),
|
||||
nitroDiesel(0, "nitroDiesel"),
|
||||
nitrogen(0, "nitrogen"),
|
||||
nitrogenDioxide(0, "nitrogenDioxide"),
|
||||
oil(0, "oil"),
|
||||
potassium(0, "potassium"),
|
||||
seedOil(0, "seedOil"),
|
||||
silicon(0, "silicon"),
|
||||
sodium(0, "sodium"),
|
||||
sodiumPersulfate(0, "sodiumPersulfate"),
|
||||
sodiumSulfide(0, "sodiumSulfide"),
|
||||
sulfur(0, "sulfur"),
|
||||
tritium(0, "tritium"),
|
||||
wolframium(0, "wolframium"),
|
||||
empty(0, "empty");
|
||||
|
||||
private static final EnumCells[] META_LOOKUP = new EnumCells[values().length];
|
||||
private final int meta;
|
||||
private final String name;
|
||||
|
||||
private EnumCells(int meta, String name)
|
||||
{
|
||||
this.meta = meta;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public int getMeta() {
|
||||
return meta;
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
for (EnumCells cells : values())
|
||||
{
|
||||
META_LOOKUP[cells.getMeta()] = cells;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ItemCells() {
|
||||
setUnlocalizedName("techreborn.cell");
|
||||
|
@ -69,26 +130,6 @@ public class ItemCells extends ItemTR {
|
|||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "cells/"
|
||||
+ types[i] + "Cell");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.api.power.IEnergyItemInfo;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
public class ItemTR extends Item {
|
||||
|
||||
|
@ -12,8 +10,4 @@ public class ItemTR extends Item {
|
|||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
itemIcon = iconRegister.registerIcon(ModInfo.MOD_ID + ":" + getUnlocalizedName().toLowerCase().substring(5));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
|
||||
public class ItemUUmatter extends Item {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package techreborn.items.armor;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.api.power.IEnergyItemInfo;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package techreborn.items.armor;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.api.power.IEnergyItemInfo;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import ic2.api.item.ElectricItem;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
|
@ -13,6 +11,8 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.util.TorchHelper;
|
||||
import techreborn.api.power.IEnergyItemInfo;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
@ -10,6 +8,8 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.api.power.IEnergyItemInfo;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBucket;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.client.TechRebornCreativeTabMisc;
|
||||
|
||||
public class ItemFluidbucket extends ItemBucket {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import techreborn.items.ItemTR;
|
||||
|
||||
public class ItemHammer extends ItemTR {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -13,6 +11,8 @@ import net.minecraft.item.ItemPickaxe;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.util.TorchHelper;
|
||||
import techreborn.api.power.IEnergyItemInfo;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
|
@ -12,6 +10,8 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import reborncore.common.util.Color;
|
||||
import techreborn.api.power.IEnergyItemInfo;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package techreborn.pda;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
package techreborn.pda.util;
|
||||
|
||||
import net.minecraftforge.fml.client.config.GuiButtonExt;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.client.config.GuiButtonExt;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.awt.*;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue