Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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?

  • 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

 

  • 2 weeks later...
  • 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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.