Added magicrnergyabsorber

This commit is contained in:
Gig 2015-05-03 23:09:13 +01:00
parent 7e8ab75b3e
commit afc750993c
5 changed files with 72 additions and 5 deletions

View file

@ -45,7 +45,7 @@ public class BlockAssemblingMachine extends BlockMachineBase {
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
this.iconFront = icon.registerIcon("techreborn:machine/assembling_machine_front_off");
this.iconTop = icon.registerIcon("techreborn:machine/assembling_machine_top");
this.iconBottom = icon.registerIcon("techreborn:machine/machine_side");
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
}
@SideOnly(Side.CLIENT)

View file

@ -42,7 +42,7 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase {
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister icon)
{
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
this.blockIcon = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_off");
this.iconFront = icon.registerIcon("techreborn:machine/industrial_electrolyzer_front_off");
this.iconTop = icon.registerIcon("techreborn:machine/machine_top");
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");

View file

@ -0,0 +1,62 @@
package techreborn.blocks;
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 net.minecraftforge.common.util.ForgeDirection;
import techreborn.Core;
import techreborn.client.GuiHandler;
import techreborn.client.TechRebornCreativeTab;
import techreborn.tiles.TileAlloySmelter;
import techreborn.tiles.TileBlastFurnace;
import techreborn.tiles.TileMachineCasing;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
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.magicrnergyabsorber");
}
@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));
}
}

View file

@ -43,9 +43,9 @@ public class BlockMagicEnergyConverter extends BlockMachineBase {
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");
this.iconTop = icon.registerIcon("techreborn:machine/magic_energy_converter_side");
this.iconBottom = icon.registerIcon("techreborn:machine/magic_energy_absorber_bottom");
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)

View file

@ -16,6 +16,7 @@ import techreborn.blocks.BlockHighlyAdvancedMachine;
import techreborn.blocks.BlockImplosionCompressor;
import techreborn.blocks.BlockIndustrialElectrolyzer;
import techreborn.blocks.BlockMachineCasing;
import techreborn.blocks.BlockMagicEnergyAbsorber;
import techreborn.blocks.BlockMagicEnergyConverter;
import techreborn.blocks.BlockMatterFabricator;
import techreborn.blocks.BlockOre;
@ -65,6 +66,7 @@ public class ModBlocks {
public static Block AssemblyMachine;
public static Block DieselGenerator;
public static Block IndustrialElectrolyzer;
public static Block MagicalAbsorber;
public static Block ore;
public static Block storage;
@ -157,6 +159,9 @@ public class ModBlocks {
IndustrialElectrolyzer = new BlockIndustrialElectrolyzer(Material.rock);
GameRegistry.registerBlock(IndustrialElectrolyzer, "industrialelectrolyzer");
MagicalAbsorber = new BlockMagicEnergyAbsorber(Material.rock);
GameRegistry.registerBlock(MagicalAbsorber, "magicrnergyabsorber");
registerOreDict();
}