Posted May 22, 20196 yr I'm upgrading my mod from 1.12.2 to 1.13.2 and the block highlighting (WorldRenderer.drawSelectionBoundingBox(box, red, green, blue, alpha);) produces a miniature set of block images in a cluster rather than highlighting the blocks themselves as in DrawBlockHighlightEvent. Does anyone know how the new WorlRenderer/Bufferbuilder parameters need to be set? Thanks.
May 22, 20196 yr Post your code. About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
May 22, 20196 yr Author 12 hours ago, OldManMorris said: I'm upgrading my mod from 1.12.2 to 1.13.2 and the block highlighting (WorldRenderer.drawSelectionBoundingBox(box, red, green, blue, alpha);) produces a miniature set of block images in a cluster rather than highlighting the blocks themselves as in DrawBlockHighlightEvent. Does anyone know how the new WorlRenderer/Bufferbuilder parameters need to be set? Thanks. AxisAlignedBB box = new AxisAlignedBB(pos).expand(1, 1, 1); red = ((color >> 16) & 0xff); green =((color >> & 0xff) / 255f; blue = ((color) & 0xff) / 255f; alpha = 1.0f; GlStateManager.pushMatrix(); GlStateManager.disableTexture2D(); GlStateManager.disableDepthTest(); GlStateManager.enableBlend(); GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); WorldRenderer.drawSelectionBoundingBox(box, red, green, blue, alpha); GlStateManager.enableDepthTest(); GlStateManager.disableBlend(); GlStateManager.enableTexture2D(); GlStateManager.popMatrix();
May 23, 20196 yr Post your entire code & don’t just copy paste it. Show where the code is being called from etc. A link to a GitHub repository is preferred, but a Gist will usually also work Edited May 23, 20196 yr by Cadiboo About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
May 23, 20196 yr Author OK. They're on https://github.com/ericlmorris/merlinsforge/tree/master/java BTW: Thanks.
May 24, 20196 yr I’m not able to reproduce this, please post a video of the issue About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
May 24, 20196 yr Author If it works for you, then the issue is probably in my configuration somehow. Still can't get it to work but I'm setting it aside for now till I can find 1.13/1.14 example that works. It works fine in my 1.12.2 version. Again, thanks for your time and help.
May 25, 20196 yr Author I found the solution inside WorldRenderer. Here's my slightly modified version: BlockPos blockpos = pos; IBlockState iblockstate = this.world.getBlockState(blockpos); red = ((color >> 16) & 0xff); green = ((color >> & 0xff) / 255f; blue = ((color) & 0xff) / 255f; alpha = 1.0f; GlStateManager.pushMatrix(); GlStateManager.enableBlend(); GlStateManager.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); GlStateManager.disableDepthTest(); GlStateManager.lineWidth(3.0F); GlStateManager.disableTexture2D(); GlStateManager.depthMask(false); GlStateManager.matrixMode(5889); GlStateManager.scalef(1.0F, 1.0F, 0.999F); double d0 = player.lastTickPosX + (player.posX - player.lastTickPosX) * (double) partialTicks; double d1 = player.lastTickPosY + (player.posY - player.lastTickPosY) * (double) partialTicks; double d2 = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * (double) partialTicks; WorldRenderer.drawShape(iblockstate.getShape(this.world, blockpos), (double) blockpos.getX() - d0 - 1, (double) blockpos.getY() - d1, (double) blockpos.getZ() - d2, red, green, blue, 1.0F); GlStateManager.popMatrix(); GlStateManager.matrixMode(5888); GlStateManager.depthMask(true); GlStateManager.enableDepthTest(); GlStateManager.enableTexture2D(); GlStateManager.disableBlend();
May 26, 20196 yr Pls use the code block tags About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
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.