Posted March 19, 20178 yr I have been (of course) messing around with the chest code, tried to render it with TESR. Who can help me with the rendering part?
March 19, 20178 yr Author The problem is that I am using a TESR to render but it still shows there error messages: [15:58:16] [Client thread/ERROR] [FML]: Model definition for location containertest:testblock#facing=north not found [15:58:16] [Client thread/ERROR] [FML]: Model definition for location containertest:testblock#facing=south not found [15:58:16] [Client thread/ERROR] [FML]: Model definition for location containertest:testblock#facing=west not found [15:58:16] [Client thread/ERROR] [FML]: Model definition for location containertest:testblock#facing=east not found
March 31, 20178 yr Author public void doRender(TileEntityTestBlock entity,double posX, double posZ, double posY, float useless, int iDontKnowWhatsThis) { int facing; ModelTestBlock mdr=new ModelTestBlock(); if (!entity.hasWorldObj()) { facing = 0; } else { Block block = entity.getBlockType(); facing = entity.getBlockMetadata(); if (block instanceof TestBlock && facing == 0) { facing = entity.getBlockMetadata(); } } this.bindTexture(texture); GlStateManager.pushMatrix(); GlStateManager.enableRescaleNormal(); if (iDontKnowWhatsThis < 0) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); } GlStateManager.translate((float)posX, (float)posZ, (float)posY + 1.0F); GlStateManager.scale(1.0F, -1.0F, -1.0F); GlStateManager.translate(0.5F, 0.5F, 0.5F); short rotation = 0; if (facing == 2) { rotation = 180; } if (facing == 3) { rotation = 0; } if (facing == 4) { rotation = 90; } if (facing == 5) { rotation = -90; } GlStateManager.rotate((float)rotation, 0.0F, 1.0F, 0.0F); GlStateManager.translate(-0.5F, -0.5F, -0.5F); float f1 = entity.caseAngle*9.0F; // f1 = 1.0F - f1; // f1 = 1.0F - f1 * f1 * f1; mdr.rechargerCase.rotateAngleY = f1; mdr.renderAll(); GlStateManager.popMatrix(); // if (iDontKnowWhatsThis >= 0) // { // GlStateManager.matrixMode(5890); // GlStateManager.popMatrix(); // GlStateManager.matrixMode(5888); // } if(entity.getStackInSlot(0)!=null){ //Render the item GlStateManager.pushMatrix(); Minecraft.getMinecraft().getRenderItem().renderItemModel(entity.getStackInSlot(0)); GlStateManager.disableRescaleNormal(); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.rotate(90.0F, 90.0F, 0.0F, 0.0F); GlStateManager.translate((float)posX, (float)posZ, (float)posY + 1.0F); GlStateManager.popMatrix(); } Mostly copied from chest renderer, no model files attached.
April 2, 20178 yr Author So how exactly do I do this. Also, the item is rendering under my feet, I don't know how can I deal with that.
April 2, 20178 yr Explain the problem: how is the item supposed to look, and what exactly is wrong with it. Post updated code if it has changed since last time.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.