Jump to content

What is a BakedQuad and how to create one


Recommended Posts

Hi !


Everything is in the title. I think a BakedQuad is a "face" of a cube but I'm not sure.

I looked into Minecraft code and I found a method makeBakedQuad() in FaceBakery class. Should I use this or just "new BakedQuad()" ?

If yes, what do I put as arguments, because there is a lot of them.


Thanks in advance

Link to comment
Share on other sites



This link has a lot more info on block models

http://greyminecraftcoder.blogspot.com.au/p/list-of-topics.html  (see the Blocks sections)


also this tutorial project has a section showing how to generate BakedQuads






Link to comment
Share on other sites




  // Creates a baked quad for the given face.

  // When you are directly looking at the face, the quad is centred at [centreLR, centreUD]

  // The left<->right "width" of the face is width, the bottom<-->top "height" is height.

  // The amount that the quad is displaced towards the viewer i.e. (perpendicular to the flat face you can see) is forwardDisplacement

  //  - for example, for an EAST face, a value of 0.00 lies directly on the EAST face of the cube.  a value of 0.01 lies

  //    slightly to the east of the EAST face (at x=1.01).  a value of -0.01 lies slightly to the west of the EAST face (at x=0.99).

  // The orientation of the faces is as per the diagram on this page

  //  http://greyminecraftcoder.blogspot.com.au/2014/12/block-models-texturing-quads-faces.html

  // Read this page to learn more about how to draw a textured quad

  //  http://greyminecraftcoder.blogspot.co.at/2014/12/the-tessellator-and-worldrenderer-18.html



Link to comment
Share on other sites

I found it !


final class TexturesRegistrationHandler {

public void registerOverlays(TextureStitchEvent.Pre e) {

	assert !OresTexturizer.overlaysLocations.isEmpty() : "overlaysLocations is empty !";

	OresTexturizer.overlaysLocations.forEach(new BiConsumer<String, ResourceLocation>() {
		public void accept(String srt, ResourceLocation location) {
                // I need only this :

                // I removed this :
			TextureSprite tx = new TextureSprite(location);
			boolean done = e.map.setTextureEntry(srt, tx);

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.

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.


  • Create New...

Important Information

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