Fix more Renderers
This commit is contained in:
@@ -25,6 +25,8 @@ import com.kitsu.medievalcraft.block.fluid.BlockSlackedLime;
|
||||
import com.kitsu.medievalcraft.block.fluid.BlockSmoke;
|
||||
import com.kitsu.medievalcraft.block.fluid.BlockTannin;
|
||||
import com.kitsu.medievalcraft.block.ingots.DamascusIngot;
|
||||
import com.kitsu.medievalcraft.block.ingots.Diamond;
|
||||
import com.kitsu.medievalcraft.block.ingots.Emerald;
|
||||
import com.kitsu.medievalcraft.block.ingots.IronPlate;
|
||||
import com.kitsu.medievalcraft.block.ingots.LapisIngot;
|
||||
import com.kitsu.medievalcraft.block.ingots.RedstoneIngot;
|
||||
@@ -243,5 +245,7 @@ public class ModBlocks {
|
||||
GameRegistry.registerBlock(redstoneIngot = new RedstoneIngot("redstoneIngot", Material.rock), "redstoneIngot");
|
||||
GameRegistry.registerBlock(lapisIngot = new LapisIngot("lapisIngot", Material.rock), "lapisIngot");
|
||||
|
||||
GameRegistry.registerBlock(myDiamond = new Diamond("myDiamond", Material.glass), "myDiamond");
|
||||
GameRegistry.registerBlock(myEmerald = new Emerald("myEmerald", Material.glass), "myEmerald");
|
||||
}
|
||||
}
|
||||
@@ -14,21 +14,10 @@ public class DamascusIngot extends IngotBase {
|
||||
|
||||
public DamascusIngot(String unlocalizedName, Material material) {
|
||||
super(unlocalizedName, material);
|
||||
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
|
||||
this.setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
this.setHardness(1.0F);
|
||||
this.setResistance(1.0F);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setStepSound(soundTypeMetal);
|
||||
//xmin, ymin, zmin,
|
||||
//xmax, ymax, zmax
|
||||
this.setBlockBounds(0.17F, 0.0F, 0.315F,
|
||||
0.8F, 0.15F, 0.725F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int i) {
|
||||
|
||||
return new TileDamascus();
|
||||
}
|
||||
|
||||
|
||||
@@ -4,8 +4,10 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -32,8 +34,8 @@ public abstract class IngotBase extends BlockContainer {
|
||||
this.setStepSound(soundTypeMetal);
|
||||
//xmin, ymin, zmin,
|
||||
//xmax, ymax, zmax
|
||||
this.setBlockBounds(0.17F, 0.0F, 0.315F,
|
||||
0.8F, 0.15F, 0.725F);
|
||||
this.setBlockBounds(0.25F, 0.0F, 0.35F,
|
||||
0.75F , 0.15F, 0.7F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -42,7 +44,6 @@ public abstract class IngotBase extends BlockContainer {
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int i) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -61,12 +62,31 @@ public abstract class IngotBase extends BlockContainer {
|
||||
parts(world, locX, locY, locZ);
|
||||
makeParts = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int p_149727_6_, float p_149727_7_, float p_149727_8_, float p_149727_9_){
|
||||
int a = player.inventory.currentItem;
|
||||
if(player.inventory.getStackInSlot(a)!=null){
|
||||
if(player.inventory.getStackInSlot(a).getItem()==Item.getItemFromBlock(this)){
|
||||
ItemStack jar = new ItemStack(this);
|
||||
player.inventory.addItemStackToInventory(jar);
|
||||
if(!world.isRemote){
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(player.inventory.getStackInSlot(a)==null){
|
||||
ItemStack jar = new ItemStack(this);
|
||||
player.inventory.setInventorySlotContents(a, jar);
|
||||
if(!world.isRemote){
|
||||
world.setBlock(x, y, z, Blocks.air, 0, 2);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void parts(World world, int x, int y, int z){
|
||||
|
||||
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
|
||||
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
|
||||
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
|
||||
@@ -76,7 +96,6 @@ public abstract class IngotBase extends BlockContainer {
|
||||
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
|
||||
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
|
||||
world.spawnParticle("lava", x+0.5D, y+0.5D, z+0.5D, 0, 0, 0);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,12 +14,6 @@ public class IronPlate extends IngotBase {
|
||||
|
||||
public IronPlate(String unlocalizedName, Material material) {
|
||||
super(unlocalizedName, material);
|
||||
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
|
||||
this.setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
this.setHardness(1.0F);
|
||||
this.setResistance(1.0F);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setStepSound(soundTypeMetal);
|
||||
//xmin, ymin, zmin,
|
||||
//xmax, ymax, zmax
|
||||
this.setBlockBounds(0.3F, 0.0F, 0.3F,
|
||||
|
||||
@@ -13,16 +13,6 @@ public class LapisIngot extends IngotBase {
|
||||
|
||||
public LapisIngot(String unlocalizedName, Material material) {
|
||||
super(unlocalizedName, material);
|
||||
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
|
||||
this.setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
this.setHardness(1.0F);
|
||||
this.setResistance(1.0F);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setStepSound(soundTypeMetal);
|
||||
//xmin, ymin, zmin,
|
||||
//xmax, ymax, zmax
|
||||
this.setBlockBounds(0.17F, 0.0F, 0.315F,
|
||||
0.8F, 0.15F, 0.725F);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,16 +14,6 @@ public class RedstoneIngot extends IngotBase {
|
||||
|
||||
public RedstoneIngot(String unlocalizedName, Material material) {
|
||||
super(unlocalizedName, material);
|
||||
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
|
||||
this.setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
this.setHardness(1.0F);
|
||||
this.setResistance(1.0F);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setStepSound(soundTypeMetal);
|
||||
//xmin, ymin, zmin,
|
||||
//xmax, ymax, zmax
|
||||
this.setBlockBounds(0.17F, 0.0F, 0.315F,
|
||||
0.8F, 0.15F, 0.725F);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -13,16 +13,6 @@ public class RefinedIron extends IngotBase {
|
||||
|
||||
public RefinedIron(String unlocalizedName, Material material) {
|
||||
super(unlocalizedName, material);
|
||||
this.setBlockTextureName(Main.MODID + ":" + unlocalizedName);
|
||||
this.setCreativeTab(CustomTab.MedievalCraftTab);
|
||||
this.setHardness(1.0F);
|
||||
this.setResistance(1.0F);
|
||||
this.setHarvestLevel("pickaxe", 0);
|
||||
this.setStepSound(soundTypeMetal);
|
||||
//xmin, ymin, zmin,
|
||||
//xmax, ymax, zmax
|
||||
this.setBlockBounds(0.17F, 0.0F, 0.315F,
|
||||
0.8F, 0.15F, 0.725F);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -400,15 +400,14 @@ public void splitLogEvent(PlayerInteractEvent event){
|
||||
if(!event.entity.worldObj.isRemote){
|
||||
if (event.entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) event.entity;
|
||||
//Block test = event.world.getBlock(event.x, event.y, event.z);
|
||||
//Block isEmpty = event.world.getBlock(event.x, event.y + 1, event.z);
|
||||
ItemStack itemStack = new ItemStack(Items.diamond);
|
||||
if(player.isSneaking()){
|
||||
if((player.inventory.getCurrentItem() != null)) {
|
||||
if((player.inventory.getCurrentItem().getItem().equals(Items.diamond))){
|
||||
if((event.action == event.action.RIGHT_CLICK_BLOCK ) ) { //&& (test == ModBlocks.testForge) && (isEmpty == Blocks.air)
|
||||
if((event.action == event.action.RIGHT_CLICK_BLOCK )){
|
||||
if(event.world.getBlock(event.x, event.y + 1, event.z).equals(Blocks.air)){
|
||||
event.world.setBlock(event.x, event.y + 1, event.z, ModBlocks.myDiamond, 0, 2);
|
||||
//event.world.setBlock(event.x, event.y+1, event.z, Blocks.bedrock);
|
||||
player.inventory.consumeInventoryItem(Items.diamond);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ public class SlottedTongs extends Item {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,8 +40,11 @@ import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty.IRTanninCru
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty.IRWaterCrucible;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty.ItemRendererECCrucible;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty.ItemRendererSECrucible;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.ingotsplates.DamascusIngotIR;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.ingotsplates.IronIngotIR;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.ingotsplates.IronPlateIR;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.ingotsplates.LapisIngotIR;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.ingotsplates.RedstoneIngotIR;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.machines.IRBarrelLid;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.machines.IRFirebox;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.machines.IRForgeAnvil;
|
||||
@@ -110,6 +113,7 @@ public class RendererRegistry {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.itemModelArrow, new ItemRendererModelArrow());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.itemIronTippedModelArrow, new ItemRendererITModelArrow());
|
||||
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.emptySoftCrucible), new ItemRendererSECrucible());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.emptyCookedCrucible), new ItemRendererECCrucible());
|
||||
|
||||
@@ -133,7 +137,10 @@ public class RendererRegistry {
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.crucibleRedstone), new IRCrucible());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.refinedIron), new IronIngotIR());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.damascus), new DamascusIngotIR());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.ironPlate), new IronPlateIR());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.lapisIngot), new LapisIngotIR());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.redstoneIngot), new RedstoneIngotIR());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySoftEmptyCrucible.class, new SECrucibleRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEmptyCookedCrucible.class, new ECCrucibleRenderer());
|
||||
|
||||
@@ -4,15 +4,19 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRendererHelper;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ItemRendererDamIngot implements IItemRenderer {
|
||||
public class DamascusIngotIR implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/DamascusIngot.png");
|
||||
public static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/HotDamascusIngot.png");
|
||||
private ResourceLocation loc;
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@@ -38,8 +42,7 @@ public class ItemRendererDamIngot implements IItemRenderer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
|
||||
ItemRendererHelper helper) {
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,ItemRendererHelper helper) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
@@ -67,23 +70,19 @@ public class ItemRendererDamIngot implements IItemRenderer {
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90, 0, 1.0, 0);
|
||||
GL11.glRotated(-20, 1, 0, 0);
|
||||
GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(10F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.0F, 1.15F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
@@ -94,55 +93,42 @@ public class ItemRendererDamIngot implements IItemRenderer {
|
||||
GL11.glRotated(-20, 1, 0, 0);
|
||||
GL11.glRotated(30, 0, 0, 1);
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
//GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.2F, 1.0F, 1.15F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
//GL11.glScalef(8.0F, 8.0F, 8.0F);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
//GL11.glTranslatef(1.0F, 0.0F, -1.0F);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glScalef(1.75F, 1.75F, 1.75F);
|
||||
|
||||
|
||||
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1,154 +0,0 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.ingotsplates;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class IRRefinedIngot implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
return true;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return true;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return true;
|
||||
}
|
||||
case ENTITY: {
|
||||
return true;
|
||||
}
|
||||
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
|
||||
ItemRendererHelper helper) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
return helper == ItemRendererHelper.BLOCK_3D;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return helper == ItemRendererHelper.EQUIPPED_BLOCK;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return helper == ItemRendererHelper.INVENTORY_BLOCK;
|
||||
}
|
||||
case ENTITY: {
|
||||
return (helper == ItemRendererHelper.ENTITY_BOBBING ||
|
||||
helper == ItemRendererHelper.ENTITY_ROTATION ||
|
||||
helper == ItemRendererHelper.BLOCK_3D);
|
||||
}
|
||||
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90, 0, 1.0, 0);
|
||||
GL11.glRotated(-20, 1, 0, 0);
|
||||
GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(10F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.0F, 1.15F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.75F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(45, 0, 1.0, 0);
|
||||
GL11.glRotated(-20, 1, 0, 0);
|
||||
GL11.glRotated(30, 0, 0, 1);
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
//GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.2F, 1.0F, 1.15F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
//GL11.glScalef(8.0F, 8.0F, 8.0F);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
//GL11.glTranslatef(1.0F, 0.0F, -1.0F);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glScalef(1.75F, 1.75F, 1.75F);
|
||||
|
||||
|
||||
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.ingotsplates;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ItemRendererHotDamIngot implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/HotDamascusIngot.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
return true;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return true;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return true;
|
||||
}
|
||||
case ENTITY: {
|
||||
return true;
|
||||
}
|
||||
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
|
||||
ItemRendererHelper helper) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
return helper == ItemRendererHelper.BLOCK_3D;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return helper == ItemRendererHelper.EQUIPPED_BLOCK;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return helper == ItemRendererHelper.INVENTORY_BLOCK;
|
||||
}
|
||||
case ENTITY: {
|
||||
return (helper == ItemRendererHelper.ENTITY_BOBBING ||
|
||||
helper == ItemRendererHelper.ENTITY_ROTATION ||
|
||||
helper == ItemRendererHelper.BLOCK_3D);
|
||||
}
|
||||
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(10F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
//GL11.glTranslatef(0.0F, -0.5F, 0.5F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
//float f = 8.0F;
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
//GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
|
||||
//GL11.glTranslatef(5.0F, 4F, 0.5F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
//GL11.glScalef(8.0F, 8.0F, 8.0F);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
//GL11.glTranslatef(1.0F, 0.0F, -1.0F);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glScalef(1.75F, 1.75F, 1.75F);
|
||||
|
||||
|
||||
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,149 +0,0 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.ingotsplates;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ItemRendererHotIronPlate implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/IronPlate.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/HotIronPlate.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
return true;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return true;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return true;
|
||||
}
|
||||
case ENTITY: {
|
||||
return true;
|
||||
}
|
||||
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
|
||||
ItemRendererHelper helper) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
return helper == ItemRendererHelper.BLOCK_3D;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return helper == ItemRendererHelper.EQUIPPED_BLOCK;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return helper == ItemRendererHelper.INVENTORY_BLOCK;
|
||||
}
|
||||
case ENTITY: {
|
||||
return (helper == ItemRendererHelper.ENTITY_BOBBING ||
|
||||
helper == ItemRendererHelper.ENTITY_ROTATION ||
|
||||
helper == ItemRendererHelper.BLOCK_3D);
|
||||
}
|
||||
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.75F;
|
||||
GL11.glScalef(scale, 3.5F, scale);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(10F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(1.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 2.0F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, 8.0F, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(1.3F, -0.2F, 1.7F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 0.66F;
|
||||
GL11.glScalef(f, 4.0F, f);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
//GL11.glTranslatef(1.0F, 0.0F, -1.0F);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
//float f = 0.8F;
|
||||
GL11.glScalef(1.0F, 3.0F, 1.0F);
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,15 +4,19 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRendererHelper;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class IRLapisIngot implements IItemRenderer {
|
||||
public class LapisIngotIR implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/MyLapisBlock.png");
|
||||
public static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/MyHotLapisBlock.png");
|
||||
private ResourceLocation loc;
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@@ -38,8 +42,7 @@ public class IRLapisIngot implements IItemRenderer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
|
||||
ItemRendererHelper helper) {
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,ItemRendererHelper helper) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
@@ -67,23 +70,19 @@ public class IRLapisIngot implements IItemRenderer {
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90, 0, 1.0, 0);
|
||||
GL11.glRotated(-20, 1, 0, 0);
|
||||
GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(10F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.0F, 1.15F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
@@ -94,55 +93,42 @@ public class IRLapisIngot implements IItemRenderer {
|
||||
GL11.glRotated(-20, 1, 0, 0);
|
||||
GL11.glRotated(30, 0, 0, 1);
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
//GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.2F, 1.0F, 1.15F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
//GL11.glScalef(8.0F, 8.0F, 8.0F);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
//GL11.glTranslatef(1.0F, 0.0F, -1.0F);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glScalef(1.75F, 1.75F, 1.75F);
|
||||
|
||||
|
||||
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -4,15 +4,19 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRendererHelper;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class IRRedstoneIngot implements IItemRenderer {
|
||||
public class RedstoneIngotIR implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/MyRedstoneBlock.png");
|
||||
public static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/MyHotRedstoneBlock.png");
|
||||
private ResourceLocation loc;
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@@ -38,8 +42,7 @@ public class IRRedstoneIngot implements IItemRenderer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
|
||||
ItemRendererHelper helper) {
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,ItemRendererHelper helper) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
@@ -67,23 +70,19 @@ public class IRRedstoneIngot implements IItemRenderer {
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90, 0, 1.0, 0);
|
||||
GL11.glRotated(-20, 1, 0, 0);
|
||||
GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(10F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.0F, 1.15F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
@@ -94,55 +93,42 @@ public class IRRedstoneIngot implements IItemRenderer {
|
||||
GL11.glRotated(-20, 1, 0, 0);
|
||||
GL11.glRotated(30, 0, 0, 1);
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
//GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.2F, 1.0F, 1.15F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
//GL11.glScalef(8.0F, 8.0F, 8.0F);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
//GL11.glTranslatef(1.0F, 0.0F, -1.0F);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glScalef(1.75F, 1.75F, 1.75F);
|
||||
|
||||
|
||||
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
if(item.getItemDamage()==0){
|
||||
loc=TEXTURE;
|
||||
}
|
||||
if(item.getItemDamage()==1){
|
||||
loc=TEXTURE1;
|
||||
}
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(loc);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -29,12 +29,17 @@ public class IRSlottedTongs implements IItemRenderer {
|
||||
public static final ResourceLocation DAMASCUS = new ResourceLocation("kitsumedievalcraft:models/HotDamascusIngot.png");
|
||||
public static final ResourceLocation REFINEDIRON = new ResourceLocation("kitsumedievalcraft:models/HotIronIngotBlock.png");
|
||||
public static final ResourceLocation IRON_PLATE = new ResourceLocation("kitsumedievalcraft:models/HotIronPlate.png");
|
||||
|
||||
public static final ResourceLocation MODEL_PLATE = new ResourceLocation("kitsumedievalcraft:models/IronPlate.obj");
|
||||
public static final ResourceLocation PLATE_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/IronPlate.png");
|
||||
public static final ResourceLocation HOTPLATE_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/HotIronPlate.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modeltc = AdvancedModelLoader.loadModel(MODEL_TONGS_CRUCIBLE);
|
||||
public IModelCustom modelti = AdvancedModelLoader.loadModel(MODEL_TONGS_INGOT);
|
||||
public IModelCustom modelC = AdvancedModelLoader.loadModel(MODEL);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
public IModelCustom modelPlate = AdvancedModelLoader.loadModel(MODEL_PLATE);
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
@@ -99,7 +104,7 @@ public class IRSlottedTongs implements IItemRenderer {
|
||||
}
|
||||
//Crucible Renderer
|
||||
if((stack.getItemDamage()==1)||(stack.getItemDamage()==2)||(stack.getItemDamage()==3)||(stack.getItemDamage()==4)||(stack.getItemDamage()==5)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_CRUCIBLE);
|
||||
modeltc.renderAll();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
@@ -130,6 +135,19 @@ public class IRSlottedTongs implements IItemRenderer {
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if((stack.getItemDamage()==10)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_CRUCIBLE);
|
||||
modeltc.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale1 = 0.6F;
|
||||
GL11.glScalef(scale1, 3.0f, scale1);
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(8.6F, 0.0F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(HOTPLATE_TEXTURE);
|
||||
modelPlate.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@@ -149,7 +167,7 @@ public class IRSlottedTongs implements IItemRenderer {
|
||||
}
|
||||
//Crucible Renderer
|
||||
if((stack.getItemDamage()==1)||(stack.getItemDamage()==2)||(stack.getItemDamage()==3)||(stack.getItemDamage()==4)||(stack.getItemDamage()==5)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_CRUCIBLE);
|
||||
modeltc.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
@@ -177,6 +195,18 @@ public class IRSlottedTongs implements IItemRenderer {
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if((stack.getItemDamage()==10)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_CRUCIBLE);
|
||||
modeltc.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, 3.0f, scale);
|
||||
GL11.glTranslatef(8.6F, 0.0F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(HOTPLATE_TEXTURE);
|
||||
modelPlate.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@@ -198,7 +228,7 @@ public class IRSlottedTongs implements IItemRenderer {
|
||||
|
||||
//Crucible Renderer
|
||||
if((stack.getItemDamage()==1)||(stack.getItemDamage()==2)||(stack.getItemDamage()==3)||(stack.getItemDamage()==4)||(stack.getItemDamage()==5)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_CRUCIBLE);
|
||||
modeltc.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.5F;
|
||||
@@ -226,6 +256,18 @@ public class IRSlottedTongs implements IItemRenderer {
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if((stack.getItemDamage()==10)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_CRUCIBLE);
|
||||
modeltc.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, 3.0f, scale);
|
||||
GL11.glTranslatef(8.6F, 0.0F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(HOTPLATE_TEXTURE);
|
||||
modelPlate.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
@@ -240,7 +282,7 @@ public class IRSlottedTongs implements IItemRenderer {
|
||||
}
|
||||
//Crucible Renderer
|
||||
if((stack.getItemDamage()==1)||(stack.getItemDamage()==2)||(stack.getItemDamage()==3)||(stack.getItemDamage()==4)||(stack.getItemDamage()==5)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_CRUCIBLE);
|
||||
modeltc.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.55F;
|
||||
@@ -250,15 +292,7 @@ public class IRSlottedTongs implements IItemRenderer {
|
||||
modelC.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
/*if((stack.getItemDamage()==6)){
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(LAPIS);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}*/
|
||||
|
||||
if(stack.getItemDamage()==6||
|
||||
stack.getItemDamage()==7||
|
||||
stack.getItemDamage()==8||
|
||||
@@ -278,6 +312,18 @@ public class IRSlottedTongs implements IItemRenderer {
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if((stack.getItemDamage()==10)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_CRUCIBLE);
|
||||
modeltc.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, 3.0f, scale);
|
||||
GL11.glTranslatef(8.6F, 0.0F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(HOTPLATE_TEXTURE);
|
||||
modelPlate.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user