New Repo
This commit is contained in:
77
src/main/java/com/kitsu/medievalcraft/renderer/RenderId.java
Normal file
77
src/main/java/com/kitsu/medievalcraft/renderer/RenderId.java
Normal file
@@ -0,0 +1,77 @@
|
||||
package com.kitsu.medievalcraft.renderer;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
|
||||
public class RenderId {
|
||||
|
||||
public static int myironingotID;
|
||||
public static int hotIronIngotID;
|
||||
public static int coolCrucibleID;
|
||||
public static int hotCrucibleID;
|
||||
public static int emptyCrucibleID;
|
||||
public static int ironPlateID;
|
||||
public static int hotIronPlateID;
|
||||
public static int coolCrucibleIronIngotID;
|
||||
public static int filledCrucibleDamascusID;
|
||||
public static int hotCrucibleDamascusID;
|
||||
public static int myDamascusIngotID;
|
||||
public static int hotDamascusIngotID;
|
||||
public static int anvilForgeID;
|
||||
public static int myDiamondID;
|
||||
public static int lapisCrucibleID;
|
||||
public static int myEmeraldID;
|
||||
public static int hotLapisCrucibleID;
|
||||
public static int lapisIngotID;
|
||||
public static int hotLapisIngotID;
|
||||
public static int redstoneIngotID;
|
||||
public static int testBlockID;
|
||||
public static int waterFilterID;
|
||||
public static int sandFilterID;
|
||||
public static int sandFilterEmptyID;
|
||||
public static int filledWaterCrucibleID;
|
||||
public static int solidFilterID;
|
||||
public static int smallLidID;
|
||||
public static int smallBarrelID;
|
||||
public static int shelfFourID;
|
||||
public static int fireboxID;
|
||||
public static int forgeID;
|
||||
|
||||
public static void init(){
|
||||
myironingotID = RenderingRegistry.getNextAvailableRenderId();
|
||||
hotIronIngotID = RenderingRegistry.getNextAvailableRenderId();
|
||||
coolCrucibleID = RenderingRegistry.getNextAvailableRenderId();
|
||||
hotCrucibleID = RenderingRegistry.getNextAvailableRenderId();
|
||||
coolCrucibleID = RenderingRegistry.getNextAvailableRenderId();
|
||||
emptyCrucibleID = RenderingRegistry.getNextAvailableRenderId();
|
||||
ironPlateID = RenderingRegistry.getNextAvailableRenderId();
|
||||
hotIronPlateID = RenderingRegistry.getNextAvailableRenderId();
|
||||
coolCrucibleIronIngotID = RenderingRegistry.getNextAvailableRenderId();
|
||||
filledCrucibleDamascusID = RenderingRegistry.getNextAvailableRenderId();
|
||||
hotCrucibleDamascusID = RenderingRegistry.getNextAvailableRenderId();
|
||||
myDamascusIngotID = RenderingRegistry.getNextAvailableRenderId();
|
||||
hotDamascusIngotID = RenderingRegistry.getNextAvailableRenderId();
|
||||
anvilForgeID = RenderingRegistry.getNextAvailableRenderId();
|
||||
myDiamondID = RenderingRegistry.getNextAvailableRenderId();
|
||||
lapisCrucibleID = RenderingRegistry.getNextAvailableRenderId();
|
||||
myEmeraldID = RenderingRegistry.getNextAvailableRenderId();
|
||||
hotLapisCrucibleID = RenderingRegistry.getNextAvailableRenderId();
|
||||
lapisIngotID = RenderingRegistry.getNextAvailableRenderId();
|
||||
hotLapisIngotID = RenderingRegistry.getNextAvailableRenderId();
|
||||
redstoneIngotID = RenderingRegistry.getNextAvailableRenderId();
|
||||
waterFilterID = RenderingRegistry.getNextAvailableRenderId();
|
||||
sandFilterID = RenderingRegistry.getNextAvailableRenderId();
|
||||
sandFilterEmptyID = RenderingRegistry.getNextAvailableRenderId();
|
||||
filledWaterCrucibleID = RenderingRegistry.getNextAvailableRenderId();
|
||||
solidFilterID = RenderingRegistry.getNextAvailableRenderId();
|
||||
smallLidID = RenderingRegistry.getNextAvailableRenderId();
|
||||
smallBarrelID = RenderingRegistry.getNextAvailableRenderId();
|
||||
shelfFourID = RenderingRegistry.getNextAvailableRenderId();
|
||||
fireboxID = RenderingRegistry.getNextAvailableRenderId();
|
||||
forgeID = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
testBlockID = RenderingRegistry.getNextAvailableRenderId();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,172 @@
|
||||
package com.kitsu.medievalcraft.renderer;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.item.ModItems;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.BarrelLidRender;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.SmallBarrelRender;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.TestBlockRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.crucibles.IronOreCrucibleRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.crucibles.LapisCrucibleRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.crucibles.RedstoneCrucibleRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.crucibles.WootzCrucibleRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.emptycrucibles.BoilCrucibleRender;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.emptycrucibles.ECCrucibleRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.emptycrucibles.SECrucibleRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.emptycrucibles.SlackCrucibleRender;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.emptycrucibles.TanCrucibleRender;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.emptycrucibles.WaterCrucibleRender;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.ingot.DamascusIngotRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.ingot.IronIngotRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.ingot.IronPlateRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.ingot.LapisIngotRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.ingot.MyDiamondRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.ingot.MyEmeraldRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.ingot.RedstoneIngotRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.machine.FireboxRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.machine.ForgeAnvilRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.machine.FourShelfRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.machine.SolidFilterRender;
|
||||
import com.kitsu.medievalcraft.renderer.blocks.machine.WaterFilterRenderer;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.ItemRendererITModelArrow;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.ItemRendererLongbow;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.ItemRendererModelArrow;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.IRCrucible;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty.IRSlackCrucible;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty.IRTanninCrucible;
|
||||
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.IronIngotIR;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.ingotsplates.IronPlateIR;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.machines.IRBarrelLid;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.machines.IRFirebox;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.machines.IRForgeAnvil;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.machines.IRShelfFour;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.machines.IRSmallBarrel;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.machines.IRSolidFilter;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.machines.IRWaterFilter;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.tongs.IRSlottedTongs;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.tools.IRCraftingBlade;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.tools.IRForgeHammer;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.tools.IRInlayHammer;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.weapons.IRBattleAxe;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.weapons.IRGladius;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.weapons.ItemRenderHeavymace;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.weapons.ItemRenderLongsword;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.weapons.ItemRenderWoodenShield;
|
||||
import com.kitsu.medievalcraft.renderer.itemrenderer.weapons.NewIronShield;
|
||||
import com.kitsu.medievalcraft.tileents.TileEntitySmallBarrel;
|
||||
import com.kitsu.medievalcraft.tileents.TileEntitySmallLid;
|
||||
import com.kitsu.medievalcraft.tileents.TileEntityTestBlock;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleIronOre;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleLapis;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleRedstone;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleWootz;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntityBoilingWaterCrucible;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntityEmptyCookedCrucible;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntityFilledWaterCrucible;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntitySlackWaterCrucible;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntitySoftEmptyCrucible;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntityTanWaterCrucible;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileDamascus;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileEntityMyDiamond;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileEntityMyEmerald;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileIronPlate;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileLapisIngot;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileMyIronIngot;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileRedstoneIngot;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntityAnvilForge;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntityFirebox;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntityShelfFour;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntitySolidFilter;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntityWaterFilter;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
|
||||
public class RendererRegistry {
|
||||
|
||||
public static final void init() {
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.woodenShield, new ItemRenderWoodenShield());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.ironShield, new NewIronShield());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.longSword, new ItemRenderLongsword());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.heavyMace, new ItemRenderHeavymace());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.battleAxe, new IRBattleAxe());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.gladius, new IRGladius());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.workBlade, new IRCraftingBlade());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.slottedTongs, new IRSlottedTongs());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.longbow, new ItemRendererLongbow());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.forgeHammer, new IRForgeHammer());
|
||||
MinecraftForgeClient.registerItemRenderer(ModItems.inlayHammer, new IRInlayHammer());
|
||||
|
||||
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());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.forgeAnvil), new IRForgeAnvil());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.waterFilter), new IRWaterFilter());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.solidFilter), new IRSolidFilter());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.filledWaterCrucible), new IRWaterCrucible());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.boilingWaterCrucible), new IRWaterCrucible());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.tanWaterCrucible), new IRTanninCrucible());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.slackWaterCrucible), new IRSlackCrucible());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.smallBarrel), new IRSmallBarrel());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.smallBarrelLid), new IRBarrelLid());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.shelfFour), new IRShelfFour());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.firebox), new IRFirebox());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.crucibleIronOre), new IRCrucible());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.crucibleIronIngot), new IRCrucible());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.crucibleWootz), new IRCrucible());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.crucibleLapis), new IRCrucible());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.crucibleRedstone), new IRCrucible());
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.refinedIron), new IronIngotIR());
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(ModBlocks.ironPlate), new IronPlateIR());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySoftEmptyCrucible.class, new SECrucibleRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityEmptyCookedCrucible.class, new ECCrucibleRenderer());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAnvilForge.class, new ForgeAnvilRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMyDiamond.class, new MyDiamondRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMyEmerald.class, new MyEmeraldRenderer());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWaterFilter.class, new WaterFilterRenderer());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTanWaterCrucible.class, new TanCrucibleRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFilledWaterCrucible.class, new WaterCrucibleRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBoilingWaterCrucible.class, new BoilCrucibleRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySlackWaterCrucible.class, new SlackCrucibleRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySolidFilter.class, new SolidFilterRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmallLid.class, new BarrelLidRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySmallBarrel.class, new SmallBarrelRender());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityShelfFour.class, new FourShelfRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFirebox.class, new FireboxRenderer());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCrucibleLapis.class, new LapisCrucibleRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCrucibleIronOre.class, new IronOreCrucibleRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCrucibleWootz.class, new WootzCrucibleRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCrucibleRedstone.class, new RedstoneCrucibleRenderer());
|
||||
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileMyIronIngot.class, new IronIngotRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileDamascus.class, new DamascusIngotRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileIronPlate.class, new IronPlateRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileRedstoneIngot.class, new RedstoneIngotRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileLapisIngot.class, new LapisIngotRenderer());
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTestBlock.class, new TestBlockRenderer());
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.TileEntitySmallLid;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class BarrelLidRender extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/BarrelLid.obj");
|
||||
private ResourceLocation loc;
|
||||
private ResourceLocation TEXTURE9 = new ResourceLocation("kitsumedievalcraft:models/BarrelLidRing.png");
|
||||
private ResourceLocation TEXTURE8 = new ResourceLocation("kitsumedievalcraft:models/BarrelLid8.png");
|
||||
private ResourceLocation TEXTURE7 = new ResourceLocation("kitsumedievalcraft:models/BarrelLid7.png");
|
||||
private ResourceLocation TEXTURE6 = new ResourceLocation("kitsumedievalcraft:models/BarrelLid6.png");
|
||||
private ResourceLocation TEXTURE5 = new ResourceLocation("kitsumedievalcraft:models/BarrelLid5.png");
|
||||
private ResourceLocation TEXTURE4 = new ResourceLocation("kitsumedievalcraft:models/BarrelLid4.png");
|
||||
private ResourceLocation TEXTURE3 = new ResourceLocation("kitsumedievalcraft:models/BarrelLid3.png");
|
||||
private ResourceLocation TEXTURE2 = new ResourceLocation("kitsumedievalcraft:models/BarrelLid2.png");
|
||||
private ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/BarrelLid1.png");
|
||||
private ResourceLocation TEXTURE0 = new ResourceLocation("kitsumedievalcraft:models/BarrelLid0.png");
|
||||
|
||||
//private IModelCustom model;
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
// This will move our renderer so that it will be on proper place in the
|
||||
// world
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntitySmallLid tile = (TileEntitySmallLid) tileEnt;
|
||||
|
||||
if(tile.logs==0){
|
||||
loc = TEXTURE0;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.logs==1){
|
||||
loc = TEXTURE1;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.logs==2){
|
||||
loc = TEXTURE2;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.logs==3){
|
||||
loc = TEXTURE3;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.logs==4){
|
||||
loc = TEXTURE4;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.logs==5){
|
||||
loc = TEXTURE5;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.logs==6){
|
||||
loc = TEXTURE6;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.logs==7){
|
||||
loc = TEXTURE7;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.logs==8){
|
||||
loc = TEXTURE8;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.ring==1){
|
||||
loc = TEXTURE9;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(loc);
|
||||
renderBlock(tile, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.smallBarrelLid);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
public void renderBlock(TileEntitySmallLid tl, World world, int i, int j,int k, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glRotatef(15F, 0F, 1F, 0F);
|
||||
float scale = 0.3F;
|
||||
GL11.glScalef(scale, scale+0.1F, scale);
|
||||
GL11.glTranslatef(1.66F,0.06F,1.66F);
|
||||
GL11.glRotatef(45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.entity.EntityModelArrow;
|
||||
|
||||
|
||||
public class RenderModelArrow extends Render
|
||||
{
|
||||
|
||||
//private static final ResourceLocation arrowTextures = new ResourceLocation("textures/entity/arrow.png");
|
||||
private static final ResourceLocation arrowTextures = new ResourceLocation("kitsumedievalcraft:textures/items/itemModelArrow.png");
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/ModelArrow.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/modelarrow.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
public void doRender(EntityModelArrow p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_, (float)p_76986_6_ );
|
||||
GL11.glRotatef(p_76986_1_.prevRotationYaw + (p_76986_1_.rotationYaw - p_76986_1_.prevRotationYaw) * p_76986_9_ - 90.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(p_76986_1_.prevRotationPitch + (p_76986_1_.rotationPitch - p_76986_1_.prevRotationPitch) * p_76986_9_, 0.0F, 0.0F, 1.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
protected ResourceLocation getEntityTexture(EntityModelArrow p_110775_1_)
|
||||
{
|
||||
return arrowTextures;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
|
||||
*/
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
|
||||
{
|
||||
return this.getEntityTexture((EntityModelArrow)p_110775_1_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then
|
||||
* handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic
|
||||
* (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1,
|
||||
* double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that.
|
||||
*/
|
||||
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
|
||||
{
|
||||
//System.out.println("doRender Ran");
|
||||
this.doRender((EntityModelArrow)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.item.ModItems;
|
||||
import com.kitsu.medievalcraft.tileents.TileEntitySmallBarrel;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class SmallBarrelRender extends TileEntitySpecialRenderer {
|
||||
|
||||
private ResourceLocation loc;
|
||||
private ResourceLocation unt = new ResourceLocation("kitsumedievalcraft:models/UntitledBarrel.png");
|
||||
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/NewBarrel.obj");
|
||||
private EntityItem entItem = null;
|
||||
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
TileEntitySmallBarrel tile = (TileEntitySmallBarrel) tileEnt;
|
||||
loc = new ResourceLocation(tile.res);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
if(loc == null){
|
||||
loc = unt;
|
||||
}
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(loc);
|
||||
renderBlock(tile, tileEnt.getWorldObj(), tileEnt.xCoord, tileEnt.yCoord, tileEnt.zCoord, ModBlocks.smallBarrel);
|
||||
|
||||
if(tile.scuddedloaded == true){
|
||||
//System.out.println(tile.scuddedloaded);
|
||||
entItem = new EntityItem(tile.getWorldObj(), x, y, z, new ItemStack(ModItems.scuddedLeather, 1));
|
||||
GL11.glPushMatrix();
|
||||
this.entItem.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.8f, 0.8f, 0.8f);
|
||||
GL11.glRotatef(45, 1, 0, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem, 0.55D, 0.4D, 0.24D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
GL11.glPopMatrix();
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
|
||||
if(tile.soakedloaded == true){
|
||||
//System.out.println(tile.soakedloaded);
|
||||
entItem = new EntityItem(tile.getWorldObj(), x, y, z, new ItemStack(ModItems.soakedLeather, 1));
|
||||
GL11.glPushMatrix();
|
||||
this.entItem.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.8f, 0.8f, 0.8f);
|
||||
GL11.glRotatef(45, 1, 0, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem, 0.55D, 0.4D, 0.24D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
GL11.glPopMatrix();
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileEntitySmallBarrel tl, World world, int x, int y,int z, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float scale = 0.28F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(1.6F,0.05F,1.6F);
|
||||
GL11.glRotatef(31F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
this.model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.TileEntityTestBlock;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class TestBlockRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/Shelf.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/ShelfMini32.png");
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
// This will move our renderer so that it will be on proper place in the
|
||||
// world
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntityTestBlock tileEntityBlock = (TileEntityTestBlock) tileEnt;
|
||||
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.testBlock);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void renderBlock(TileEntityTestBlock tl, World world, int i, int j,int k, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(1F, 1F, 1F);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks;
|
||||
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TestRender extends Render{
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/modelarrow.png");
|
||||
@Override
|
||||
public void doRender(Entity p_76986_1_, double p_76986_2_,
|
||||
double p_76986_4_, double p_76986_6_, float p_76986_8_,
|
||||
float p_76986_9_) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ResourceLocation getEntityTexture(Entity p_110775_1_) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.crucibles;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleIronOre;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class IronOreCrucibleRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
//private ModelFilledCrucible model;
|
||||
private static final ResourceLocation TEXTURE0 = new ResourceLocation("kitsumedievalcraft:models/Crucible.png");
|
||||
private static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/HotCrucible.png");
|
||||
private static final ResourceLocation TEXTURE2 = new ResourceLocation("kitsumedievalcraft:models/CoolCrucible.png");
|
||||
private static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
TileCrucibleIronOre tile = (TileCrucibleIronOre) tileEnt;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
if(tile.cooked==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE2);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE1);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==false && tile.cooked == false){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE0);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
renderBlock(tile, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.crucibleIronOre);
|
||||
GL11.glPopMatrix();
|
||||
//tile.markForUpdate();
|
||||
//tile.markDirty();
|
||||
}
|
||||
|
||||
public void renderBlock(TileCrucibleIronOre tl, World world, int i, int j,int k, Block block) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.28F, 0.28F, 0.28F);
|
||||
GL11.glTranslatef(1.76F, 0.0F, 1.85F);
|
||||
GL11.glRotatef(28.5F, 0F, 1F, 0F);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.crucibles;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleLapis;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class LapisCrucibleRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
//private ModelFilledCrucible model;
|
||||
public static final ResourceLocation TEXTURE0 = new ResourceLocation("kitsumedievalcraft:models/Crucible.png");
|
||||
public static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/HotCrucible.png");
|
||||
public static final ResourceLocation TEXTURE2 = new ResourceLocation("kitsumedievalcraft:models/CoolCrucible.png");
|
||||
|
||||
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
|
||||
IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
TileCrucibleLapis tile = (TileCrucibleLapis) tileEnt;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
if(tile.cooked==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE2);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE1);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==false && tile.cooked == false){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE0);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
renderBlock(tile, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.crucibleLapis);
|
||||
GL11.glPopMatrix();
|
||||
//tile.markForUpdate();
|
||||
//tile.markDirty();
|
||||
}
|
||||
|
||||
public void renderBlock(TileCrucibleLapis tl, World world, int i, int j,int k, Block block) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.28F, 0.28F, 0.28F);
|
||||
GL11.glTranslatef(1.76F, 0.0F, 1.85F);
|
||||
GL11.glRotatef(28.5F, 0F, 1F, 0F);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.crucibles;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleRedstone;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RedstoneCrucibleRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
|
||||
public static final ResourceLocation TEXTURE0 = new ResourceLocation("kitsumedievalcraft:models/Crucible.png");
|
||||
public static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/HotCrucible.png");
|
||||
public static final ResourceLocation TEXTURE2 = new ResourceLocation("kitsumedievalcraft:models/CoolCrucible.png");
|
||||
|
||||
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
|
||||
IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
TileCrucibleRedstone tile = (TileCrucibleRedstone) tileEnt;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
if(tile.cooked==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE2);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE1);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==false && tile.cooked == false){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE0);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
renderBlock(tile, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.crucibleRedstone);
|
||||
GL11.glPopMatrix();
|
||||
//tile.markForUpdate();
|
||||
//tile.markDirty();
|
||||
}
|
||||
|
||||
public void renderBlock(TileCrucibleRedstone tl, World world, int i, int j,int k, Block block) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.28F, 0.28F, 0.28F);
|
||||
GL11.glTranslatef(1.76F, 0.0F, 1.85F);
|
||||
GL11.glRotatef(28.5F, 0F, 1F, 0F);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.crucibles;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.TileCrucibleWootz;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class WootzCrucibleRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation TEXTURE0 = new ResourceLocation("kitsumedievalcraft:models/Crucible.png");
|
||||
public static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/HotCrucible.png");
|
||||
public static final ResourceLocation TEXTURE2 = new ResourceLocation("kitsumedievalcraft:models/CoolCrucible.png");
|
||||
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
|
||||
IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
TileCrucibleWootz tile = (TileCrucibleWootz) tileEnt;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
if(tile.cooked==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE2);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE1);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==false && tile.cooked == false){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE0);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
renderBlock(tile, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.crucibleWootz);
|
||||
GL11.glPopMatrix();
|
||||
//tile.markForUpdate();
|
||||
//tile.markDirty();
|
||||
}
|
||||
|
||||
public void renderBlock(TileCrucibleWootz tl, World world, int i, int j,int k, Block block) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.28F, 0.28F, 0.28F);
|
||||
GL11.glTranslatef(1.76F, 0.0F, 1.85F);
|
||||
GL11.glRotatef(28.5F, 0F, 1F, 0F);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.emptycrucibles;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntityBoilingWaterCrucible;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class BoilCrucibleRender extends TileEntitySpecialRenderer {
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/EmptyWaterCrucible.png");
|
||||
public static final ResourceLocation TEXTUREa = new ResourceLocation("kitsumedievalcraft:models/emptycookedcrucible.png");
|
||||
private static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/EmptyCrucible.obj");
|
||||
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntityBoilingWaterCrucible tileEntityBlock = (TileEntityBoilingWaterCrucible) tileEnt;
|
||||
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.boilingWaterCrucible);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileEntityBoilingWaterCrucible tl, World world, int i, int j,int k, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.28F, 0.28F, 0.28F);
|
||||
|
||||
GL11.glTranslatef(1.76F, 0.0F, 1.85F);
|
||||
|
||||
GL11.glRotatef(28.5F, 0F, 1F, 0F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.emptycrucibles;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntityEmptyCookedCrucible;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class ECCrucibleRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/emptycookedcrucible.png");
|
||||
private static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/EmptyCrucible.obj");
|
||||
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntityEmptyCookedCrucible tileEntityBlock = (TileEntityEmptyCookedCrucible) tileEnt;
|
||||
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.emptyCookedCrucible);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void renderBlock(TileEntityEmptyCookedCrucible tl, World world, int i, int j,int k, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.28F, 0.28F, 0.28F);
|
||||
|
||||
GL11.glTranslatef(1.76F, 0.0F, 1.85F);
|
||||
|
||||
GL11.glRotatef(28.5F, 0F, 1F, 0F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.emptycrucibles;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntitySoftEmptyCrucible;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class SECrucibleRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/EmptyUncookedCrucible.png");
|
||||
public static final ResourceLocation TEXTUREa = new ResourceLocation("kitsumedievalcraft:models/emptycookedcrucible.png");
|
||||
private static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/EmptyCrucible.obj");
|
||||
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
// This will move our renderer so that it will be on proper place in the
|
||||
// world
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntitySoftEmptyCrucible tileEntityBlock = (TileEntitySoftEmptyCrucible) tileEnt;
|
||||
/*
|
||||
* Note that true tile entity coordinates (tileEntity.xCoord, etc) do
|
||||
* not match to render coordinates (d, etc) that are calculated as [true
|
||||
* coordinates] - [player coordinates (camera coordinates)]
|
||||
*/
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.emptySoftCrucible);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@SuppressWarnings({ "cast",})
|
||||
public void renderBlock(TileEntitySoftEmptyCrucible tl, World world, int i, int j,int k, Block block) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
// This will make your block brightness dependent from surroundings
|
||||
// lighting.
|
||||
float f = block.getLightOpacity(world, i, j, k);
|
||||
int l = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
|
||||
int l1 = l % 65536;
|
||||
int l2 = l / 65536;
|
||||
tessellator.setColorOpaque_F(f, f, f);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,(float) l1, (float) l2);
|
||||
|
||||
/*
|
||||
* This will rotate your model corresponding to player direction that
|
||||
* was when you placed the block. If you want this to work, add these
|
||||
* lines to onBlockPlacedBy method in your block class. int dir =
|
||||
* MathHelper.floor_double((double)((player.rotationYaw * 4F) / 360F) +
|
||||
* 0.5D) & 3; world.setBlockMetadataWithNotify(x, y, z, dir, 0);
|
||||
*/
|
||||
|
||||
int dir = world.getBlockMetadata(i, j, k);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glTranslatef(0.5F, 0, 0.5F);
|
||||
// This line actually rotates the renderer.
|
||||
//
|
||||
|
||||
//bindTextureByName("yourTexturePath");
|
||||
GL11.glScalef(0.28F, 0.28F, 0.28F);
|
||||
|
||||
GL11.glTranslatef(1.76F, 0.0F, 1.85F);
|
||||
|
||||
GL11.glRotatef(28.5F, 0F, 1F, 0F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
/*
|
||||
* Place your rendering code here.
|
||||
*/
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.emptycrucibles;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntitySlackWaterCrucible;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class SlackCrucibleRender extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/EmptySlackCrucible.png");
|
||||
public static final ResourceLocation TEXTUREa = new ResourceLocation("kitsumedievalcraft:models/emptycookedcrucible.png");
|
||||
private static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/EmptyCrucible.obj");
|
||||
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntitySlackWaterCrucible tileEntityBlock = (TileEntitySlackWaterCrucible) tileEnt;
|
||||
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.slackWaterCrucible);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileEntitySlackWaterCrucible tl, World world, int i, int j,int k, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.28F, 0.28F, 0.28F);
|
||||
|
||||
GL11.glTranslatef(1.76F, 0.0F, 1.85F);
|
||||
|
||||
GL11.glRotatef(28.5F, 0F, 1F, 0F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.emptycrucibles;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntityTanWaterCrucible;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class TanCrucibleRender extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/EmptyTanninCrucible.png");
|
||||
public static final ResourceLocation TEXTUREa = new ResourceLocation("kitsumedievalcraft:models/emptycookedcrucible.png");
|
||||
private static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/EmptyCrucible.obj");
|
||||
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntityTanWaterCrucible tileEntityBlock = (TileEntityTanWaterCrucible) tileEnt;
|
||||
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.tanWaterCrucible);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileEntityTanWaterCrucible tl, World world, int i, int j,int k, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.28F, 0.28F, 0.28F);
|
||||
|
||||
GL11.glTranslatef(1.76F, 0.0F, 1.85F);
|
||||
|
||||
GL11.glRotatef(28.5F, 0F, 1F, 0F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.emptycrucibles;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.crucible.empty.TileEntityFilledWaterCrucible;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class WaterCrucibleRender extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/EmptyWaterCrucible.png");
|
||||
public static final ResourceLocation TEXTUREa = new ResourceLocation("kitsumedievalcraft:models/emptycookedcrucible.png");
|
||||
private static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/EmptyCrucible.obj");
|
||||
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntityFilledWaterCrucible tileEntityBlock = (TileEntityFilledWaterCrucible) tileEnt;
|
||||
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.filledWaterCrucible);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileEntityFilledWaterCrucible tl, World world, int i, int j,int k, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.28F, 0.28F, 0.28F);
|
||||
|
||||
GL11.glTranslatef(1.76F, 0.0F, 1.85F);
|
||||
|
||||
GL11.glRotatef(28.5F, 0F, 1F, 0F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.ingot;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileDamascus;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class DamascusIngotRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/DamascusIngot.png");
|
||||
private static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/HotDamascusIngot.png");
|
||||
private static final ResourceLocation MODEL_BASE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_BASE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
// This will move our renderer so that it will be on proper place in the
|
||||
// world
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
GL11.glTranslatef(1.65F, 0.175F, 1.75F);
|
||||
GL11.glRotatef(15F, 0F, 1F, 0F);
|
||||
TileDamascus tile = (TileDamascus) tileEnt;
|
||||
if(tile.hot==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE1);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==false){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
renderBlock(tile, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.damascus);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileDamascus tl, World world, int i, int j,int k, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.ingot;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileMyIronIngot;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class IronIngotRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.png");
|
||||
private static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/HotIronIngotBlock.png");
|
||||
private static final ResourceLocation MODEL_BASE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_BASE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
// This will move our renderer so that it will be on proper place in the
|
||||
// world
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
GL11.glTranslatef(1.65F, 0.175F, 1.75F);
|
||||
GL11.glRotatef(15F, 0F, 1F, 0F);
|
||||
TileMyIronIngot tile = (TileMyIronIngot) tileEnt;
|
||||
if(tile.hot==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE1);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==false){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
renderBlock(tile, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.refinedIron);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileMyIronIngot tl, World world, int i, int j,int k, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.ingot;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileIronPlate;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class IronPlateRenderer extends TileEntitySpecialRenderer {
|
||||
//"kitsumedievalcraft:models/IronPlate.obj"
|
||||
public static final ResourceLocation MODEL_BASE = new ResourceLocation("kitsumedievalcraft:models/IronPlate.obj");
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/IronPlate.png");
|
||||
private static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/HotIronPlate.png");
|
||||
|
||||
IModelCustom model = AdvancedModelLoader.loadModel(MODEL_BASE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileIronPlate tile = (TileIronPlate) tileEnt;
|
||||
if(tile.hot==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE1);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==false){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
renderBlock(tile, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.ironPlate);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileIronPlate tl, World world, int i, int j,int k, Block block) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.25F, 1.5F, 0.25F);
|
||||
GL11.glTranslatef(2.0F, 0.03F, 2.0F);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.ingot;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileLapisIngot;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileRedstoneIngot;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class LapisIngotRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/MyLapisBlock.png");
|
||||
public static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/MyHotLapisBlock.png");
|
||||
private static final ResourceLocation MODEL_BASE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_BASE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
GL11.glTranslatef(1.65F, 0.175F, 1.75F);
|
||||
GL11.glRotatef(15F, 0F, 1F, 0F);
|
||||
TileLapisIngot tile = (TileLapisIngot) tileEnt;
|
||||
if(tile.hot==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE1);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==false){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
renderBlock(tile, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.lapisIngot);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileLapisIngot tl, World world, int i, int j,int k, Block block) {
|
||||
GL11.glPushMatrix();
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.ingot;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileEntityMyDiamond;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class MyDiamondRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_BASE = new ResourceLocation("kitsumedievalcraft:models/Diamond.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/Diamond.png");
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_BASE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntityMyDiamond tileEntityBlock = (TileEntityMyDiamond) tileEnt;
|
||||
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.myDiamond);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({"cast" })
|
||||
public void renderBlock(TileEntityMyDiamond tl, World world, int i, int j,int k, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.08F, 0.08F, 0.08F);
|
||||
GL11.glTranslatef(6.3F, 0.0F, 6.3F);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.ingot;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileEntityMyEmerald;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class MyEmeraldRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_BASE = new ResourceLocation("kitsumedievalcraft:models/Emerald.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/Emerald.png");
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_BASE);
|
||||
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
// This will move our renderer so that it will be on proper place in the
|
||||
// world
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntityMyEmerald tileEntityBlock = (TileEntityMyEmerald) tileEnt;
|
||||
/*
|
||||
* Note that true tile entity coordinates (tileEntity.xCoord, etc) do
|
||||
* not match to render coordinates (d, etc) that are calculated as [true
|
||||
* coordinates] - [player coordinates (camera coordinates)]
|
||||
*/
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.myEmerald);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileEntityMyEmerald tl, World world, int i, int j,int k, Block block) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
// This will make your block brightness dependent from surroundings
|
||||
// lighting.
|
||||
float f = block.getLightOpacity(world, i, j, k);
|
||||
int l = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
|
||||
int l1 = l % 65536;
|
||||
int l2 = l / 65536;
|
||||
tessellator.setColorOpaque_F(f, f, f);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,(float) l1, (float) l2);
|
||||
|
||||
/*
|
||||
* This will rotate your model corresponding to player direction that
|
||||
* was when you placed the block. If you want this to work, add these
|
||||
* lines to onBlockPlacedBy method in your block class. int dir =
|
||||
* MathHelper.floor_double((double)((player.rotationYaw * 4F) / 360F) +
|
||||
* 0.5D) & 3; world.setBlockMetadataWithNotify(x, y, z, dir, 0);
|
||||
*/
|
||||
|
||||
//int dir = world.getBlockMetadata(i, j, k);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glTranslatef(0.5F, 0, 0.5F);
|
||||
// This line actually rotates the renderer.
|
||||
//
|
||||
|
||||
//bindTextureByName("yourTexturePath");
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, 1.0F, scale);
|
||||
GL11.glTranslatef(0.83F, 0.0F, 0.83F);
|
||||
|
||||
//GL11.glRotatef(15F, 0F, 1F, 0F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
/*
|
||||
* Place your rendering code here.
|
||||
*/
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.ingot;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.ingots.TileRedstoneIngot;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class RedstoneIngotRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/MyRedstoneBlock.png");
|
||||
public static final ResourceLocation TEXTURE1 = new ResourceLocation("kitsumedievalcraft:models/MyHotRedstoneBlock.png");
|
||||
private static final ResourceLocation MODEL_BASE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_BASE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
GL11.glTranslatef(1.65F, 0.175F, 1.75F);
|
||||
GL11.glRotatef(15F, 0F, 1F, 0F);
|
||||
TileRedstoneIngot tile = (TileRedstoneIngot) tileEnt;
|
||||
if(tile.hot==true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE1);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
if(tile.hot==false){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
tile.markForUpdate();
|
||||
tile.markDirty();
|
||||
}
|
||||
renderBlock(tile, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.redstoneIngot);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileRedstoneIngot tl, World world, int i, int j,int k, Block block) {
|
||||
GL11.glPushMatrix();
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntityFirebox;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class FireboxRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
//public ModelFirebox model;
|
||||
EntityItem entItem = null;
|
||||
//boolean slotStatus;
|
||||
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/Firebox.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/FireboxUV.png");
|
||||
|
||||
IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float scale) {
|
||||
TileEntityFirebox tileEntity = (TileEntityFirebox)tile;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
|
||||
renderBlock(tileEntity, tile.getWorldObj(), tile.xCoord,tile.yCoord, tile.zCoord, ModBlocks.firebox);
|
||||
|
||||
if(tileEntity.getStackInSlot(0) != null){
|
||||
entItem = new EntityItem(tileEntity.getWorldObj(), x, y, z, tileEntity.getStackInSlot(0));
|
||||
GL11.glPushMatrix();
|
||||
this.entItem.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(1.0f, 1.0f, 1.0f);
|
||||
//GL11.glRotatef(90, 0, 1, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem, 0.5D, 0.3D, 0.5D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
tileEntity.markForUpdate();
|
||||
tileEntity.markDirty();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileEntityFirebox tl, World world, int i, int j,int k, Block block) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
// This will make your block brightness dependent from surroundings
|
||||
// lighting.
|
||||
|
||||
int dir = world.getBlockMetadata(i, j, k);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glRotatef(15F, 0F, 1F, 0F);
|
||||
float scale = 0.50f;
|
||||
GL11.glScalef(scale, 1.16F, scale);
|
||||
GL11.glTranslatef(1.0F, 0.1F, 1.0F);
|
||||
//
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntityAnvilForge;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class ForgeAnvilRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
ItemStack stack;
|
||||
EntityItem entItem = null;
|
||||
|
||||
private static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/ForgeAnvil.obj");
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/ForgeAnvil.png");
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float scale) {
|
||||
TileEntityAnvilForge tileEntity = (TileEntityAnvilForge)tile;
|
||||
if(tileEntity.getStackInSlot(0)!=null){
|
||||
stack = tileEntity.getStackInSlot(0);
|
||||
}
|
||||
if(tileEntity.getStackInSlot(0)==null){
|
||||
stack = null;
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
|
||||
renderBlock(tileEntity, tile.getWorldObj(), tile.xCoord,tile.yCoord, tile.zCoord, ModBlocks.forgeAnvil);
|
||||
if(stack != null){
|
||||
entItem = new EntityItem(tileEntity.getWorldObj(), x, y, z, stack);
|
||||
GL11.glPushMatrix();
|
||||
this.entItem.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glRotatef(90, 1, 0, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(this.entItem, 0.48D, 0.25D, -1.0D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileEntityAnvilForge tl, World world, int i, int j,int k, Block block) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
// This will make your block brightness dependent from surroundings
|
||||
// lighting.
|
||||
float f = block.getLightOpacity(world, i, j, k);
|
||||
int l = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
|
||||
int l1 = l % 65536;
|
||||
int l2 = l / 65536;
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
//OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,(float) l1, (float) l2);
|
||||
|
||||
/*
|
||||
* This will rotate your model corresponding to player direction that
|
||||
* was when you placed the block. If you want this to work, add these
|
||||
* lines to onBlockPlacedBy method in your block class. int dir =
|
||||
* MathHelper.floor_double((double)((player.rotationYaw * 4F) / 360F) +
|
||||
* 0.5D) & 3; world.setBlockMetadataWithNotify(x, y, z, dir, 0);
|
||||
*/
|
||||
|
||||
int dir = world.getBlockMetadata(i, j, k);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glRotatef(15F, 0F, 1F, 0F);
|
||||
float scale = 0.58f;
|
||||
GL11.glScalef(scale, 0.63F, scale);
|
||||
GL11.glTranslatef(0.83F, 0.05F, 0.82F);
|
||||
if(dir == 1){
|
||||
GL11.glRotated(-90F, 0.0, 1.0F, 0.0F);
|
||||
}
|
||||
if(dir == 2){
|
||||
GL11.glRotated(-180F, 0.0, 1.0F, 0.0F);
|
||||
}
|
||||
if(dir == 3){
|
||||
GL11.glRotated(90F, 0.0, 1.0F, 0.0F);
|
||||
}
|
||||
//
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
/*
|
||||
* Place your rendering code here.
|
||||
*/
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,263 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntityShelfFour;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class FourShelfRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
private EntityItem entItem = null;
|
||||
private EntityItem entItem1 = null;
|
||||
private EntityItem entItem2 = null;
|
||||
private EntityItem entItem3 = null;
|
||||
private static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/Shelf.obj");
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/ShelfMini32.png");
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
// THE FKNG RENDERER NEEDS TO KNOW WHAT THE FK TO RENDER; SEND IT A FKNG ITEMSTACK
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
TileEntityShelfFour tileEntityBlock = (TileEntityShelfFour) tileEnt;
|
||||
//World world = tileEnt.getWorldObj();
|
||||
//System.out.println(tileEntityBlock.getStackInSlot(0));
|
||||
int dir = tileEnt.blockMetadata;
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
GL11.glRotated(90F, 0.0, 1.0F, 0.0F);
|
||||
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.shelfFour);
|
||||
|
||||
if(tileEntityBlock.getStackInSlot(0) != null){
|
||||
entItem = new EntityItem(tileEntityBlock.getWorldObj(), x, y, z, tileEntityBlock.getStackInSlot(0));
|
||||
if(dir == 0){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(90, 0, 1, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem, -1.175D, 0.95D, -0.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 1){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem, -1.175D, 0.95D, 1.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 2){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(-90, 0, 1, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem, 0.5D, 0.95D, 1.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 3){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem, 0.5D, 0.95D, -0.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
tileEntityBlock.markForUpdate();
|
||||
tileEntityBlock.markDirty();
|
||||
}
|
||||
if(tileEntityBlock.getStackInSlot(1) != null){
|
||||
entItem1 = new EntityItem(tileEntityBlock.getWorldObj(), x, y, z, tileEntityBlock.getStackInSlot(1));
|
||||
if(dir == 0){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem1.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(90, 0, 1, 0);;
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem1, -0.4D, 0.95D, -0.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 1){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem1.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem1, -0.4D, 0.95D, 1.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 2){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem1.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(-90, 0, 1, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem1, 1.25D, 0.95D, 1.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 3){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem1.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem1, 1.25D, 0.95D, -0.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
tileEntityBlock.markForUpdate();
|
||||
tileEntityBlock.markDirty();
|
||||
}
|
||||
if(tileEntityBlock.getStackInSlot(2) != null){
|
||||
entItem2 = new EntityItem(tileEntityBlock.getWorldObj(), x, y, z, tileEntityBlock.getStackInSlot(2));
|
||||
if(dir == 0){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem2.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(90, 0, 1, 0);;
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem2, -1.175D, 0.25D, -0.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 1){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem2.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem2, -1.175D, 0.25D, 1.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 2){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem2.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(-90, 0, 1, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem2, 0.5D, 0.25D, 1.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 3){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem2.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem2, 0.5D, 0.25D, -0.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
tileEntityBlock.markForUpdate();
|
||||
tileEntityBlock.markDirty();
|
||||
}
|
||||
if(tileEntityBlock.getStackInSlot(3) != null){
|
||||
entItem3 = new EntityItem(tileEntityBlock.getWorldObj(), x, y, z, tileEntityBlock.getStackInSlot(3));
|
||||
if(dir == 0){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem3.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(90, 0, 1, 0);;
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem3, -0.4D, 0.25D, -0.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 1){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem3.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem3, -0.4D, 0.25D, 1.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 2){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem3.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(-90, 0, 1, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem3, 1.25D, 0.25D, 1.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(dir == 3){
|
||||
GL11.glPushMatrix();
|
||||
this.entItem3.hoverStart = 0.0F;
|
||||
RenderItem.renderInFrame = true;
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entItem3, 1.25D, 0.25D, -0.35D, 0.0F, 0.0F);
|
||||
RenderItem.renderInFrame = false;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
tileEntityBlock.markForUpdate();
|
||||
tileEntityBlock.markDirty();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void renderBlock(TileEntityShelfFour tl, World world, int i, int j,int k, Block block) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
// This will make your block brightness dependent from surroundings
|
||||
// lighting.
|
||||
float f = block.getLightOpacity(world, i, j, k);
|
||||
int l = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
|
||||
int l1 = l % 65536;
|
||||
int l2 = l / 65536;
|
||||
tessellator.setColorOpaque_F(f, f, f);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,(float) l1, (float) l2);
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(0F, 1F, 1F);
|
||||
int dir = world.getBlockMetadata(i, j, k);
|
||||
if(dir == 1){
|
||||
GL11.glTranslatef(-1F, 0F, 1F);
|
||||
GL11.glRotated(-90F, 0.0, 1.0F, 0.0F);
|
||||
}
|
||||
if(dir == 2){
|
||||
GL11.glTranslatef(-2F, 0F, 0F);
|
||||
GL11.glRotated(-180F, 0.0, 1.0F, 0.0F);
|
||||
}
|
||||
if(dir == 3){
|
||||
GL11.glTranslatef(-1F, 0F, -1F);
|
||||
GL11.glRotated(90F, 0.0, 1.0F, 0.0F);
|
||||
}
|
||||
//GL11.glRotatef(15F, 0F, 1F, 0F);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
package com.kitsu.medievalcraft.renderer.blocks.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.machine.ModelSandFilter;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntitySandFilterEmpty;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class SandFilterEmptyRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
private ModelSandFilter model;
|
||||
public static boolean render;
|
||||
|
||||
public SandFilterEmptyRenderer () {
|
||||
model = new ModelSandFilter();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
World world = tileEnt.getWorldObj();
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntitySandFilterEmpty tileEntityBlock = (TileEntitySandFilterEmpty) world.getTileEntity((int) x, (int) y, (int) z);
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(ModelSandFilter.TEXTUREEMPTY);
|
||||
//FMLClientHandler.instance().getClient().renderEngine.bindTexture(SandFilterTexture.filterText.get(renderInt));
|
||||
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord, tileEnt.yCoord, tileEnt.zCoord, ModBlocks.sandFilterEmpty);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({"cast"})
|
||||
public void renderBlock(TileEntitySandFilterEmpty tileSand, World world, int x, int y,int z, Block block) {
|
||||
tileSand = (TileEntitySandFilterEmpty) world.getTileEntity(x, y, z);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
float f = block.getLightOpacity(world, x, y, z);
|
||||
int l = world.getLightBrightnessForSkyBlocks(x, y, z, 0);
|
||||
int l1 = l % 65536;
|
||||
int l2 = l / 65536;
|
||||
tessellator.setColorOpaque_F(f, f, f);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,(float) l1, (float) l2);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float scale = 0.8F;
|
||||
GL11.glScalef(scale, scale-0.05F, scale);
|
||||
GL11.glTranslatef(0.62F,0.58F,0.62F);
|
||||
|
||||
//ResourceLocation TEXTUREGET = new ResourceLocation(tileSand.getTexture(world, x, y, z));
|
||||
//ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/SandFilter.png");
|
||||
//ResourceLocation TEXTUREEMPTY = new ResourceLocation("kitsumedievalcraft:models/SandFilterEmpty.png");
|
||||
|
||||
//if (render == false){
|
||||
//FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTUREGET);
|
||||
//}
|
||||
//if (render == true){
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(ModelSandFilter.TEXTUREEMPTY);
|
||||
//}
|
||||
//FMLClientHandler.instance().getClient().renderEngine.bindTexture(ModelSandFilter.TEXTURE);
|
||||
//FMLClientHandler.instance().getClient().renderEngine.bindTexture(tileSand.getTexture(world, x, y, z));
|
||||
|
||||
this.model.render();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.item.ModItems;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntitySolidFilter;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class SolidFilterRender extends TileEntitySpecialRenderer {
|
||||
|
||||
private ResourceLocation loc;
|
||||
private static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/SandFilter.obj");
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/SandFilter.png");
|
||||
private static final ResourceLocation TEXTUREEMPTY = new ResourceLocation("kitsumedievalcraft:models/SandFilterEmpty.png");
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntitySolidFilter tileEntityBlock = (TileEntitySolidFilter) tileEnt;
|
||||
if(tileEntityBlock.getStackInSlot(0)!=null){
|
||||
if((tileEntityBlock.getStackInSlot(0).getItem()==ModItems.coarseFilter)||(tileEntityBlock.getStackInSlot(0).getItem()==ModItems.mediumFilter)||(tileEntityBlock.getStackInSlot(0).getItem()==ModItems.fineFilter)){
|
||||
loc = TEXTURE;
|
||||
}
|
||||
}
|
||||
if(tileEntityBlock.getStackInSlot(0)==null){
|
||||
loc = TEXTUREEMPTY;
|
||||
}
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(loc);
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.solidFilter);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileEntitySolidFilter tl, World world, int i, int j,int k, Block block) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
// This will make your block brightness dependent from surroundings
|
||||
// lighting.
|
||||
float f = block.getLightOpacity(world, i, j, k);
|
||||
int l = world.getLightBrightnessForSkyBlocks(i, j, k, 0);
|
||||
int l1 = l % 65536;
|
||||
int l2 = l / 65536;
|
||||
tessellator.setColorOpaque_F(f, f, f);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit,(float) l1, (float) l2);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
//GL11.glRotatef(15F, 0F, 1F, 0F);
|
||||
float scale = 0.8F;
|
||||
GL11.glScalef(scale, scale-0.05F, scale);
|
||||
GL11.glTranslatef(0.62F,0.58F,0.62F);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.kitsu.medievalcraft.renderer.blocks.machine;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
||||
import net.minecraftforge.client.model.IModelCustom;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.kitsu.medievalcraft.block.ModBlocks;
|
||||
import com.kitsu.medievalcraft.tileents.machine.TileEntityWaterFilter;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
|
||||
public class WaterFilterRenderer extends TileEntitySpecialRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/WaterFilter.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/WaterFilter.png");
|
||||
private IModelCustom model = AdvancedModelLoader.loadModel(MODEL_CRUCIBLE);
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEnt, double x, double y, double z, float scale) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
TileEntityWaterFilter tileEntityBlock = (TileEntityWaterFilter) tileEnt;
|
||||
|
||||
renderBlock(tileEntityBlock, tileEnt.getWorldObj(), tileEnt.xCoord,tileEnt.yCoord, tileEnt.zCoord, ModBlocks.waterFilter);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "cast"})
|
||||
public void renderBlock(TileEntityWaterFilter tl, World world, int i, int j,int k, Block block) {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(1.0F, 1.09F, 1.0F);
|
||||
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
this.model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer;
|
||||
|
||||
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;
|
||||
//import com.kitsu.medievalcraft.models.Model;
|
||||
|
||||
|
||||
|
||||
public class IRIronShieldNOT implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation IRON_SHIELD = new ResourceLocation("kitsumedievalcraft:models/IronShield.obj");
|
||||
public static final ResourceLocation ironshield = new ResourceLocation("kitsumedievalcraft:models/ironshield.png");
|
||||
//private static RenderItem renderItem = new RenderItem();
|
||||
public static boolean use;
|
||||
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(IRON_SHIELD);
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
return false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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) {
|
||||
|
||||
//System.out.println(use);
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
//EntityClientPlayerMP entityclientplayermp = this.mc.thePlayer;
|
||||
|
||||
|
||||
//System.out.println(a + " : " + b);
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float scale = 0.75F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(30F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-20F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.5F, -0.1F, -0.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ironshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.6F, 0.6F, 0.6F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(0F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(10F, 0.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(50F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glRotated(75, 1.0, 0.0, 0.0);
|
||||
GL11.glRotated(90, 0.0, 1.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(1.3F, 0.5F, 1.2F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ironshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(4.4F, 4.4F, 4.4F);
|
||||
GL11.glTranslatef(1.2F, 1.5F, 5.0F);
|
||||
//GL11.glRotatef(10, 0.0F, 1.0F, 1.0F);
|
||||
GL11.glRotatef(180, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(4, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ironshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.9F, 0.9F, 0.9F);
|
||||
//GL11.glTranslatef(1.8F, 2.46F, 0.0F);
|
||||
//GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ironshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer;
|
||||
|
||||
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 ItemRendererITModelArrow implements IItemRenderer{
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/ModelArrow.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/irontippedmodelarrow.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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
case ENTITY: {
|
||||
return (helper == ItemRendererHelper.ENTITY_BOBBING ||
|
||||
helper == ItemRendererHelper.ENTITY_ROTATION ||
|
||||
helper == ItemRendererHelper.EQUIPPED_BLOCK ||
|
||||
helper == ItemRendererHelper.INVENTORY_BLOCK ||
|
||||
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(1.0F, 1.0F, 1.0F);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-20F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(40F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.1F, -0.55F, 0.05F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glRotated(-85, 1.0, 0.0, 0.0);
|
||||
//GL11.glRotated(50, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(3, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float iscale = 9F;
|
||||
GL11.glScalef(iscale, iscale, iscale);
|
||||
GL11.glRotatef(-45, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(45, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.2F, 1.2F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(45F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(-0.0F, -0.2F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,436 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer;
|
||||
|
||||
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 ItemRendererLongbow implements IItemRenderer {
|
||||
|
||||
//MODELS
|
||||
//public static final ResourceLocation MODEL_X = new ResourceLocation("kitsumedievalcraft:models/NewLongbow.obj");
|
||||
public static final ResourceLocation MODEL_0 = new ResourceLocation("kitsumedievalcraft:models/Longbow0.obj");
|
||||
public static final ResourceLocation MODEL_1 = new ResourceLocation("kitsumedievalcraft:models/Longbow1.obj");
|
||||
public static final ResourceLocation MODEL_2 = new ResourceLocation("kitsumedievalcraft:models/Longbow2.obj");
|
||||
public static final ResourceLocation MODEL_3 = new ResourceLocation("kitsumedievalcraft:models/Longbow3.obj");
|
||||
public static final ResourceLocation MODEL_4 = new ResourceLocation("kitsumedievalcraft:models/Longbow4.obj");
|
||||
public static final ResourceLocation MODEL_5 = new ResourceLocation("kitsumedievalcraft:models/Longbow5.obj");
|
||||
public static final ResourceLocation MODEL_6 = new ResourceLocation("kitsumedievalcraft:models/Longbow6.obj");
|
||||
public static final ResourceLocation MODEL_7 = new ResourceLocation("kitsumedievalcraft:models/Longbow7.obj");
|
||||
public static final ResourceLocation MODEL_8 = new ResourceLocation("kitsumedievalcraft:models/Longbow8.obj");
|
||||
public static final ResourceLocation MODEL_9 = new ResourceLocation("kitsumedievalcraft:models/Longbow9.obj");
|
||||
public static final ResourceLocation MODEL_10 = new ResourceLocation("kitsumedievalcraft:models/Longbow10.obj");
|
||||
public static final ResourceLocation MODELARROW = new ResourceLocation("kitsumedievalcraft:models/ModelArrow.obj");
|
||||
//TEXTURES
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/LongbowRig.png");
|
||||
public static final ResourceLocation ARROWTEXTURE = new ResourceLocation("kitsumedievalcraft:models/modelarrow.png");
|
||||
|
||||
//ASSIGN MODELLOADER
|
||||
public IModelCustom model_0 = AdvancedModelLoader.loadModel(MODEL_0);
|
||||
//public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_X);;
|
||||
public IModelCustom model_1 = AdvancedModelLoader.loadModel(MODEL_1);
|
||||
public IModelCustom model_2 = AdvancedModelLoader.loadModel(MODEL_2);
|
||||
public IModelCustom model_3 = AdvancedModelLoader.loadModel(MODEL_3);
|
||||
public IModelCustom model_4 = AdvancedModelLoader.loadModel(MODEL_4);
|
||||
public IModelCustom model_5 = AdvancedModelLoader.loadModel(MODEL_5);
|
||||
public IModelCustom model_6 = AdvancedModelLoader.loadModel(MODEL_6);
|
||||
public IModelCustom model_7 = AdvancedModelLoader.loadModel(MODEL_7);
|
||||
public IModelCustom model_8 = AdvancedModelLoader.loadModel(MODEL_8);
|
||||
public IModelCustom model_9 = AdvancedModelLoader.loadModel(MODEL_9);
|
||||
public IModelCustom model_10 = AdvancedModelLoader.loadModel(MODEL_10);
|
||||
public IModelCustom model_arrow = AdvancedModelLoader.loadModel(MODELARROW);
|
||||
|
||||
private float x0 = 0.15F;
|
||||
private float x1 = 0.30F;
|
||||
private float x2 = 0.45F;
|
||||
private float x3 = 0.60F;
|
||||
private float x4 = 0.75F;
|
||||
private float x5 = 0.90F;
|
||||
private float x6 = 1.05F;
|
||||
private float x7 = 1.2F;
|
||||
private float x8 = 1.35F;
|
||||
private float x9 = 1.5F;
|
||||
//private float x10 = 1.65F;
|
||||
private float a = 1.8F;
|
||||
|
||||
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
case ENTITY: {
|
||||
return (helper == ItemRendererHelper.ENTITY_BOBBING ||
|
||||
helper == ItemRendererHelper.ENTITY_ROTATION ||
|
||||
helper == ItemRendererHelper.BLOCK_3D);
|
||||
}
|
||||
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
private void shootingRotate(){
|
||||
GL11.glTranslatef(-1.75F, -0.75F, 1.5F);
|
||||
GL11.glRotated(70, 1.0, 0.0, 0.0);
|
||||
GL11.glRotated(20, 0.0, 1.0, 0.0);
|
||||
GL11.glRotated(10, 0.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack stack, Object... data) {
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(190, 0.0, 1.0, 0.0);
|
||||
GL11.glRotated(-14, 0.0, 0.0, 1.0);
|
||||
GL11.glRotated(-11, 1.0, 0.0, 0.0);
|
||||
float equipScale = 0.55F;
|
||||
GL11.glScalef(equipScale,equipScale, equipScale);
|
||||
|
||||
GL11.glTranslatef(-0.75F, 0.0F, -0.45F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
if(stack.stackTagCompound.getInteger("D") == 0){
|
||||
GL11.glTranslatef(0.0F, 0.0F, 0.2F);
|
||||
model_0.renderAll();
|
||||
}
|
||||
|
||||
if(stack.stackTagCompound.getInteger("D") == 1){
|
||||
model_1.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F-x0, -0.075F, 0.1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 2){
|
||||
model_2.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x1, -0.075F, 0.1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 3){
|
||||
|
||||
model_3.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x2, -0.075F, 0.1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 4){
|
||||
|
||||
model_4.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x3, -0.075F, 0.1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 5){
|
||||
|
||||
model_5.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x4, -0.075F, 0.1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 6){
|
||||
|
||||
model_6.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x5, -0.075F, 0.1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 7){
|
||||
|
||||
model_7.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x6, -0.075F, 0.1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 8){
|
||||
|
||||
model_8.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x7, -0.075F, 0.1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 9){
|
||||
|
||||
model_9.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x8, -0.075F, 0.1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 10){
|
||||
|
||||
model_10.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x9, -0.075F, 0.1F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(-20, 0.0, 1.0, 0.0);
|
||||
GL11.glRotated(50, 0.0, 0.0, 1.0);
|
||||
GL11.glRotated(5, 1.0, 0.0, 0.0);
|
||||
float equipScale = 0.55F;
|
||||
GL11.glScalef(equipScale,equipScale, equipScale);
|
||||
GL11.glRotatef(270F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(280F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.4F, 1.4F, -2.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
if(stack.stackTagCompound.getInteger("D") == 0){
|
||||
|
||||
model_0.renderAll();
|
||||
}
|
||||
|
||||
if(stack.stackTagCompound.getInteger("D") == 1){
|
||||
shootingRotate();
|
||||
|
||||
model_1.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F-x0, -0.075F, 0.2F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 2){
|
||||
|
||||
shootingRotate();
|
||||
|
||||
model_2.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x1, -0.075F, 0.2F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 3){
|
||||
shootingRotate();
|
||||
|
||||
model_3.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x2, -0.075F, 0.2F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 4){
|
||||
shootingRotate();
|
||||
|
||||
model_4.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x3, -0.075F, 0.2F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 5){
|
||||
shootingRotate();
|
||||
|
||||
model_5.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x4, -0.075F, 0.2F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 6){
|
||||
shootingRotate();
|
||||
|
||||
model_6.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x5, -0.075F, 0.2F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 7){
|
||||
shootingRotate();
|
||||
|
||||
model_7.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x6, -0.075F, 0.2F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 8){
|
||||
shootingRotate();
|
||||
|
||||
model_8.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x7, -0.075F, 0.2F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 9){
|
||||
shootingRotate();
|
||||
|
||||
model_9.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x8, -0.075F, 0.2F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.stackTagCompound.getInteger("D") == 10){
|
||||
shootingRotate();
|
||||
|
||||
model_10.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(a, a, a);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.68F - x9, -0.075F, 0.2F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ARROWTEXTURE);
|
||||
model_arrow.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
float invScale = 1.8F;
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(invScale+1, invScale, invScale);
|
||||
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-35, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(0, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(-15.0F, 2.2F, 3.9F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model_0.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float eScale = 0.45F;
|
||||
GL11.glScalef(eScale, eScale, eScale);
|
||||
|
||||
GL11.glTranslatef(0.0F, 3.9F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model_0.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer;
|
||||
|
||||
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 ItemRendererModelArrow implements IItemRenderer{
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/ModelArrow.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/modelarrow.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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
case ENTITY: {
|
||||
return (helper == ItemRendererHelper.ENTITY_BOBBING ||
|
||||
helper == ItemRendererHelper.ENTITY_ROTATION ||
|
||||
helper == ItemRendererHelper.EQUIPPED_BLOCK ||
|
||||
helper == ItemRendererHelper.INVENTORY_BLOCK ||
|
||||
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(1.0F, 1.0F, 1.0F);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(90F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-20F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(40F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.1F, -0.55F, 0.05F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glRotated(-85, 1.0, 0.0, 0.0);
|
||||
//GL11.glRotated(50, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(3, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float iscale = 9F;
|
||||
GL11.glScalef(iscale, iscale, iscale);
|
||||
GL11.glRotatef(-45, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(45, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.2F, 1.2F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(45F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(-0.0F, -0.2F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles;
|
||||
|
||||
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 IRCrucible implements IItemRenderer{
|
||||
|
||||
private static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/Crucible.png");
|
||||
|
||||
private 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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles;
|
||||
|
||||
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 ItemRendererCDCrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/CoolCrucible.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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles;
|
||||
|
||||
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 ItemRendererCICrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/CoolCrucible.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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles;
|
||||
|
||||
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 ItemRendererFDCrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/Crucible.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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles;
|
||||
|
||||
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 ItemRendererFICrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/Crucible.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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles;
|
||||
|
||||
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 ItemRendererHDCrucible implements IItemRenderer{
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/HotDamascusCrucible.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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles;
|
||||
|
||||
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 ItemRendererHICrucible implements IItemRenderer{
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/HotCrucible.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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty;
|
||||
|
||||
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 IRSlackCrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/EmptyCrucible.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/EmptySlackCrucible.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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty;
|
||||
|
||||
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 IRTanninCrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/EmptyCrucible.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/EmptyTanninCrucible.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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty;
|
||||
|
||||
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 IRWaterCrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/EmptyCrucible.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/EmptyWaterCrucible.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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty;
|
||||
|
||||
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 ItemRendererECCrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/EmptyCrucible.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/emptycookedcrucible.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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.crucibles.empty;
|
||||
|
||||
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 ItemRendererSECrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/EmptyCrucible.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/EmptyUncookedCrucible.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.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(60F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.2F, -2.9F, 2.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.4F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.5F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.1F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
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 IRLapisIngot 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 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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
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 IRRedstoneIngot 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 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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,115 @@
|
||||
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.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 IronIngotIR 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);
|
||||
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);
|
||||
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);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
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.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 IronPlateIR implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/IronPlate.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/IronPlate.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
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 ItemRendererDamIngot 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 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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.longbow;
|
||||
|
||||
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 IRLongbow0 implements IItemRenderer {
|
||||
|
||||
//MODELS
|
||||
public static final ResourceLocation MODEL_0 = new ResourceLocation("kitsumedievalcraft:models/Longbow0.obj");
|
||||
public static final ResourceLocation MODEL_1 = new ResourceLocation("kitsumedievalcraft:models/Longbow1.obj");
|
||||
public static final ResourceLocation MODEL_2 = new ResourceLocation("kitsumedievalcraft:models/Longbow2.obj");
|
||||
public static final ResourceLocation MODEL_3 = new ResourceLocation("kitsumedievalcraft:models/Longbow3.obj");
|
||||
public static final ResourceLocation MODEL_4 = new ResourceLocation("kitsumedievalcraft:models/Longbow4.obj");
|
||||
public static final ResourceLocation MODEL_5 = new ResourceLocation("kitsumedievalcraft:models/Longbow5.obj");
|
||||
public static final ResourceLocation MODEL_6 = new ResourceLocation("kitsumedievalcraft:models/Longbow6.obj");
|
||||
public static final ResourceLocation MODEL_7 = new ResourceLocation("kitsumedievalcraft:models/Longbow7.obj");
|
||||
public static final ResourceLocation MODEL_8 = new ResourceLocation("kitsumedievalcraft:models/Longbow8.obj");
|
||||
public static final ResourceLocation MODEL_9 = new ResourceLocation("kitsumedievalcraft:models/Longbow9.obj");
|
||||
public static final ResourceLocation MODEL_10 = new ResourceLocation("kitsumedievalcraft:models/Longbow10.obj");
|
||||
public static final ResourceLocation MODELARROW = new ResourceLocation("kitsumedievalcraft:models/ModelArrow.obj");
|
||||
//TEXTURES
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/LongbowRig.png");
|
||||
public static final ResourceLocation ARROWTEXTURE = new ResourceLocation("kitsumedievalcraft:models/modelarrow.png");
|
||||
|
||||
//ASSIGN MODELLOADER
|
||||
public IModelCustom model_0 = AdvancedModelLoader.loadModel(MODEL_0);
|
||||
public IModelCustom model_1 = AdvancedModelLoader.loadModel(MODEL_1);
|
||||
public IModelCustom model_2 = AdvancedModelLoader.loadModel(MODEL_2);
|
||||
public IModelCustom model_3 = AdvancedModelLoader.loadModel(MODEL_3);
|
||||
public IModelCustom model_4 = AdvancedModelLoader.loadModel(MODEL_4);
|
||||
public IModelCustom model_5 = AdvancedModelLoader.loadModel(MODEL_5);
|
||||
public IModelCustom model_6 = AdvancedModelLoader.loadModel(MODEL_6);
|
||||
public IModelCustom model_7 = AdvancedModelLoader.loadModel(MODEL_7);
|
||||
public IModelCustom model_8 = AdvancedModelLoader.loadModel(MODEL_8);
|
||||
public IModelCustom model_9 = AdvancedModelLoader.loadModel(MODEL_9);
|
||||
public IModelCustom model_10 = AdvancedModelLoader.loadModel(MODEL_10);
|
||||
public IModelCustom model_arrow = AdvancedModelLoader.loadModel(MODELARROW);
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack stack, 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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 stack, Object... data) {
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float equipScale = 0.6F;
|
||||
GL11.glScalef(equipScale,equipScale, equipScale);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(195F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-17F, 0.0F, 1.0F, .0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.6F, 0.0F, -0.4F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
model_0.renderAll();
|
||||
//System.out.println(MODEL);
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
//float firstScale = 0.6F;
|
||||
GL11.glScalef(0.4F, 0.4F, 0.4F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
//GL11.glRotatef(-10F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glRotated(20, 0.0D, 1.0D, 0.0D);
|
||||
|
||||
GL11.glTranslatef(-1.6F, -0.5F, -1.4F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
model_0.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
float invScale = 1.8F;
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(invScale+1, invScale, invScale);
|
||||
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-35, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(0, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(-15.0F, 2.2F, 3.9F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model_0.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float eScale = 0.45F;
|
||||
GL11.glScalef(eScale, eScale, eScale);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(-60F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(45F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.0F, 3.9F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model_0.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.longbow;
|
||||
|
||||
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 IRLongbow1 implements IItemRenderer {
|
||||
|
||||
//MODELS
|
||||
public static final ResourceLocation MODEL_0 = new ResourceLocation("kitsumedievalcraft:models/Longbow0.obj");
|
||||
public static final ResourceLocation MODEL_1 = new ResourceLocation("kitsumedievalcraft:models/Longbow1.obj");
|
||||
public static final ResourceLocation MODEL_2 = new ResourceLocation("kitsumedievalcraft:models/Longbow2.obj");
|
||||
public static final ResourceLocation MODEL_3 = new ResourceLocation("kitsumedievalcraft:models/Longbow3.obj");
|
||||
public static final ResourceLocation MODEL_4 = new ResourceLocation("kitsumedievalcraft:models/Longbow4.obj");
|
||||
public static final ResourceLocation MODEL_5 = new ResourceLocation("kitsumedievalcraft:models/Longbow5.obj");
|
||||
public static final ResourceLocation MODEL_6 = new ResourceLocation("kitsumedievalcraft:models/Longbow6.obj");
|
||||
public static final ResourceLocation MODEL_7 = new ResourceLocation("kitsumedievalcraft:models/Longbow7.obj");
|
||||
public static final ResourceLocation MODEL_8 = new ResourceLocation("kitsumedievalcraft:models/Longbow8.obj");
|
||||
public static final ResourceLocation MODEL_9 = new ResourceLocation("kitsumedievalcraft:models/Longbow9.obj");
|
||||
public static final ResourceLocation MODEL_10 = new ResourceLocation("kitsumedievalcraft:models/Longbow10.obj");
|
||||
public static final ResourceLocation MODELARROW = new ResourceLocation("kitsumedievalcraft:models/ModelArrow.obj");
|
||||
//TEXTURES
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/LongbowRig.png");
|
||||
public static final ResourceLocation ARROWTEXTURE = new ResourceLocation("kitsumedievalcraft:models/modelarrow.png");
|
||||
|
||||
//ASSIGN MODELLOADER
|
||||
public IModelCustom model_0 = AdvancedModelLoader.loadModel(MODEL_0);
|
||||
public IModelCustom model_1 = AdvancedModelLoader.loadModel(MODEL_1);
|
||||
public IModelCustom model_2 = AdvancedModelLoader.loadModel(MODEL_2);
|
||||
public IModelCustom model_3 = AdvancedModelLoader.loadModel(MODEL_3);
|
||||
public IModelCustom model_4 = AdvancedModelLoader.loadModel(MODEL_4);
|
||||
public IModelCustom model_5 = AdvancedModelLoader.loadModel(MODEL_5);
|
||||
public IModelCustom model_6 = AdvancedModelLoader.loadModel(MODEL_6);
|
||||
public IModelCustom model_7 = AdvancedModelLoader.loadModel(MODEL_7);
|
||||
public IModelCustom model_8 = AdvancedModelLoader.loadModel(MODEL_8);
|
||||
public IModelCustom model_9 = AdvancedModelLoader.loadModel(MODEL_9);
|
||||
public IModelCustom model_10 = AdvancedModelLoader.loadModel(MODEL_10);
|
||||
public IModelCustom model_arrow = AdvancedModelLoader.loadModel(MODELARROW);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 equipScale = 0.6F;
|
||||
GL11.glScalef(equipScale,equipScale, equipScale);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(195F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-17F, 0.0F, 1.0F, .0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.6F, 0.0F, -0.4F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model_5.renderAll();
|
||||
//System.out.println(MODEL);
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
//float firstScale = 0.6F;
|
||||
GL11.glScalef(0.4F, 0.4F, 0.4F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
//GL11.glRotatef(-10F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glRotated(20, 0.0D, 1.0D, 0.0D);
|
||||
|
||||
GL11.glTranslatef(-1.6F, -0.5F, -1.4F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
model_5.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
float invScale = 1.8F;
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(invScale+1, invScale, invScale);
|
||||
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-35, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(0, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(-15.0F, 2.2F, 3.9F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model_1.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float eScale = 0.45F;
|
||||
GL11.glScalef(eScale, eScale, eScale);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(-60F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(45F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.0F, 3.9F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model_1.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.longbow;
|
||||
|
||||
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 IRLongbow10 implements IItemRenderer {
|
||||
|
||||
//MODELS
|
||||
public static final ResourceLocation MODEL_0 = new ResourceLocation("kitsumedievalcraft:models/Longbow0.obj");
|
||||
public static final ResourceLocation MODEL_1 = new ResourceLocation("kitsumedievalcraft:models/Longbow1.obj");
|
||||
public static final ResourceLocation MODEL_2 = new ResourceLocation("kitsumedievalcraft:models/Longbow2.obj");
|
||||
public static final ResourceLocation MODEL_3 = new ResourceLocation("kitsumedievalcraft:models/Longbow3.obj");
|
||||
public static final ResourceLocation MODEL_4 = new ResourceLocation("kitsumedievalcraft:models/Longbow4.obj");
|
||||
public static final ResourceLocation MODEL_5 = new ResourceLocation("kitsumedievalcraft:models/Longbow5.obj");
|
||||
public static final ResourceLocation MODEL_6 = new ResourceLocation("kitsumedievalcraft:models/Longbow6.obj");
|
||||
public static final ResourceLocation MODEL_7 = new ResourceLocation("kitsumedievalcraft:models/Longbow7.obj");
|
||||
public static final ResourceLocation MODEL_8 = new ResourceLocation("kitsumedievalcraft:models/Longbow8.obj");
|
||||
public static final ResourceLocation MODEL_9 = new ResourceLocation("kitsumedievalcraft:models/Longbow9.obj");
|
||||
public static final ResourceLocation MODEL_10 = new ResourceLocation("kitsumedievalcraft:models/Longbow10.obj");
|
||||
public static final ResourceLocation MODELARROW = new ResourceLocation("kitsumedievalcraft:models/ModelArrow.obj");
|
||||
//TEXTURES
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/LongbowRig.png");
|
||||
public static final ResourceLocation ARROWTEXTURE = new ResourceLocation("kitsumedievalcraft:models/modelarrow.png");
|
||||
|
||||
//ASSIGN MODELLOADER
|
||||
public IModelCustom model_0 = AdvancedModelLoader.loadModel(MODEL_0);
|
||||
public IModelCustom model_1 = AdvancedModelLoader.loadModel(MODEL_1);
|
||||
public IModelCustom model_2 = AdvancedModelLoader.loadModel(MODEL_2);
|
||||
public IModelCustom model_3 = AdvancedModelLoader.loadModel(MODEL_3);
|
||||
public IModelCustom model_4 = AdvancedModelLoader.loadModel(MODEL_4);
|
||||
public IModelCustom model_5 = AdvancedModelLoader.loadModel(MODEL_5);
|
||||
public IModelCustom model_6 = AdvancedModelLoader.loadModel(MODEL_6);
|
||||
public IModelCustom model_7 = AdvancedModelLoader.loadModel(MODEL_7);
|
||||
public IModelCustom model_8 = AdvancedModelLoader.loadModel(MODEL_8);
|
||||
public IModelCustom model_9 = AdvancedModelLoader.loadModel(MODEL_9);
|
||||
public IModelCustom model_10 = AdvancedModelLoader.loadModel(MODEL_10);
|
||||
public IModelCustom model_arrow = AdvancedModelLoader.loadModel(MODELARROW);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 equipScale = 0.6F;
|
||||
GL11.glScalef(equipScale,equipScale, equipScale);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(195F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-17F, 0.0F, 1.0F, .0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.6F, 0.0F, -0.4F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model_10.renderAll();
|
||||
//System.out.println(MODEL);
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
//float firstScale = 0.6F;
|
||||
GL11.glScalef(0.4F, 0.4F, 0.4F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
//GL11.glRotatef(-10F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glRotated(20, 0.0D, 1.0D, 0.0D);
|
||||
|
||||
GL11.glTranslatef(-1.6F, -0.5F, -1.4F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
|
||||
model_10.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
float invScale = 1.8F;
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(invScale+1, invScale, invScale);
|
||||
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-35, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(0, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(-15.0F, 2.2F, 3.9F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model_10.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float eScale = 0.45F;
|
||||
GL11.glScalef(eScale, eScale, eScale);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(-60F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(45F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.0F, 3.9F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model_10.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.machines;
|
||||
|
||||
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 IRBarrelLid implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/BarrelLid.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/BarrelLid0.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
@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.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(1.5F, 0.3F, -0.2F);
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(22F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 1.5F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(-135F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.0F, -0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.45F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.2F, 0.0F);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
GL11.glTranslatef(0.0F, -0.4F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.machines;
|
||||
|
||||
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 IRFirebox implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/Firebox.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/FireboxUV.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.5F;
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(22F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glScalef(scale, 1.0f, scale);
|
||||
GL11.glTranslatef(2.25F, -0.75F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.8F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(-135F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.0F, 0.5F, -0.4F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, 1.0f, scale);
|
||||
|
||||
//GL11.glRotatef(-47, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(-20, 0.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -0.3F, 0.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.5F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.machines;
|
||||
|
||||
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 IRForgeAnvil implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/ForgeAnvil.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/ForgeAnvil.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.8F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(22F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-0.2F, -1.5F, -1.05F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.8F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(-135F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.0F, -0.2F, -0.4F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.0F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.machines;
|
||||
|
||||
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 IRShelfFour implements IItemRenderer {
|
||||
|
||||
private static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/Shelf.obj");
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/ShelfMini32.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
@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.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(22F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(0F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(2.25F, -0.75F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.8F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(-135F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.0F, 0.5F, -0.4F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(-47, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(-20, 0.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.0F, 0.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.5F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.machines;
|
||||
|
||||
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 IRSmallBarrel implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/BarrelFinished.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/BarrelFinished.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL);
|
||||
|
||||
@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.325F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(3.2F, -0.75F, -0.2F);
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(22F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.5F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(-135F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.0F, -0.9F, 0.3F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.4F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.4F, 0.0F);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
GL11.glTranslatef(0.0F, -0.4F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.machines;
|
||||
|
||||
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 IRSolidFilter implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/SandFilter.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/SandFilterEmpty.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 false;
|
||||
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, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(22F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.2F, 0.0F, 0.0F);
|
||||
GL11.glRotated(45F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(-30F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(0F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 1.0F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glTranslatef(0.0F, 0.3F, 0.7F);
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(-135F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.7F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.0F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.machines;
|
||||
|
||||
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 IRWaterFilter implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/WaterFilter.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/WaterFilter.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.325F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(2.65F, 0.65F, -0.5F);
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(22F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
float f = 0.7F;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(-135F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-45F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(1.0F, -0.2F, -0.4F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 0.48F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
//GL11.glTranslatef(0.0F, -1.0F, 0.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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRSlottedTongs implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/TongsEmpty.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongs.png");
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsCrucible.obj");
|
||||
public static final ResourceLocation TEXTURE_CRUCIBLE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsCrucible.png");
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS_INGOT = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.obj");
|
||||
public static final ResourceLocation TEXTURE_INGOT = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.png");
|
||||
|
||||
public static final ResourceLocation MODEL = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
public static final ResourceLocation CRUCIBLETEXT = new ResourceLocation("kitsumedievalcraft:models/HotCrucible.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/MyLapisBlock.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);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 stack, Object... data) {
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
GL11.glTranslatef(0.2F, 0.0F, 0.85F);
|
||||
if(stack.isItemDamaged()==false){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
}
|
||||
//Crucible Renderer
|
||||
if((stack.getItemDamage()==1)||(stack.getItemDamage()==2)||(stack.getItemDamage()==3)||(stack.getItemDamage()==4)||(stack.getItemDamage()==5)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
modeltc.renderAll();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float scale1 = 0.6F;
|
||||
GL11.glScalef(scale1, scale1, scale1);
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(7.6F, -1.8F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(CRUCIBLETEXT);
|
||||
modelC.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if(stack.getItemDamage()==6){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
||||
modelti.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale1 = 1.1F;
|
||||
GL11.glScalef(scale1, scale1, scale1);
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glTranslatef(-0.05F, 0.0F, -1.0F);
|
||||
|
||||
if(stack.isItemDamaged()==false){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
}
|
||||
//Crucible Renderer
|
||||
if((stack.getItemDamage()==1)||(stack.getItemDamage()==2)||(stack.getItemDamage()==3)||(stack.getItemDamage()==4)||(stack.getItemDamage()==5)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
modeltc.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(7.5F, -1.8F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(CRUCIBLETEXT);
|
||||
modelC.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if(stack.getItemDamage()==6){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
||||
modelti.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 3.0F;
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-1.8F, 0.0F, -3.7F);
|
||||
if(stack.isItemDamaged()==false){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
}
|
||||
|
||||
//Crucible Renderer
|
||||
if((stack.getItemDamage()==1)||(stack.getItemDamage()==2)||(stack.getItemDamage()==3)||(stack.getItemDamage()==4)||(stack.getItemDamage()==5)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
modeltc.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(9.25F, 0.15F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(CRUCIBLETEXT);
|
||||
modelC.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
if(stack.getItemDamage()==6){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
||||
modelti.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
if(stack.isItemDamaged()==false){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
}
|
||||
//Crucible Renderer
|
||||
if((stack.getItemDamage()==1)||(stack.getItemDamage()==2)||(stack.getItemDamage()==3)||(stack.getItemDamage()==4)||(stack.getItemDamage()==5)){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
modeltc.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.55F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(8.4F, -1.8F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(CRUCIBLETEXT);
|
||||
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(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
if(stack.getItemDamage()==6){
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE_INGOT);
|
||||
modelti.renderAll();
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsCoolLapisIngot implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/MyLapisBlock.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 0.85F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.05F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,201 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsCoolPlate implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronPlate.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/IronPlate.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.55F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 1.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.9F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, 6.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.85F, 0.01F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.05F, 0.0F, 0.5F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, 6.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.85F, 0.01F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.0F;
|
||||
GL11.glScalef(scale, scale, 6.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(5.3F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, 6.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.75F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsCoolRedstoneIngot implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/MyRedstoneBlock.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 0.85F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.05F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsDCrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsCrucible.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsCrucible.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/HotDamascusCrucible.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.7F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(7.6F, -1.8F, 0.0F);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.7F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.85F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(7.5F, -1.8F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(9.25F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.8F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.55F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.4F, -1.8F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsHotDamascus implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/HotDamascusIngot.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 0.85F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.05F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsHotIron implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/HotIronIngotBlock.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 0.85F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.05F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsHotLapisIngot implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/MyHotLapisBlock.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 0.85F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.05F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsHotPlate implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronPlate.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/HotIronPlate.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.55F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 1.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.9F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, 6.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.85F, 0.01F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.05F, 0.0F, 0.5F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, 6.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.85F, 0.01F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.0F;
|
||||
GL11.glScalef(scale, scale, 6.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(5.3F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, 6.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.75F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsICrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsCrucible.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsCrucible.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/HotCrucible.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.7F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(7.6F, -1.8F, 0.0F);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.7F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.85F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(7.5F, -1.8F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(9.25F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.8F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.55F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.4F, -1.8F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
public class IRStoneTongsLapisCrucible {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsMyDamascusIngot implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/DamascusIngot.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 0.85F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.05F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsMyIronIngot implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 0.85F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.05F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsRedCrucible implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsCrucible.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsCrucible.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/CrucibleModel.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/HotDamascusCrucible.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.7F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(7.6F, -1.8F, 0.0F);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.7F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.85F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(7.5F, -1.8F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(9.25F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glTranslatef(0.0F, 0.8F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.55F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.4F, -1.8F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 IRStoneTongsRedIngot implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongsIngot.png");
|
||||
|
||||
public static final ResourceLocation MODEL_INGOT = new ResourceLocation("kitsumedievalcraft:models/IronIngotBlock.obj");
|
||||
public static final ResourceLocation INGOT_TEXTURE = new ResourceLocation("kitsumedievalcraft:models/MyHotRedstoneBlock.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
public IModelCustom modelingot = AdvancedModelLoader.loadModel(MODEL_INGOT);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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 f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 0.85F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(180F, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.05F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 1.1F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(4.7F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 2.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-2.0F, 0.0F, -4.35F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.6F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
GL11.glTranslatef(8.6F, 0.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(INGOT_TEXTURE);
|
||||
modelingot.renderAll();
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tongs;
|
||||
|
||||
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 ItemRendererEmptyStoneTongs implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation MODEL_TONGS = new ResourceLocation("kitsumedievalcraft:models/TongsEmpty.obj");
|
||||
public static final ResourceLocation TEXTURE = new ResourceLocation("kitsumedievalcraft:models/StoneTongs.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(MODEL_TONGS);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(100F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(110F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(25, 0.0, 0.0, 1.0);
|
||||
|
||||
GL11.glTranslatef(0.2F, 0.0F, 0.85F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.5F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
|
||||
GL11.glTranslatef(-0.05F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float f = 3.0F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
GL11.glRotatef(90, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-45, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(-1.8F, 0.0F, -3.7F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float f = 0.45F;
|
||||
GL11.glScalef(f, f, f);
|
||||
|
||||
//GL11.glTranslatef(0.0F, 0.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TEXTURE);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tools;
|
||||
|
||||
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 IRCraftingBlade implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation LONGSWORD = new ResourceLocation("kitsumedievalcraft:models/CraftingBlade.obj");
|
||||
public static final ResourceLocation blade = new ResourceLocation("kitsumedievalcraft:models/CraftingBlade.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(LONGSWORD);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(190F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-13F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(5, 0.0, 1.0, 0.0);
|
||||
float scale = 0.4F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(-1.1F, -0.45F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(190F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(80F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-15F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(180F, 0.0F, 1.0F, 0.0F);
|
||||
float scale = 0.4F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.0F, -1.5F, -2.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(135F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
GL11.glScalef(4.0F, 4.0F, 4.0F);
|
||||
GL11.glTranslatef(0.0F, -1.0F, -2.9F);
|
||||
//GL11.glRotatef(135, 0.0F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tools;
|
||||
|
||||
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 IRForgeHammer implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation LONGSWORD = new ResourceLocation("kitsumedievalcraft:models/ForgeHammer.obj");
|
||||
public static final ResourceLocation blade = new ResourceLocation("kitsumedievalcraft:models/ForgeHammer.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(LONGSWORD);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(10F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(10F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotated(5, 0.0, 1.0, 0.0);
|
||||
//float scale = 0.2F;
|
||||
//GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.45F, 0.2F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-25F, 1.0F, 0.0F, 0.0F);
|
||||
float scale = 0.8F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
//GL11.glRotated(180, 0.0, 0.0, 1.0);
|
||||
//GL11.glRotated(180, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(180, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.3F, -0.2F, 0.7F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(135F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
GL11.glScalef(6.0F, 6.0F, 6.0F);
|
||||
GL11.glTranslatef(0.0F, -0.3F, -1.85F);
|
||||
//GL11.glRotatef(135, 0.0F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.7F, 0.7F, 0.7F);
|
||||
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.tools;
|
||||
|
||||
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 IRInlayHammer implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation LONGSWORD = new ResourceLocation("kitsumedievalcraft:models/InlayHammer.obj");
|
||||
public static final ResourceLocation blade = new ResourceLocation("kitsumedievalcraft:models/InlayHammer.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(LONGSWORD);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(10F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(10F, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotated(5, 0.0, 1.0, 0.0);
|
||||
float scale = 0.2F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(2.1F, -0.2F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(80F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-15F, 1.0F, 0.0F, 0.0F);
|
||||
float scale = 0.15F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
//GL11.glRotated(180, 0.0, 0.0, 1.0);
|
||||
//GL11.glRotated(180, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(180, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(2.0F, -0.3F, 2.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotated(135F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
float scale = 1.5F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(0.0F, -3.4F, -7.9F);
|
||||
//GL11.glRotatef(135, 0.0F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
float scale = 0.2F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.weapons;
|
||||
|
||||
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 IRBattleAxe implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation LONGSWORD = new ResourceLocation("kitsumedievalcraft:models/Battleaxev3.obj");
|
||||
public static final ResourceLocation blade = new ResourceLocation("kitsumedievalcraft:models/Battleaxe.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(LONGSWORD);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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.25F, 0.25F, 0.25F);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(45F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(2.8F, 0.2F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.3F, 0.4F, 0.3F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
//GL11.glRotated(-85, 1.0, 0.0, 0.0);
|
||||
//GL11.glRotated(50, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(3, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glTranslatef(0.9F, -0.9F, 0.9F);
|
||||
GL11.glTranslatef(2.0F, -1.6F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(2.3F, 2.3F, 2.3F);
|
||||
GL11.glTranslatef(1.8F, 5.25F, 0.0F);
|
||||
GL11.glRotatef(135, 0.0F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.weapons;
|
||||
|
||||
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;
|
||||
|
||||
import com.kitsu.medievalcraft.util.IRTextureModel;
|
||||
|
||||
public class IRGladius implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation LONGSWORD = new ResourceLocation("kitsumedievalcraft:models/Gladius.obj");
|
||||
public static final ResourceLocation blade = new ResourceLocation("kitsumedievalcraft:models/Gladius.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(LONGSWORD);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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.glRotatef(35F, 0.0F, 0.0F, 1.0F);
|
||||
float scale = 0.2F;
|
||||
GL11.glScalef(scale, 0.2F, scale);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(3.5F, -1.1F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(IRTextureModel.weaponText.get(item.stackTagCompound.getInteger("GLADIUSTEXTURE")));
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(15F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glScalef(0.2F, 0.2F, 0.2F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
//GL11.glRotated(180, 0.0, 0.0, 1.0);
|
||||
//GL11.glRotated(180, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(180, 1.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(3.0F, -1.5F, -0.5F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(2.0F, 2.0F, 2.0F);
|
||||
GL11.glTranslatef(1.65F, 6.2F, 0.0F);
|
||||
GL11.glRotatef(135, 0.0F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.2F, 0.2F, 0.2F);
|
||||
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.weapons;
|
||||
|
||||
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 ItemRenderHeavymace implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation LONGSWORD = new ResourceLocation("kitsumedievalcraft:models/Heavymace.obj");
|
||||
public static final ResourceLocation blade = new ResourceLocation("kitsumedievalcraft:models/Heavymace.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(LONGSWORD);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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.25F, 0.25F, 0.25F);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(45F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(2.8F, 0.2F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
//GL11.glRotated(-85, 1.0, 0.0, 0.0);
|
||||
//GL11.glRotated(50, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(3, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glTranslatef(0.9F, -0.9F, 0.9F);
|
||||
GL11.glTranslatef(2.75F, -1.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(2.5F, 2.5F, 2.5F);
|
||||
GL11.glTranslatef(2.5F, 3.75F, 0.0F);
|
||||
GL11.glRotatef(135, 0.0F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glTranslatef(0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,166 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.weapons;
|
||||
|
||||
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;
|
||||
//import com.kitsu.medievalcraft.models.Model;
|
||||
|
||||
|
||||
|
||||
public class ItemRenderIronShield implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation IRON_SHIELD = new ResourceLocation("kitsumedievalcraft:models/IronShield.obj");
|
||||
public static final ResourceLocation ironshield = new ResourceLocation("kitsumedievalcraft:models/ironshield.png");
|
||||
//private static RenderItem renderItem = new RenderItem();
|
||||
public static boolean use;
|
||||
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(IRON_SHIELD);
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
return false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return true;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return true;
|
||||
}
|
||||
case ENTITY: {
|
||||
return false;
|
||||
}
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,
|
||||
ItemRendererHelper helper) {
|
||||
|
||||
switch(type) {
|
||||
case EQUIPPED: {
|
||||
return false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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) {
|
||||
|
||||
//System.out.println(use);
|
||||
|
||||
switch(type) {
|
||||
|
||||
case EQUIPPED: {
|
||||
|
||||
//EntityClientPlayerMP entityclientplayermp = this.mc.thePlayer;
|
||||
|
||||
|
||||
//System.out.println(a + " : " + b);
|
||||
GL11.glPushMatrix();
|
||||
|
||||
float scale = 0.75F;
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(30F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-20F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(20F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(0.5F, -0.1F, -0.1F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ironshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.7F, 0.7F, 0.7F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(0F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotatef(10F, 0.0F, 0.0F, 0.0F);
|
||||
GL11.glRotatef(50F, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glRotated(75, 1.0, 0.0, 0.0);
|
||||
GL11.glRotated(-90, 0.0, 1.0, 0.0);
|
||||
GL11.glRotated(180, 0.0, 0.0, 1.0);
|
||||
GL11.glTranslatef(0.5F, -1.1F, -1.7F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ironshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(4.4F, 4.4F, 4.4F);
|
||||
GL11.glTranslatef(1.2F, 1.5F, 5.0F);
|
||||
//GL11.glRotatef(10, 0.0F, 1.0F, 1.0F);
|
||||
GL11.glRotatef(180, 1.0F, 0.0F, 0.0F);
|
||||
//GL11.glRotatef(4, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ironshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.9F, 0.9F, 0.9F);
|
||||
//GL11.glTranslatef(1.8F, 2.46F, 0.0F);
|
||||
//GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(ironshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.weapons;
|
||||
|
||||
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;
|
||||
//import com.kitsu.medievalcraft.models.Model;
|
||||
|
||||
|
||||
|
||||
public class ItemRenderLongsword implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation LONGSWORD = new ResourceLocation("kitsumedievalcraft:models/Longsword.obj");
|
||||
public static final ResourceLocation blade = new ResourceLocation("kitsumedievalcraft:models/Longsword.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(LONGSWORD);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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.19F, 0.19F, 0.19F);
|
||||
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
//GL11.glRotatef(90F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(45F, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(3.6F, -3.15F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.3F, 0.3F, 0.3F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(40F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
//GL11.glRotated(-85, 1.0, 0.0, 0.0);
|
||||
//GL11.glRotated(50, 0.0F, 0.0F, 1.0F);
|
||||
//GL11.glRotated(3, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
//GL11.glTranslatef(0.9F, -0.9F, 0.9F);
|
||||
GL11.glTranslatef(2.75F, -4.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(1.6F, 1.6F, 1.6F);
|
||||
GL11.glTranslatef(0.9F, 9.25F, 0.0F);
|
||||
GL11.glRotatef(135, 0.0F, 0.0F, -1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.28F, 0.28F, 0.28F);
|
||||
//GL11.glTranslatef(1.8F, 2.46F, 0.0F);
|
||||
//GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(blade);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.weapons;
|
||||
|
||||
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;
|
||||
|
||||
//import com.kitsu.medievalcraft.models.Model;
|
||||
import com.kitsu.medievalcraft.item.weapon.ItemWoodenShield;
|
||||
|
||||
|
||||
|
||||
public class ItemRenderWoodenShield implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation WOODEN_SHIELD = new ResourceLocation("kitsumedievalcraft:models/woodenShieldObjectTriangle.obj");
|
||||
public static final ResourceLocation woodenshield = new ResourceLocation("kitsumedievalcraft:models/woodenshield.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(WOODEN_SHIELD);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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.875F, 0.875F, 0.875F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(10F, 0.0F, 0.0F, -1.0F);
|
||||
GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
GL11.glTranslatef(-0.35F, -1.5F, -0.55F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(woodenshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
if (ItemWoodenShield.woodenShieldInUse == true) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
|
||||
GL11.glRotatef(0F, 0.0F, 0.0F, 0.0F);
|
||||
|
||||
GL11.glRotated(-85, 1.0, 0.0, 0.0);
|
||||
GL11.glRotated(50, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotated(3, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
GL11.glTranslatef(0.9F, -0.9F, 0.9F);
|
||||
//GL11.glTranslatef(-0.35F, -1.5F, -0.55F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(woodenshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(9.5F, 9.5F, 9.5F);
|
||||
GL11.glTranslatef(0.85F, 0.1F, 0.0F);
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(woodenshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(1.25F, 1.25F, 1.25F);
|
||||
//GL11.glTranslatef(1.8F, 2.46F, 0.0F);
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(woodenshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
package com.kitsu.medievalcraft.renderer.itemrenderer.weapons;
|
||||
|
||||
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;
|
||||
|
||||
import com.kitsu.medievalcraft.item.weapon.ItemIronShield;
|
||||
|
||||
public class NewIronShield implements IItemRenderer {
|
||||
|
||||
public static final ResourceLocation WOODEN_SHIELD = new ResourceLocation("kitsumedievalcraft:models/NewIronShield.obj");
|
||||
public static final ResourceLocation woodenshield = new ResourceLocation("kitsumedievalcraft:models/NewIronShield.png");
|
||||
|
||||
public IModelCustom model = AdvancedModelLoader.loadModel(WOODEN_SHIELD);
|
||||
|
||||
@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 false;
|
||||
}
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
return false;
|
||||
}
|
||||
case INVENTORY: {
|
||||
return false;
|
||||
}
|
||||
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.7F, 0.7F, 1.0F);
|
||||
GL11.glTranslatef(0.87F, 0.23F, 0.0F);
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glRotatef(270F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(10F, 0.0F, 0.0F, -1.0F);
|
||||
GL11.glRotated(90, 1.0, 0.0, 0.0);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(woodenshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
} break;
|
||||
|
||||
case EQUIPPED_FIRST_PERSON: {
|
||||
if (ItemIronShield.ironShieldInUse == true) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1.0F, 1.0F, 1.0F);
|
||||
|
||||
//ANGLE, X ROTATE, Y ROTATE, Z ROTATE
|
||||
GL11.glTranslatef(0.9F, 1.4F, -0.5F);
|
||||
GL11.glRotated(-115, 1.0, 0.0, 0.0);
|
||||
GL11.glRotated(50, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
//GL11.glRotatef(25F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-20F, 0.0F, 1.0F, 0.0F);
|
||||
//GL11.glRotated(-10, 0.0, 1.0, 0.0);
|
||||
|
||||
//GL11.glRotated(40, 0.0F, 1.0F, 0.0F);
|
||||
|
||||
|
||||
//GL11.glTranslatef(-0.35F, -1.5F, -0.55F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(woodenshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
} break;
|
||||
|
||||
case INVENTORY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glScalef(6.0F, 6.0F, 6.0F);
|
||||
GL11.glTranslatef(0.9F, 1.1F, -10.0F);
|
||||
GL11.glRotatef(-90, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(180, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(woodenshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
} break;
|
||||
|
||||
case ENTITY: {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glScalef(0.75F, 0.75F, 0.75F);
|
||||
//GL11.glTranslatef(1.8F, 2.46F, 0.0F);
|
||||
GL11.glRotatef(90, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, 1.2F, 0.0F);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(woodenshield);
|
||||
model.renderAll();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user