Fixed mixer model render and insulation localization

This commit is contained in:
Calclavia 2014-03-14 17:41:22 +08:00
parent e4d704637a
commit c4a6d1c721
4 changed files with 12 additions and 56 deletions

View file

@ -31,7 +31,6 @@ import resonantinduction.mechanical.logistic.belt.TileManipulator;
import resonantinduction.mechanical.logistic.belt.TileSorter; import resonantinduction.mechanical.logistic.belt.TileSorter;
import resonantinduction.mechanical.process.crusher.TileMechanicalPiston; import resonantinduction.mechanical.process.crusher.TileMechanicalPiston;
import resonantinduction.mechanical.process.grinder.TileGrindingWheel; import resonantinduction.mechanical.process.grinder.TileGrindingWheel;
import resonantinduction.mechanical.process.purifier.BlockMixer;
import resonantinduction.mechanical.process.purifier.TileMixer; import resonantinduction.mechanical.process.purifier.TileMixer;
import calclavia.api.resonantinduction.IMechanicalNode; import calclavia.api.resonantinduction.IMechanicalNode;
import calclavia.components.creative.BlockCreativeBuilder; import calclavia.components.creative.BlockCreativeBuilder;
@ -97,7 +96,7 @@ public class Mechanical
// Machines/Processes // Machines/Processes
public static Block blockGrinderWheel; public static Block blockGrinderWheel;
public static Block blockPurifier; public static Block blockMixer;
public static Block blockMechanicalPiston; public static Block blockMechanicalPiston;
@EventHandler @EventHandler
@ -128,7 +127,7 @@ public class Mechanical
// Machines // Machines
blockGrinderWheel = contentRegistry.newBlock(TileGrindingWheel.class); blockGrinderWheel = contentRegistry.newBlock(TileGrindingWheel.class);
blockPurifier = contentRegistry.createTile(BlockMixer.class, TileMixer.class); blockMixer = contentRegistry.newBlock(TileMixer.class);
blockMechanicalPiston = contentRegistry.newBlock(TileMechanicalPiston.class); blockMechanicalPiston = contentRegistry.newBlock(TileMechanicalPiston.class);
OreDictionary.registerOre("gear", itemGear); OreDictionary.registerOre("gear", itemGear);
@ -184,6 +183,6 @@ public class Mechanical
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(itemPipe, 1, EnumPipeMaterial.FIBERGLASS.ordinal()), "BBB", " ", "BBB", 'B', Item.diamond)); GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(itemPipe, 1, EnumPipeMaterial.FIBERGLASS.ordinal()), "BBB", " ", "BBB", 'B', Item.diamond));
GameRegistry.addRecipe(new ShapedOreRecipe(blockGrinderWheel, "III", "LGL", "III", 'I', UniversalRecipe.PRIMARY_METAL.get(), 'L', "logWood", 'G', itemGear)); GameRegistry.addRecipe(new ShapedOreRecipe(blockGrinderWheel, "III", "LGL", "III", 'I', UniversalRecipe.PRIMARY_METAL.get(), 'L', "logWood", 'G', itemGear));
GameRegistry.addRecipe(new ShapedOreRecipe(blockPurifier, "IGI", "IGI", "IGI", 'I', UniversalRecipe.PRIMARY_METAL.get(), 'G', itemGear)); GameRegistry.addRecipe(new ShapedOreRecipe(blockMixer, "IGI", "IGI", "IGI", 'I', UniversalRecipe.PRIMARY_METAL.get(), 'G', itemGear));
} }
} }

View file

@ -1,51 +0,0 @@
package resonantinduction.mechanical.process.purifier;
import net.minecraft.block.ITileEntityProvider;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import resonantinduction.core.Reference;
import universalelectricity.api.UniversalElectricity;
import calclavia.lib.prefab.block.BlockRotatable;
import calclavia.lib.render.block.BlockRenderingHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
/**
* A block used to build machines.
*
* @author Calclavia
*
*/
public class BlockMixer extends BlockRotatable implements ITileEntityProvider
{
public BlockMixer(int id)
{
super(id, UniversalElectricity.machine);
setTextureName(Reference.PREFIX + "material_metal_top");
}
@SideOnly(Side.CLIENT)
@Override
public int getRenderType()
{
return BlockRenderingHandler.ID;
}
@Override
public boolean isOpaqueCube()
{
return false;
}
@Override
public boolean renderAsNormalBlock()
{
return false;
}
@Override
public TileEntity createNewTileEntity(World world)
{
return new TileMixer();
}
}

View file

@ -5,6 +5,7 @@ import java.util.List;
import java.util.Set; import java.util.Set;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
@ -35,6 +36,8 @@ public class TileMixer extends TileMechanical implements IInventory
public TileMixer() public TileMixer()
{ {
super(Material.iron);
mechanicalNode = new PacketMechanicalNode(this) mechanicalNode = new PacketMechanicalNode(this)
{ {
@Override @Override
@ -44,6 +47,11 @@ public class TileMixer extends TileMechanical implements IInventory
} }
}.setConnection(Byte.parseByte("000011", 2)); }.setConnection(Byte.parseByte("000011", 2));
isOpaqueCube = false;
normalRender = false;
customItemRender = true;
textureName = "material_metal_top";
} }
@Override @Override

@ -1 +1 @@
Subproject commit 09738c5f87ec83d559c33492a440b0a666657663 Subproject commit de65db296a225c74e7477bf5105c852fafc797da