Refactored name of class from machine part to Industrial Stone at request of dark

Moved industrial stone class from resources to its own block packaged
Added recipe class for all industrial stone blocks all but 2 industrial blocks can be crafted
Changed localized names to match updated class
This commit is contained in:
Zerotheliger 2014-05-30 04:44:03 -07:00
parent 593029c815
commit 2a7ddce1aa
6 changed files with 108 additions and 46 deletions

View file

@ -45,14 +45,14 @@ public class RenderMultimeter implements ISimpleItemRenderer
GL11.glRotatef(90, 1, 0, 0);
RenderUtility.bind(TextureMap.locationBlocksTexture);
// Render the main panel
RenderUtility.renderCube(-0.5, -0.05, -0.5, 0.5, 0.05, 0.5, ResonantInduction.blockMachinePart, RenderUtility.loadedIconMap.get(Reference.PREFIX + "multimeter_screen"));
RenderUtility.renderCube(-0.5, -0.05, -0.5, 0.5, 0.05, 0.5, ResonantInduction.blockIndustrialStone, RenderUtility.loadedIconMap.get(Reference.PREFIX + "multimeter_screen"));
ForgeDirection dir = ForgeDirection.NORTH;
final int metadata = 8;
// Render edges
// UP
RenderUtility.renderCube(-0.501, -0.0501, -0.501, 0.501, 0.0501, -0.44, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, -0.501, 0.501, 0.0501, -0.44, ResonantInduction.blockIndustrialStone, null, metadata);
// DOWN
RenderUtility.renderCube(-0.501, -0.0501, 0.44, 0.501, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, 0.44, 0.501, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
for (int i = 0; i < 6; i++)
{
@ -62,22 +62,22 @@ public class RenderMultimeter implements ISimpleItemRenderer
{
if (dir.offsetX != check.offsetZ)
{
RenderUtility.renderCube(-0.501, -0.0501, -0.501, -0.44, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, -0.501, -0.44, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
}
else if (dir.offsetX == check.offsetZ)
{
RenderUtility.renderCube(0.44, -0.0501, -0.501, 0.501, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(0.44, -0.0501, -0.501, 0.501, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
}
}
if (dir.offsetZ != 0 && check.offsetX != 0)
{
if (dir.offsetZ == check.offsetX)
{
RenderUtility.renderCube(-0.501, -0.0501, -0.501, -0.44, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, -0.501, -0.44, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
}
else if (dir.offsetZ != check.offsetX)
{
RenderUtility.renderCube(0.44, -0.0501, -0.501, 0.501, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(0.44, -0.0501, -0.501, 0.501, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
}
}
}
@ -97,7 +97,7 @@ public class RenderMultimeter implements ISimpleItemRenderer
RenderUtility.rotateFaceBlockToSideOutwards(part.getDirection().getOpposite());
RenderUtility.bind(TextureMap.locationBlocksTexture);
// Render the main panel
RenderUtility.renderCube(-0.5, -0.05, -0.5, 0.5, 0.05, 0.5, ResonantInduction.blockMachinePart, RenderUtility.loadedIconMap.get(Reference.PREFIX + "multimeter_screen"));
RenderUtility.renderCube(-0.5, -0.05, -0.5, 0.5, 0.05, 0.5, ResonantInduction.blockIndustrialStone, RenderUtility.loadedIconMap.get(Reference.PREFIX + "multimeter_screen"));
final int metadata = 8;
// Render edges
@ -112,16 +112,16 @@ public class RenderMultimeter implements ISimpleItemRenderer
if (check.offsetZ != 0)
{
if (dir.offsetX != check.offsetZ)
RenderUtility.renderCube(-0.501, -0.0501, -0.501, -0.44, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, -0.501, -0.44, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
else if (dir.offsetX == check.offsetZ)
RenderUtility.renderCube(0.44, -0.0501, -0.501, 0.501, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(0.44, -0.0501, -0.501, 0.501, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
}
else if (check.offsetY != 0)
{
if (check.offsetY > 0)
RenderUtility.renderCube(-0.501, -0.0501, -0.501, 0.501, 0.0501, -0.44, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, -0.501, 0.501, 0.0501, -0.44, ResonantInduction.blockIndustrialStone, null, metadata);
else
RenderUtility.renderCube(-0.501, -0.0501, 0.44, 0.501, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, 0.44, 0.501, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
}
}
@ -130,16 +130,16 @@ public class RenderMultimeter implements ISimpleItemRenderer
if (check.offsetX != 0)
{
if (dir.offsetZ == check.offsetX)
RenderUtility.renderCube(-0.501, -0.0501, -0.501, -0.44, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, -0.501, -0.44, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
else if (dir.offsetZ != check.offsetX)
RenderUtility.renderCube(0.44, -0.0501, -0.501, 0.501, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(0.44, -0.0501, -0.501, 0.501, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
}
else if (check.offsetY != 0)
{
if (check.offsetY > 0)
RenderUtility.renderCube(-0.501, -0.0501, -0.501, 0.501, 0.0501, -0.44, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, -0.501, 0.501, 0.0501, -0.44, ResonantInduction.blockIndustrialStone, null, metadata);
else
RenderUtility.renderCube(-0.501, -0.0501, 0.44, 0.501, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, 0.44, 0.501, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
}
}
@ -148,16 +148,16 @@ public class RenderMultimeter implements ISimpleItemRenderer
if (check.offsetX != 0)
{
if (dir.offsetY != check.offsetX)
RenderUtility.renderCube(0.44, -0.0501, -0.501, 0.501, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(0.44, -0.0501, -0.501, 0.501, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
else if (dir.offsetY == check.offsetX)
RenderUtility.renderCube(-0.501, -0.0501, -0.501, -0.44, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, -0.501, -0.44, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
}
else if (check.offsetZ != 0)
{
if (dir.offsetY != check.offsetZ)
RenderUtility.renderCube(-0.501, -0.0501, 0.44, 0.501, 0.0501, 0.501, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, 0.44, 0.501, 0.0501, 0.501, ResonantInduction.blockIndustrialStone, null, metadata);
else if (dir.offsetY == check.offsetZ)
RenderUtility.renderCube(-0.501, -0.0501, -0.501, 0.501, 0.0501, -0.44, ResonantInduction.blockMachinePart, null, metadata);
RenderUtility.renderCube(-0.501, -0.0501, -0.501, 0.501, 0.0501, -0.44, ResonantInduction.blockIndustrialStone, null, metadata);
}
}

View file

@ -268,7 +268,7 @@ public class PartPipe extends PartFramedNode<EnumPipeMaterial, FluidPressureNode
public void drawBreaking(RenderBlocks renderBlocks)
{
CCRenderState.reset();
RenderUtils.renderBlock(sides[6], 0, new Translation(x(), y(), z()), new IconTransformation(ResonantInduction.blockMachinePart.getIcon(0, 0)), null);
RenderUtils.renderBlock(sides[6], 0, new Translation(x(), y(), z()), new IconTransformation(ResonantInduction.blockIndustrialStone.getIcon(0, 0)), null);
}
@Override

View file

@ -26,20 +26,21 @@ item.resonantinduction\:bucketMixture.name=%v Bucket
item.resonantinduction\:bucketMolten.name=%v Bucket
### Archaic Module
## machineMaterials
tile.resonantinduction\:gutter.name=Gutter
tile.resonantinduction\:gutter.tooltip=A primitive way of transferring fluid.
tile.resonantinduction\:machineMaterial.0.name=Industrial Brick
tile.resonantinduction\:machineMaterial.1.name=Industrial Brick
tile.resonantinduction\:machineMaterial.2.name=Industrial Chiseled Brick
tile.resonantinduction\:machineMaterial.3.name=Industrial Cobblestone
tile.resonantinduction\:machineMaterial.4.name=Industrial Cracked Stone
tile.resonantinduction\:machineMaterial.5.name=Industrial Stone
tile.resonantinduction\:machineMaterial.6.name=Industrial Stone Slab
tile.resonantinduction\:machineMaterial.7.name=Industrial Mossy Stone
tile.resonantinduction\:machineMaterial.8.name=Dark Steel
tile.resonantinduction\:machineMaterial.9.name=Tinted Steel
tile.resonantinduction\:machineMaterial.10.name=Steel
## Industrial Stone Blocks
tile.resonantinduction\:industrialStone.0.name=Industrial Brick
tile.resonantinduction\:industrialStone.1.name=Industrial Double Slab Brick
tile.resonantinduction\:industrialStone.2.name=Industrial Chiseled Brick
tile.resonantinduction\:industrialStone.3.name=Industrial Cobblestone
tile.resonantinduction\:industrialStone.4.name=Industrial Cracked Stone
tile.resonantinduction\:industrialStone.5.name=Industrial Stone
tile.resonantinduction\:industrialStone.6.name=Industrial Stone Slab
tile.resonantinduction\:industrialStone.7.name=Industrial Mossy Stone
tile.resonantinduction\:industrialStone.8.name=Dark Iron
tile.resonantinduction\:industrialStone.9.name=Tinted Steel
tile.resonantinduction\:industrialStone.10.name=Steel
## Items
item.resonantinduction\:imprint.name=Imprint
@ -48,9 +49,7 @@ item.resonantinduction\:handCrank.name=Hand Crank
item.resonantinduction\:devStaff.name=Staff of Devs
item.resonantinduction\:flour.name=Flour
item.dough.name=Dough
item.bakingtray.name=Baking Tray
item.bakingtraywithdough.name=Baking Tray With Dough
item.resonantinduction\:bakingTrayWithBread.name=Baking Tray With Bread
## Machines

View file

@ -25,12 +25,12 @@ import resonant.lib.network.PacketHandler;
import resonant.lib.network.PacketTile;
import resonant.lib.prefab.item.ItemBlockMetadata;
import resonant.lib.utility.LanguageUtility;
import resonantinduction.core.blocks.BlockIndustrialStone;
import resonantinduction.core.blocks.IndustrialStoneBlocksRecipes;
import resonantinduction.core.handler.TextureHookHandler;
import resonantinduction.core.items.ItemDevStaff;
import resonantinduction.core.prefab.part.PacketMultiPart;
import resonantinduction.core.resource.BlockDust;
import resonantinduction.core.resource.BlockMachineMaterial;
import resonantinduction.core.resource.ItemBiomass;
import resonantinduction.core.resource.ItemOreResource;
import resonantinduction.core.resource.ResourceGenerator;
@ -85,7 +85,8 @@ public class ResonantInduction
public static Item itemBiomass, itemDevStaff;
public static Item itemFlour, itemBakingTrayWithBread;
public static Block blockDust, blockRefinedDust;
public static Block blockMachinePart;
public static Block blockIndustrialStone;
@EventHandler
@ -99,7 +100,7 @@ public class ResonantInduction
MinecraftForge.EVENT_BUS.register(ResourceGenerator.INSTANCE);
MinecraftForge.EVENT_BUS.register(new TextureHookHandler());
blockMachinePart = contentRegistry.createBlock(BlockMachineMaterial.class, ItemBlockMetadata.class);
blockIndustrialStone = contentRegistry.createBlock(BlockIndustrialStone.class, ItemBlockMetadata.class);
/** Melting dusts */
blockDust = contentRegistry.createBlock("dust", BlockDust.class, null, TileDust.class).setCreativeTab(null);
@ -127,7 +128,7 @@ public class ResonantInduction
GameRegistry.registerTileEntity(TileFluidMixture.class, "ri_fluid_mixture");
proxy.preInit();
TabRI.ITEMSTACK = new ItemStack(blockMachinePart);
TabRI.ITEMSTACK = new ItemStack(blockIndustrialStone);
}
@EventHandler
@ -138,6 +139,7 @@ public class ResonantInduction
// Set Mod Metadata
Settings.setModMetadata(metadata, ID, NAME);
proxy.init();
}
@EventHandler
@ -147,13 +149,15 @@ public class ResonantInduction
// Generate Resources
ResourceGenerator.generateOreResources();
// These are from zeros flour stuffs :3
// These are from zeros flour addition
GameRegistry.addRecipe(new ShapelessOreRecipe(itemFlour, new Object []{Item.wheat,Item.wheat}));
FurnaceRecipes.smelting().addSmelting(itemFlour.itemID, 1, new ItemStack (Item.bread), 50f);
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack (itemFlour ,1,1),new Object []{itemFlour, Item.bucketWater}));
MachineRecipes.INSTANCE.addRecipe(RecipeType.GRINDER.name(), Item.wheat, itemFlour);
proxy.postInit();
Settings.CONFIGURATION.save();
IndustrialStoneBlocksRecipes.init();
}
@EventHandler

View file

@ -1,7 +1,8 @@
package resonantinduction.core.resource;
package resonantinduction.core.blocks;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
@ -16,14 +17,16 @@ import resonantinduction.core.Reference;
* @author Calclavia
*
*/
public class BlockMachineMaterial extends BlockTile
public class BlockIndustrialStone extends BlockTile
{
String[] iconNames = new String[] { "material_stone_brick", "material_stone_brick2", "material_stone_chiseled", "material_stone_cobble", "material_stone_cracked", "material_stone", "material_stone_slab", "material_stone_mossy", "material_steel_dark", "material_steel_tint", "material_steel" };
Icon[] icons = new Icon[iconNames.length];
public BlockMachineMaterial(int id)
public BlockIndustrialStone(int id)
{
super(id, Material.iron);
super(id, Material.rock);
setHardness(1F);
setStepSound(Block.soundStoneFootstep);
}
@Override

View file

@ -0,0 +1,56 @@
package resonantinduction.core.blocks;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import resonantinduction.core.ResonantInduction;
import cpw.mods.fml.common.registry.GameRegistry;
public class IndustrialStoneBlocksRecipes {
public static void init () {
registerRecipes();
}
public static void registerRecipes() {
// Industrial Cobblestone
GameRegistry.addRecipe(new ItemStack(ResonantInduction.blockIndustrialStone, 1, 3),
new Object[] { "XXX", "XXX", "XXX", 'X', Block.cobblestone});
// Industrial Stone
FurnaceRecipes.smelting().addSmelting(ResonantInduction.blockIndustrialStone.blockID,3, new ItemStack(ResonantInduction.blockIndustrialStone, 1, 5), 5);
// Industrial Cracked Stone
FurnaceRecipes.smelting().addSmelting(ResonantInduction.blockIndustrialStone.blockID, new ItemStack(ResonantInduction.blockIndustrialStone, 1, 4), 5);
// Industrial Mossy Stone
GameRegistry.addRecipe(new ItemStack(ResonantInduction.blockIndustrialStone, 8, 7),
new Object[] { "XXX", "XVX", "XXX", 'X', new ItemStack(ResonantInduction.blockIndustrialStone), 'V', Block.vine});
// Industrial Brick
GameRegistry.addRecipe(new ItemStack(ResonantInduction.blockIndustrialStone, 4),
new Object[] { "XX ", "XX ", " ", 'X', new ItemStack(ResonantInduction.blockIndustrialStone, 1, 5)});
// Industrial Double Slab Brick
GameRegistry.addRecipe(new ItemStack(ResonantInduction.blockIndustrialStone, 4, 1),
new Object[] { "XXX", "XXX", "XX ", 'X', Block.stoneSingleSlab});
// Industrial Chiseled Brick
GameRegistry.addRecipe(new ItemStack(ResonantInduction.blockIndustrialStone,8, 2),
new Object[] { "XXX", "X X", "XXX", 'X', new ItemStack(ResonantInduction.blockIndustrialStone, 1, 5)});
// Dark Iron Block Recipe
GameRegistry.addRecipe(new ItemStack(ResonantInduction.blockIndustrialStone, 5, 10),
new Object[] { "IXI", "XXX", "IXI", 'X', new ItemStack(ResonantInduction.blockIndustrialStone, 1, 5), 'I', Item.ingotIron});
// Tinted Steel Block Recipe
/*GameRegistry.addRecipe(new ItemStack(ResonantInduction.blockDarkStone, 4, 9),
new Object[] { "XSX", "SSS", "XSX", 'X', new ItemStack(ResonantInduction.blockDarkStone, 1, 5), 'S', new ItemStack(, ResonantEngine.idItemIngotSteel)});*/
// Steel Block Recipe
/*GameRegistry.addRecipe(new ItemStack(ResonantInduction.blockDarkStone,5, 8),
new Object[] { "SXS", "XXX", "SXS", 'X', new ItemStack(ResonantInduction.blockDarkStone, 1, 5), 'S', new ItemStack(, ResonantEngine.idItemIngotSteel)});*/
}
}