Jump to content

Correct code.


mahony0509

Recommended Posts

Hello,

I was looking to make a custom container and used the tutorial on the minecraft forge wiki to show me how.

I tried it with the suggested edits and it still doesn't work.

I am looking for the updated version of this.

http://www.minecraftforge.net/wiki/Containers_and_GUIs

Beginner Forge Developer, Currently developing a mod that implements new food and machines.

Link to comment
Share on other sites

 @Override
        protected void drawGuiContainerBackgroundLayer(float par1, int par2,
                        int par3) {
                //draw your Gui here, only thing you need to change is the path
                int texture = mc.renderEngine.getTexture("/gui/trap.png");
                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
                this.mc.renderEngine.bindTexture(texture);
                int x = (width - xSize) / 2;
                int y = (height - ySize) / 2;
                this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
        }

 

I replaced this with the recommended code:

this.mc.renderEngine.bindTexture("/gui/trap.png");            // With this
                int x = (width - xSize) / 2;
                int y = (height - ySize) / 2;
                this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);

 

The "mc.renderengine" section doesn't work.

Beginner Forge Developer, Currently developing a mod that implements new food and machines.

Link to comment
Share on other sites

I really don't know how to fix it, can you tell me how?

 

You need a resource location. There are tons of threads regarding the new texture system.

 

Meaning, if you google or search about the 1.6.X texture system you shall find SEVERAL threads about it..

So go do that!

If you guys dont get it.. then well ya.. try harder...

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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