Jump to content

Recommended Posts

Posted

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

Posted

Hi

 

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

https://github.com/TheGreyGhost/MinecraftByExample

specifically

https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe15_item_smartitemmodel/ChessboardSmartItemModel.java

 

-TGG

Posted

Thank, I already know your tutorials ;)

I just want to make the 6 faces for a simple block, not a complex one like this chessboard.

 

The coordinates origin is at the center of the block ? Or at a corner ?

Posted

Hi

 

/**

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

 

-TGG

Posted

The texture i'm trying to add as an overlay is partially transparent. Is there something in particular to do in this case ?

Because I get the "missingno" texture even if the overlay is correctly registered !

Posted

Hi

 

Partially transparent texture makes no difference, it gets stitched into the blocks + items texture sheet and acts the same as any other texture.

 

The missing texture indicates you haven't properly registered your texture.  Show your code + error log?

 

-TGG

Posted

This is very very weird ! When I comment some code which normally affect nothing (log), it changes the overlays which works.

And if I decomment, other overlays that did not works, works ...

Posted

I found it !

 

@SideOnly(Side.CLIENT)
final class TexturesRegistrationHandler {

@SubscribeEvent
public void registerOverlays(TextureStitchEvent.Pre e) {

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

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

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

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.