Found and re-added Tank & Pipe item renderers
This commit is contained in:
parent
f3f6d7858b
commit
7706d5bd65
5 changed files with 354 additions and 166 deletions
|
@ -1,5 +1,8 @@
|
|||
package resonantinduction.mechanical;
|
||||
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import resonantinduction.mechanical.fluid.pipe.ItemPipeRenderer;
|
||||
import resonantinduction.mechanical.fluid.tank.ItemTankRenderer;
|
||||
import resonantinduction.mechanical.render.MechanicalBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
|
@ -10,4 +13,11 @@ public class ClientProxy extends CommonProxy
|
|||
{
|
||||
RenderingRegistry.registerBlockHandler(MechanicalBlockRenderingHandler.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
{
|
||||
MinecraftForgeClient.registerItemRenderer(Mechanical.blockTank.blockID, new ItemTankRenderer());
|
||||
MinecraftForgeClient.registerItemRenderer(Mechanical.blockPipe.blockID, new ItemPipeRenderer());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ public class Mechanical
|
|||
// #Fluids
|
||||
public static Block blockTank;
|
||||
public static Block blockPipe;
|
||||
public static Block blockReleaseValve;
|
||||
public static Block blockGrate;
|
||||
public static Block blockPump;
|
||||
|
||||
|
|
|
@ -0,0 +1,75 @@
|
|||
package resonantinduction.mechanical.fluid.pipe;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.mechanical.Mechanical;
|
||||
import resonantinduction.old.client.model.ModelReleaseValve;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ItemPipeRenderer implements IItemRenderer
|
||||
{
|
||||
private ModelReleaseValve valve = new ModelReleaseValve();
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderPipe.getTexture(item.getItemDamage()));
|
||||
int meta = item.getItemDamage();
|
||||
if (Mechanical.blockReleaseValve != null && item.itemID == Mechanical.blockReleaseValve.blockID)
|
||||
{
|
||||
meta = FluidContainerMaterial.IRON.getMeta();
|
||||
}
|
||||
if (type == ItemRenderType.ENTITY)
|
||||
{
|
||||
GL11.glTranslatef(-.5F, -1F, -.5F);
|
||||
RenderPipe.render(meta, new boolean[] { false, false, false, false, true, true });
|
||||
}
|
||||
else if (type == ItemRenderType.INVENTORY)
|
||||
{
|
||||
GL11.glTranslatef(0F, -1F, 0F);
|
||||
RenderPipe.render(meta, new boolean[] { false, false, false, false, true, true });
|
||||
}
|
||||
else if (type == ItemRenderType.EQUIPPED)
|
||||
{
|
||||
GL11.glTranslatef(-1F, -1.2F, 0.5F);
|
||||
RenderPipe.render(meta, new boolean[] { false, false, true, true, false, false });
|
||||
}
|
||||
else if (type == ItemRenderType.EQUIPPED_FIRST_PERSON)
|
||||
{
|
||||
GL11.glTranslatef(-2F, -1.5F, 0.2F);
|
||||
RenderPipe.render(meta, new boolean[] { false, false, true, true, false, false });
|
||||
}
|
||||
else
|
||||
{
|
||||
RenderPipe.render(item.getItemDamage(), new boolean[] { false, false, true, true, false, false });
|
||||
}
|
||||
if (Mechanical.blockReleaseValve != null && item.itemID == Mechanical.blockReleaseValve.blockID)
|
||||
{
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + "ReleaseValve.png"));
|
||||
valve.render();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,124 @@
|
|||
package resonantinduction.mechanical.fluid.tank;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.core.render.RenderFluidHelper;
|
||||
import resonantinduction.mechanical.Mechanical;
|
||||
import resonantinduction.old.client.model.ModelTankSide;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ItemTankRenderer implements IItemRenderer
|
||||
{
|
||||
private ModelTankSide tank = new ModelTankSide();
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data)
|
||||
{
|
||||
if (item.itemID == Mechanical.blockTank.blockID)
|
||||
{
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
if (type == ItemRenderType.ENTITY)
|
||||
{
|
||||
GL11.glTranslatef(0F, 0.2F, 0F);
|
||||
}
|
||||
else if (type == ItemRenderType.EQUIPPED_FIRST_PERSON)
|
||||
{
|
||||
GL11.glTranslatef(0.4F, 0.6F, 0.2F);
|
||||
}
|
||||
else if (type == ItemRenderType.EQUIPPED)
|
||||
{
|
||||
GL11.glTranslatef(0.1F, 0.4F, 1.2F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glTranslatef(0.7F, .4F, 0.7F);
|
||||
}
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(Reference.DOMAIN, item.getItemDamage() == 1 ? "textures/blocks/obsidian.png" : "textures/blocks/iron_block.png"));
|
||||
GL11.glTranslatef(0.0F, -0.9F, 0.0F);
|
||||
tank.render(0.0625F, false, false, false, false);
|
||||
GL11.glRotatef(90f, 0f, 1f, 0f);
|
||||
tank.render(0.0625F, false, false, false, false);
|
||||
GL11.glRotatef(90f, 0f, 1f, 0f);
|
||||
tank.render(0.0625F, false, false, false, false);
|
||||
GL11.glRotatef(90f, 0f, 1f, 0f);
|
||||
tank.render(0.0625F, false, false, false, false);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
if (item.getTagCompound() != null && item.getTagCompound().hasKey("fluid"))
|
||||
{
|
||||
FluidStack liquid = FluidStack.loadFluidStackFromNBT(item.getTagCompound().getCompoundTag("fluid"));
|
||||
|
||||
if (liquid != null && liquid.amount > 100)
|
||||
{
|
||||
|
||||
int[] displayList = RenderFluidHelper.getFluidDisplayLists(liquid, Minecraft.getMinecraft().theWorld, false);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_ENABLE_BIT);
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
//GL11.glScalef(0.80F, 0.9F, 0.80F);
|
||||
if (type == ItemRenderType.ENTITY)
|
||||
{
|
||||
GL11.glTranslatef(-.5F, -0.2F, -.5F);
|
||||
}
|
||||
else if (type == ItemRenderType.EQUIPPED_FIRST_PERSON)
|
||||
{
|
||||
GL11.glTranslatef(-0.1F, 0.2F, -.3F);
|
||||
}
|
||||
else if (type == ItemRenderType.EQUIPPED)
|
||||
{
|
||||
GL11.glScalef(0.9F, 0.9F, 0.9F);
|
||||
GL11.glTranslatef(-0.4F, 0.1F, 0.9F);
|
||||
}
|
||||
else
|
||||
{
|
||||
GL11.glScalef(0.80F, 0.9F, 0.80F);
|
||||
GL11.glTranslatef(0.5F, .2F, 0.5F);
|
||||
}
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture((RenderFluidHelper.getFluidSheet(liquid)));
|
||||
|
||||
int cap = BlockTank.tankVolume * FluidContainerRegistry.BUCKET_VOLUME;
|
||||
if (liquid.getFluid().isGaseous())
|
||||
{
|
||||
cap = liquid.amount;
|
||||
}
|
||||
GL11.glCallList(displayList[(int) Math.min(((float) liquid.amount / (float) (cap) * (RenderFluidHelper.DISPLAY_STAGES - 1)), displayList.length - 1)]);
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -9,9 +9,7 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import resonantinduction.core.Reference;
|
||||
import resonantinduction.mechanical.Mechanical;
|
||||
import resonantinduction.mechanical.fluid.pipe.RenderPipe;
|
||||
import resonantinduction.mechanical.fluid.pump.RenderPump;
|
||||
import resonantinduction.mechanical.fluid.tank.RenderTank;
|
||||
import resonantinduction.old.client.model.ModelConveyorBelt;
|
||||
import resonantinduction.old.client.model.ModelCrusher;
|
||||
import resonantinduction.old.client.model.ModelGrinder;
|
||||
|
@ -26,173 +24,153 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
@SideOnly(Side.CLIENT)
|
||||
public class MechanicalBlockRenderingHandler implements ISimpleBlockRenderingHandler
|
||||
{
|
||||
public static MechanicalBlockRenderingHandler INSTANCE = new MechanicalBlockRenderingHandler();
|
||||
public static final int ID = RenderingRegistry.getNextAvailableRenderId();
|
||||
private ModelConveyorBelt modelConveyorBelt = new ModelConveyorBelt();
|
||||
private ModelRejectorPiston modelEjector = new ModelRejectorPiston();
|
||||
private ModelManipulator modelInjector = new ModelManipulator();
|
||||
private ModelCrusher modelCrushor = new ModelCrusher();
|
||||
private ModelGrinder grinderModel = new ModelGrinder();
|
||||
public static MechanicalBlockRenderingHandler INSTANCE = new MechanicalBlockRenderingHandler();
|
||||
public static final int ID = RenderingRegistry.getNextAvailableRenderId();
|
||||
private ModelConveyorBelt modelConveyorBelt = new ModelConveyorBelt();
|
||||
private ModelRejectorPiston modelEjector = new ModelRejectorPiston();
|
||||
private ModelManipulator modelInjector = new ModelManipulator();
|
||||
private ModelCrusher modelCrushor = new ModelCrusher();
|
||||
private ModelGrinder grinderModel = new ModelGrinder();
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
if (block == Mechanical.blockConveyorBelt)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 1.3F, 0.0F);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(Reference.DOMAIN, Reference.MODEL_PATH + "belt/frame0.png"));
|
||||
modelConveyorBelt.render(0.0625F, 0, false, false, false, false);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else if (block == Mechanical.blockTank)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 1.3F, 0.0F);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderTank.getTexture(0, 0));
|
||||
RenderTank.MODEL.render(0.0625F, false, false, false, false);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else if (block == Mechanical.blockPipe)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 1F, 0.0F);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderPipe.getTexture(metadata));
|
||||
RenderPipe.MODEL_PIPE.renderFront();
|
||||
RenderPipe.MODEL_PIPE.renderMiddle();
|
||||
RenderPipe.MODEL_PIPE.renderBack();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else if (Mechanical.blockPump != null)
|
||||
{
|
||||
GL11.glTranslatef(0.0F, 1.3F, 0.0F);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer)
|
||||
{
|
||||
if (block == Mechanical.blockConveyorBelt)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 1.3F, 0.0F);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(new ResourceLocation(Reference.DOMAIN, Reference.MODEL_PATH + "belt/frame0.png"));
|
||||
modelConveyorBelt.render(0.0625F, 0, false, false, false, false);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else if (Mechanical.blockPump != null)
|
||||
{
|
||||
GL11.glTranslatef(0.0F, 1.3F, 0.0F);
|
||||
GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderPump.TEXTURE);
|
||||
RenderPump.MODEL.render(0.0725F);
|
||||
RenderPump.MODEL.renderMotion(0.0725F, 0);
|
||||
}/*
|
||||
* else if (RecipeLoader.blockRejector != null && block.blockID ==
|
||||
* RecipeLoader.blockRejector.blockID)
|
||||
* {
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + "rejector.png"));
|
||||
* GL11.glPushMatrix();
|
||||
* GL11.glTranslatef(0.6F, 1.5F, 0.6F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* GL11.glRotatef(-90f, 0f, 1f, 0f);
|
||||
* modelEjector.render(0.0625F);
|
||||
* modelEjector.renderPiston(0.0625F, 1);
|
||||
* GL11.glPopMatrix();
|
||||
* }
|
||||
* else if (RecipeLoader.blockManipulator != null && block.blockID ==
|
||||
* RecipeLoader.blockManipulator.blockID)
|
||||
* {
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + "manipulator1.png"));
|
||||
* GL11.glPushMatrix();
|
||||
* GL11.glTranslatef(0.6F, 1.5F, 0.6F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* GL11.glRotatef(-90f, 0f, 1f, 0f);
|
||||
* modelInjector.render(0.0625F, true, 0);
|
||||
* GL11.glPopMatrix();
|
||||
* }
|
||||
* if (RecipeLoader.blockPumpMachine != null && block.blockID ==
|
||||
* RecipeLoader.blockPumpMachine.blockID && metadata < 4)
|
||||
* {
|
||||
* GL11.glTranslatef(0.0F, 1.1F, 0.0F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + "pumps/WaterPump.png"));
|
||||
* modelPump.render(0.0725F);
|
||||
* modelPump.renderMotion(0.0725F, 0);
|
||||
* }
|
||||
* else if (RecipeLoader.blockSink != null && block.blockID ==
|
||||
* RecipeLoader.blockSink.blockID)
|
||||
* {
|
||||
* GL11.glTranslatef(0.0F, .8F, 0.0F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + "Sink.png"));
|
||||
* sink.render(0.0565F);
|
||||
* }
|
||||
* else if (RecipeLoader.blockRod != null && block.blockID == RecipeLoader.blockRod.blockID)
|
||||
* {
|
||||
* GL11.glTranslatef(0.0F, 1.5F, 0.0F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY +
|
||||
* "mechanical/GearRod.png"));
|
||||
* modelRod.render(0.0825F, 0);
|
||||
* }
|
||||
* else if (RecipeLoader.blockConPump != null && block.blockID ==
|
||||
* RecipeLoader.blockConPump.blockID && metadata < 4)
|
||||
* {
|
||||
* GL11.glTranslatef(0.0F, 1.2F, 0.0F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + "ConstructionPump.png"));
|
||||
* conPump.render(0.0725F);
|
||||
* conPump.renderMotor(0.0725F);
|
||||
* }
|
||||
* else if (RecipeLoader.frackingPipe != null && block.blockID ==
|
||||
* RecipeLoader.frackingPipe.blockID)
|
||||
* {
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderFrackingPipe.TEXTURE
|
||||
* );
|
||||
* GL11.glTranslatef(0, 1F, 0);
|
||||
* GL11.glScalef(1.0F, -1F, -1F);
|
||||
* RenderFrackingPipe.model.renderAll();
|
||||
* }
|
||||
* GL11.glPopMatrix();
|
||||
*/
|
||||
/*
|
||||
* else if (RecipeLoader.blockArmbot != null && block.blockID ==
|
||||
* RecipeLoader.blockArmbot.blockID)
|
||||
* {
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + RenderArmbot.TEXTURE));
|
||||
* GL11.glPushMatrix();
|
||||
* GL11.glTranslatef(0.4f, 0.8f, 0f);
|
||||
* GL11.glScalef(0.7f, 0.7f, 0.7f);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* GL11.glRotatef(-90f, 0f, 1f, 0f);
|
||||
* RenderArmbot.MODEL.render(0.0625F, 0, 0);
|
||||
* GL11.glPopMatrix();
|
||||
* }
|
||||
*/
|
||||
/*
|
||||
* else if (RecipeLoader.blockSteamGen != null && block.blockID ==
|
||||
* RecipeLoader.blockSteamGen.blockID)
|
||||
* {
|
||||
* ModelMachine model = RenderSteamGen.getModel(metadata);
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderSteamGen.getTexture
|
||||
* (metadata));
|
||||
* GL11.glTranslatef(0.0F, 1.1F, 0.0F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* model.render(0.0625F);
|
||||
* }
|
||||
*/
|
||||
}
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderPump.TEXTURE);
|
||||
RenderPump.MODEL.render(0.0725F);
|
||||
RenderPump.MODEL.renderMotion(0.0725F, 0);
|
||||
}/*
|
||||
* else if (RecipeLoader.blockRejector != null && block.blockID ==
|
||||
* RecipeLoader.blockRejector.blockID)
|
||||
* {
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + "rejector.png"));
|
||||
* GL11.glPushMatrix();
|
||||
* GL11.glTranslatef(0.6F, 1.5F, 0.6F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* GL11.glRotatef(-90f, 0f, 1f, 0f);
|
||||
* modelEjector.render(0.0625F);
|
||||
* modelEjector.renderPiston(0.0625F, 1);
|
||||
* GL11.glPopMatrix();
|
||||
* }
|
||||
* else if (RecipeLoader.blockManipulator != null && block.blockID ==
|
||||
* RecipeLoader.blockManipulator.blockID)
|
||||
* {
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + "manipulator1.png"));
|
||||
* GL11.glPushMatrix();
|
||||
* GL11.glTranslatef(0.6F, 1.5F, 0.6F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* GL11.glRotatef(-90f, 0f, 1f, 0f);
|
||||
* modelInjector.render(0.0625F, true, 0);
|
||||
* GL11.glPopMatrix();
|
||||
* }
|
||||
* if (RecipeLoader.blockPumpMachine != null && block.blockID ==
|
||||
* RecipeLoader.blockPumpMachine.blockID && metadata < 4)
|
||||
* {
|
||||
* GL11.glTranslatef(0.0F, 1.1F, 0.0F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + "pumps/WaterPump.png"));
|
||||
* modelPump.render(0.0725F);
|
||||
* modelPump.renderMotion(0.0725F, 0);
|
||||
* }
|
||||
* else if (RecipeLoader.blockSink != null && block.blockID ==
|
||||
* RecipeLoader.blockSink.blockID)
|
||||
* {
|
||||
* GL11.glTranslatef(0.0F, .8F, 0.0F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + "Sink.png"));
|
||||
* sink.render(0.0565F);
|
||||
* }
|
||||
* else if (RecipeLoader.blockRod != null && block.blockID == RecipeLoader.blockRod.blockID)
|
||||
* {
|
||||
* GL11.glTranslatef(0.0F, 1.5F, 0.0F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY +
|
||||
* "mechanical/GearRod.png"));
|
||||
* modelRod.render(0.0825F, 0);
|
||||
* }
|
||||
* else if (RecipeLoader.blockConPump != null && block.blockID ==
|
||||
* RecipeLoader.blockConPump.blockID && metadata < 4)
|
||||
* {
|
||||
* GL11.glTranslatef(0.0F, 1.2F, 0.0F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + "ConstructionPump.png"));
|
||||
* conPump.render(0.0725F);
|
||||
* conPump.renderMotor(0.0725F);
|
||||
* }
|
||||
* else if (RecipeLoader.frackingPipe != null && block.blockID ==
|
||||
* RecipeLoader.frackingPipe.blockID)
|
||||
* {
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderFrackingPipe.TEXTURE
|
||||
* );
|
||||
* GL11.glTranslatef(0, 1F, 0);
|
||||
* GL11.glScalef(1.0F, -1F, -1F);
|
||||
* RenderFrackingPipe.model.renderAll();
|
||||
* }
|
||||
* GL11.glPopMatrix();
|
||||
*/
|
||||
/*
|
||||
* else if (RecipeLoader.blockArmbot != null && block.blockID ==
|
||||
* RecipeLoader.blockArmbot.blockID)
|
||||
* {
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(new
|
||||
* ResourceLocation(Reference.DOMAIN, Reference.MODEL_DIRECTORY + RenderArmbot.TEXTURE));
|
||||
* GL11.glPushMatrix();
|
||||
* GL11.glTranslatef(0.4f, 0.8f, 0f);
|
||||
* GL11.glScalef(0.7f, 0.7f, 0.7f);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* GL11.glRotatef(-90f, 0f, 1f, 0f);
|
||||
* RenderArmbot.MODEL.render(0.0625F, 0, 0);
|
||||
* GL11.glPopMatrix();
|
||||
* }
|
||||
*/
|
||||
/*
|
||||
* else if (RecipeLoader.blockSteamGen != null && block.blockID ==
|
||||
* RecipeLoader.blockSteamGen.blockID)
|
||||
* {
|
||||
* ModelMachine model = RenderSteamGen.getModel(metadata);
|
||||
* FMLClientHandler.instance().getClient().renderEngine.bindTexture(RenderSteamGen.getTexture
|
||||
* (metadata));
|
||||
* GL11.glTranslatef(0.0F, 1.1F, 0.0F);
|
||||
* GL11.glRotatef(180f, 0f, 0f, 1f);
|
||||
* model.render(0.0625F);
|
||||
* }
|
||||
*/
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId()
|
||||
{
|
||||
return ID;
|
||||
}
|
||||
@Override
|
||||
public int getRenderId()
|
||||
{
|
||||
return ID;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue