Added Machine casings

Added more textures
This commit is contained in:
Gig 2015-04-17 00:15:33 +01:00
parent 3c87b1ad1d
commit 4a3214320c
41 changed files with 140 additions and 5 deletions

View file

@ -1,9 +1,13 @@
package techreborn.blocks;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.BlockContainer;
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;
@ -11,6 +15,11 @@ import techreborn.tiles.TileCentrifuge;
public class BlockCentrifuge extends BlockContainer {
@SideOnly(Side.CLIENT)
private IIcon top;
@SideOnly(Side.CLIENT)
private IIcon other;
public BlockCentrifuge() {
super(Material.piston);
setHardness(2F);
@ -27,5 +36,23 @@ public class BlockCentrifuge extends BlockContainer {
player.openGui(Core.INSTANCE, GuiHandler.centrifugeID, world, x, y, z);
return true;
}
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister icon) {
top = icon.registerIcon("techreborn:machine/industrial_grinder_top_on");
other = icon.registerIcon("techreborn:machine/machine_side");
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int currentSide, int meta) {
if (currentSide == 1) {
return top;
} else {
return other;
}
}
}

View file

@ -0,0 +1,74 @@
package techreborn.blocks;
import java.util.List;
import java.util.Random;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import techreborn.client.TechRebornCreativeTab;
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.minecraftforge.common.util.ForgeDirection;
public class BlockMachineCasing extends Block{
public static final String[] types = new String[] {"Standard", "Reinforced", "Advanced"};
private IIcon[] textures;
public BlockMachineCasing(Material material)
{
super(material);
setCreativeTab(TechRebornCreativeTab.instance);
setBlockName("techreborn.machineCasing");
setHardness(2F);
}
@Override
public Item getItemDropped(int meta, Random random, int fortune) {
return Item.getItemFromBlock(this);
}
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List list) {
for (int meta = 0; meta < types.length; meta++) {
list.add(new ItemStack(item, 1, meta));
}
}
@Override
public int damageDropped(int metaData) {
//TODO RubyOre Returns Rubys
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/casing" + types[i]);
}
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getIcon(int side, int metaData) {
metaData = MathHelper.clamp_int(metaData, 0, types.length - 1);
if (ForgeDirection.getOrientation(side) == ForgeDirection.UP
|| ForgeDirection.getOrientation(side) == ForgeDirection.DOWN) {
return textures[metaData];
} else {
return textures[metaData];
}
}
}

View file

@ -44,7 +44,7 @@ public class BlockRollingMachine extends BlockContainer {
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister icon) {
top = icon.registerIcon("techreborn:machine/rollingmachine_top");
other = icon.registerIcon("techreborn:machine/rollingmachine_side");
other = icon.registerIcon("techreborn:machine/machine_side");
}
@Override

View file

@ -0,0 +1,7 @@
package techreborn.compat.recipes;
public class ThermalExpansion {
//TODO remove basic machine frame recipe
//TODO replace iron in recipe to steel
}

View file

@ -7,6 +7,7 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import techreborn.blocks.*;
import techreborn.client.TechRebornCreativeTab;
import techreborn.itemblocks.ItemBlockMachineCasing;
import techreborn.itemblocks.ItemBlockOre;
import techreborn.itemblocks.ItemBlockQuantumChest;
import techreborn.itemblocks.ItemBlockQuantumTank;
@ -21,6 +22,7 @@ public class ModBlocks {
public static Block quantumChest;
public static Block centrifuge;
public static Block RollingMachine;
public static Block MachineCasing;
public static Block ore;
public static Block storage;
@ -45,7 +47,9 @@ public class ModBlocks {
RollingMachine = new BlockRollingMachine(Material.piston);
GameRegistry.registerBlock(RollingMachine, "rollingmachine");
GameRegistry.registerTileEntity(TileRollingMachine.class, "TileRollingMachine");
MachineCasing = new BlockMachineCasing(Material.piston);
GameRegistry.registerBlock(MachineCasing, ItemBlockMachineCasing.class, "machinecasing");
ore = new BlockOre(Material.rock);
GameRegistry.registerBlock(ore, ItemBlockOre.class, "techreborn.ore");

View file

@ -0,0 +1,15 @@
package techreborn.itemblocks;
import net.minecraft.block.Block;
import net.minecraft.item.ItemMultiTexture;
import techreborn.blocks.BlockMachineCasing;
import techreborn.blocks.BlockOre;
import techreborn.init.ModBlocks;
public class ItemBlockMachineCasing extends ItemMultiTexture {
public ItemBlockMachineCasing(Block block) {
super(ModBlocks.MachineCasing, ModBlocks.MachineCasing, BlockMachineCasing.types);
}
}

View file

@ -13,11 +13,11 @@ import java.util.List;
public class ItemCells extends ItemTR {
public static final String[] types = new String[]
{
"Berylium", "biomass", "calciumCarbonate", "calcium", "carbon", "carbon", "chlorine", "deuterium",
"Berylium", "biomass", "calciumCarbonate", "calcium", "carbon", "chlorine", "deuterium",
"diesel", "ethanol", "glyceryl", "helium3", "helium", "heliumPlasma", "hydrogen", "ice", "lithium",
"mercury", "methane", "nitrocarbon", "nitroCoalfuel", "nitroDiesel", "nitrogen", "nitrogenDioxide", "oil",
"potassium", "seedOil", "silicon", "sodium", "sodiumPersulfate", "sodiumSulfide", "sulfur", "sulfuricAcid",
"sulfuricAcid", "wolframium",
"wolframium",
};
private IIcon[] textures;

View file

@ -1,11 +1,14 @@
itemGroup.techreborn=Tech Reborn
#machines
tile.techreborn.thermalGenerator.name=Thermal Generator
tile.techreborn.quantumTank.name=Quantum Tank
tile.techreborn.quantumChest.name=Quantum Chest
tile.techreborn.centrifuge.name=Centrifuge
tile.techreborn.rollingmachine.name=Rolling machine
tile.techreborn.machineCasing.Standard.name=Standard Casing
tile.techreborn.machineCasing.Reinforced.name=Reinforced Casing
tile.techreborn.machineCasing.Advanced.name=Advanced Casing
#Ores
tile.techreborn.ore.Galena.name=Galena Ore

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 472 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 601 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 584 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,5 @@
{
"animation":{
"frametime":4
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 497 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B