Posted December 28, 20213 yr As the title suggests, I want to somehow highlight or visually show an area of blocks around the place the player is looking at. I heard I can use DrawBlockHighlightEvent and/or GLStateManager but how would I go about doing so?
December 29, 20213 yr For 1.16.5 you can check out this example code here: https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/usefultools/debugging/DebugBlockVoxelShapeHighlighter.java From what I understand it basically cancels DrawBlockHighlightEvent and then goes on to write what the event would do in the first place so that you can adjust its parameters. If you want to change the block to be highlighted for example, you can change the BlockPos variable to whatever coordinate you want. Keep it mind it only ever highlights the wireframe, not the block faces themselves. If you ever manage to get this working in 1.17.1 please tell me! I've been stuck on this issue for a while
February 18, 20223 yr Author On 12/29/2021 at 2:08 PM, SoLegendary said: For 1.16.5 you can check out this example code here: https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/usefultools/debugging/DebugBlockVoxelShapeHighlighter.java From what I understand it basically cancels DrawBlockHighlightEvent and then goes on to write what the event would do in the first place so that you can adjust its parameters. If you want to change the block to be highlighted for example, you can change the BlockPos variable to whatever coordinate you want. Keep it mind it only ever highlights the wireframe, not the block faces themselves. If you ever manage to get this working in 1.17.1 please tell me! I've been stuck on this issue for a while https://github.com/NindyBun/BurnerGun_1.16.5-3.0.0/blob/master/src/main/java/com/nindybun/burnergun/client/renderer/BlockRenderer.java I just did it this way and it works much better
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.