NindyBun Posted December 28, 2021 Posted December 28, 2021 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? Quote
SoLegendary Posted December 29, 2021 Posted December 29, 2021 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 Quote
NindyBun Posted February 18, 2022 Author Posted February 18, 2022 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 Quote
Recommended Posts
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.