Added Machine casings
Added more textures
|
@ -1,9 +1,13 @@
|
||||||
package techreborn.blocks;
|
package techreborn.blocks;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import techreborn.Core;
|
import techreborn.Core;
|
||||||
import techreborn.client.GuiHandler;
|
import techreborn.client.GuiHandler;
|
||||||
|
@ -11,6 +15,11 @@ import techreborn.tiles.TileCentrifuge;
|
||||||
|
|
||||||
public class BlockCentrifuge extends BlockContainer {
|
public class BlockCentrifuge extends BlockContainer {
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
private IIcon top;
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
private IIcon other;
|
||||||
|
|
||||||
public BlockCentrifuge() {
|
public BlockCentrifuge() {
|
||||||
super(Material.piston);
|
super(Material.piston);
|
||||||
setHardness(2F);
|
setHardness(2F);
|
||||||
|
@ -27,5 +36,23 @@ public class BlockCentrifuge extends BlockContainer {
|
||||||
player.openGui(Core.INSTANCE, GuiHandler.centrifugeID, world, x, y, z);
|
player.openGui(Core.INSTANCE, GuiHandler.centrifugeID, world, x, y, z);
|
||||||
return true;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
74
src/main/java/techreborn/blocks/BlockMachineCasing.java
Normal 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];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -44,7 +44,7 @@ public class BlockRollingMachine extends BlockContainer {
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister icon) {
|
public void registerBlockIcons(IIconRegister icon) {
|
||||||
top = icon.registerIcon("techreborn:machine/rollingmachine_top");
|
top = icon.registerIcon("techreborn:machine/rollingmachine_top");
|
||||||
other = icon.registerIcon("techreborn:machine/rollingmachine_side");
|
other = icon.registerIcon("techreborn:machine/machine_side");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
package techreborn.compat.recipes;
|
||||||
|
|
||||||
|
public class ThermalExpansion {
|
||||||
|
//TODO remove basic machine frame recipe
|
||||||
|
//TODO replace iron in recipe to steel
|
||||||
|
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.oredict.OreDictionary;
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
import techreborn.blocks.*;
|
import techreborn.blocks.*;
|
||||||
import techreborn.client.TechRebornCreativeTab;
|
import techreborn.client.TechRebornCreativeTab;
|
||||||
|
import techreborn.itemblocks.ItemBlockMachineCasing;
|
||||||
import techreborn.itemblocks.ItemBlockOre;
|
import techreborn.itemblocks.ItemBlockOre;
|
||||||
import techreborn.itemblocks.ItemBlockQuantumChest;
|
import techreborn.itemblocks.ItemBlockQuantumChest;
|
||||||
import techreborn.itemblocks.ItemBlockQuantumTank;
|
import techreborn.itemblocks.ItemBlockQuantumTank;
|
||||||
|
@ -21,6 +22,7 @@ public class ModBlocks {
|
||||||
public static Block quantumChest;
|
public static Block quantumChest;
|
||||||
public static Block centrifuge;
|
public static Block centrifuge;
|
||||||
public static Block RollingMachine;
|
public static Block RollingMachine;
|
||||||
|
public static Block MachineCasing;
|
||||||
|
|
||||||
public static Block ore;
|
public static Block ore;
|
||||||
public static Block storage;
|
public static Block storage;
|
||||||
|
@ -45,7 +47,9 @@ public class ModBlocks {
|
||||||
RollingMachine = new BlockRollingMachine(Material.piston);
|
RollingMachine = new BlockRollingMachine(Material.piston);
|
||||||
GameRegistry.registerBlock(RollingMachine, "rollingmachine");
|
GameRegistry.registerBlock(RollingMachine, "rollingmachine");
|
||||||
GameRegistry.registerTileEntity(TileRollingMachine.class, "TileRollingMachine");
|
GameRegistry.registerTileEntity(TileRollingMachine.class, "TileRollingMachine");
|
||||||
|
|
||||||
|
MachineCasing = new BlockMachineCasing(Material.piston);
|
||||||
|
GameRegistry.registerBlock(MachineCasing, ItemBlockMachineCasing.class, "machinecasing");
|
||||||
|
|
||||||
ore = new BlockOre(Material.rock);
|
ore = new BlockOre(Material.rock);
|
||||||
GameRegistry.registerBlock(ore, ItemBlockOre.class, "techreborn.ore");
|
GameRegistry.registerBlock(ore, ItemBlockOre.class, "techreborn.ore");
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -13,11 +13,11 @@ import java.util.List;
|
||||||
public class ItemCells extends ItemTR {
|
public class ItemCells extends ItemTR {
|
||||||
public static final String[] types = new String[]
|
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",
|
"diesel", "ethanol", "glyceryl", "helium3", "helium", "heliumPlasma", "hydrogen", "ice", "lithium",
|
||||||
"mercury", "methane", "nitrocarbon", "nitroCoalfuel", "nitroDiesel", "nitrogen", "nitrogenDioxide", "oil",
|
"mercury", "methane", "nitrocarbon", "nitroCoalfuel", "nitroDiesel", "nitrogen", "nitrogenDioxide", "oil",
|
||||||
"potassium", "seedOil", "silicon", "sodium", "sodiumPersulfate", "sodiumSulfide", "sulfur", "sulfuricAcid",
|
"potassium", "seedOil", "silicon", "sodium", "sodiumPersulfate", "sodiumSulfide", "sulfur", "sulfuricAcid",
|
||||||
"sulfuricAcid", "wolframium",
|
"wolframium",
|
||||||
};
|
};
|
||||||
|
|
||||||
private IIcon[] textures;
|
private IIcon[] textures;
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
itemGroup.techreborn=Tech Reborn
|
itemGroup.techreborn=Tech Reborn
|
||||||
|
|
||||||
|
#machines
|
||||||
tile.techreborn.thermalGenerator.name=Thermal Generator
|
tile.techreborn.thermalGenerator.name=Thermal Generator
|
||||||
tile.techreborn.quantumTank.name=Quantum Tank
|
tile.techreborn.quantumTank.name=Quantum Tank
|
||||||
tile.techreborn.quantumChest.name=Quantum Chest
|
tile.techreborn.quantumChest.name=Quantum Chest
|
||||||
tile.techreborn.centrifuge.name=Centrifuge
|
tile.techreborn.centrifuge.name=Centrifuge
|
||||||
tile.techreborn.rollingmachine.name=Rolling machine
|
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
|
#Ores
|
||||||
tile.techreborn.ore.Galena.name=Galena Ore
|
tile.techreborn.ore.Galena.name=Galena Ore
|
||||||
|
|
After Width: | Height: | Size: 822 B |
After Width: | Height: | Size: 635 B |
After Width: | Height: | Size: 472 B |
After Width: | Height: | Size: 574 B |
After Width: | Height: | Size: 601 B |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 412 B |
After Width: | Height: | Size: 609 B |
After Width: | Height: | Size: 611 B |
After Width: | Height: | Size: 822 B |
After Width: | Height: | Size: 822 B |
After Width: | Height: | Size: 680 B |
After Width: | Height: | Size: 697 B |
After Width: | Height: | Size: 822 B |
After Width: | Height: | Size: 713 B |
After Width: | Height: | Size: 725 B |
After Width: | Height: | Size: 584 B |
After Width: | Height: | Size: 674 B |
After Width: | Height: | Size: 652 B |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 492 B |
After Width: | Height: | Size: 459 B |
After Width: | Height: | Size: 644 B |
After Width: | Height: | Size: 1.8 KiB |
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"animation":{
|
||||||
|
"frametime":4
|
||||||
|
}
|
||||||
|
}
|
After Width: | Height: | Size: 660 B |
After Width: | Height: | Size: 645 B |
After Width: | Height: | Size: 497 B |
After Width: | Height: | Size: 519 B |
After Width: | Height: | Size: 507 B |
After Width: | Height: | Size: 657 B |
After Width: | Height: | Size: 632 B |
After Width: | Height: | Size: 603 B |