Added DieselGenerator
more texture stuff
This commit is contained in:
parent
16cdb106c7
commit
8c7702c9dc
8 changed files with 79 additions and 24 deletions
|
@ -38,22 +38,6 @@ public class BlockAssemblingMachine extends BlockMachineBase {
|
|||
setBlockName("techreborn.assemblingmachine");
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int p_149915_2_)
|
||||
{
|
||||
return new TileAlloySmelter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z,
|
||||
EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
if (!player.isSneaking())
|
||||
player.openGui(Core.INSTANCE, GuiHandler.alloySmelterID, world, x, y,
|
||||
z);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
|
@ -67,7 +51,6 @@ public class BlockAssemblingMachine extends BlockMachineBase {
|
|||
@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
|
||||
|
|
62
src/main/java/techreborn/blocks/BlockDieselGenerator.java
Normal file
62
src/main/java/techreborn/blocks/BlockDieselGenerator.java
Normal 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 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");
|
||||
}
|
||||
|
||||
@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.iconTop = icon.registerIcon("techreborn:machine/diesel_generator_top_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int metadata)
|
||||
{
|
||||
|
||||
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));
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -45,7 +45,7 @@ public class BlockDragonEggSiphoner extends BlockMachineBase {
|
|||
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/dragon_egg_energy_siphon_side_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -58,7 +58,7 @@ public class BlockGrinder extends BlockMachineBase{
|
|||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/industrial_grinder_front_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/industrial_grinder_top_off");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -58,7 +58,7 @@ public class BlockImplosionCompressor extends BlockMachineBase{
|
|||
this.blockIcon = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconFront = icon.registerIcon("techreborn:machine/implosion_compressor_front_off");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/advanced_machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/machine_side");
|
||||
this.iconBottom = icon.registerIcon("techreborn:machine/implosion_compressor_bottom");
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -42,9 +42,9 @@ public class BlockMagicEnergyConverter extends BlockMachineBase {
|
|||
@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_converter_front on");
|
||||
this.iconTop = icon.registerIcon("techreborn:machine/magic_energy_absorber_top");
|
||||
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");
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public class BlockRollingMachine extends BlockMachineBase {
|
|||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister icon)
|
||||
{
|
||||
this.blockIcon = icon.registerIcon("techreborn:machine/rolling_machine_side_off");
|
||||
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");
|
||||
|
|
|
@ -5,9 +5,11 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import techreborn.blocks.BlockAlloySmelter;
|
||||
import techreborn.blocks.BlockAssemblingMachine;
|
||||
import techreborn.blocks.BlockBlastFurnace;
|
||||
import techreborn.blocks.BlockCentrifuge;
|
||||
import techreborn.blocks.BlockChunkLoader;
|
||||
import techreborn.blocks.BlockDieselGenerator;
|
||||
import techreborn.blocks.BlockDragonEggSiphoner;
|
||||
import techreborn.blocks.BlockGrinder;
|
||||
import techreborn.blocks.BlockHighlyAdvancedMachine;
|
||||
|
@ -59,6 +61,8 @@ public class ModBlocks {
|
|||
public static Block HighAdvancedMachineBlock;
|
||||
public static Block Dragoneggenergysiphoner;
|
||||
public static Block Magicenergeyconverter;
|
||||
public static Block AssemblyMachine;
|
||||
public static Block DieselGenerator;
|
||||
|
||||
public static Block ore;
|
||||
public static Block storage;
|
||||
|
@ -142,6 +146,12 @@ public class ModBlocks {
|
|||
|
||||
Magicenergeyconverter = new BlockMagicEnergyConverter(Material.rock);
|
||||
GameRegistry.registerBlock(Magicenergeyconverter, "magicenergyconverter");
|
||||
|
||||
AssemblyMachine = new BlockAssemblingMachine(Material.rock);
|
||||
GameRegistry.registerBlock(AssemblyMachine, "assemblymachine");
|
||||
|
||||
DieselGenerator = new BlockDieselGenerator(Material.rock);
|
||||
GameRegistry.registerBlock(DieselGenerator, "dieselgenerator");
|
||||
|
||||
registerOreDict();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue