Posted July 29, 201510 yr 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
July 29, 201510 yr 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
July 29, 201510 yr Author 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 ?
July 29, 201510 yr 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
July 29, 201510 yr Author 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 !
July 30, 201510 yr 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
July 30, 201510 yr Author 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 ...
July 30, 201510 yr Author 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); } }); } }
July 30, 201510 yr Author Now the items works, and the blocks in the world have the overlay but on a white background ... Any ideas ?
July 30, 201510 yr Hi Probably either the alpha channel on your texture image is broken, or you haven't turned on alpha blending (your block getRenderType is wrong http://greyminecraftcoder.blogspot.com.au/2014/12/block-rendering-18.html) -TGG
July 30, 201510 yr I had to change getBlockLayer() to return CUTOUT_MIPPED ah yeah, I meant getBlockLayer() not getRenderType(), my bad. -TGG
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.