Posted December 27, 20186 yr I would like to draw something like the player xp bar in the world when the player looks at a tile entity. I got the part to look at tile entity and right now I just show an actionbar text, but I would like to make things prettier.
December 27, 20186 yr You’ve kinda solved your own problem in the title, understand what happens when minecraft draws name tags, then make your own implementation. I believe the code for it is in EntityRenderer#renderLabel 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)
December 27, 20186 yr Author Ok, I tried sending a packet from server when player looks at the tile entity that should show a nameplate like vanilla one, but there's some strange behaviour. The sky flickers everytime a packet is received and the nameplate doesn't show. That's the packet handler https://github.com/Insane-96/XpHolder/blob/2.1/common/net/insane96mcp/xpholder/network/GetXpStored.java#L49 The position and the amount is received correctly.
December 28, 20186 yr Author Ok, managed to draw in the event but the nameplate still doesn't show for some reasons. I might be missing somethinghttps://github.com/Insane-96/XpHolder/blob/2.1/common/net/insane96mcp/xpholder/events/RenderWorldLast.java#L34
December 28, 20186 yr You might want to look at https://github.com/Cadiboo/WIPTech/blob/fb5883e9d76ef0361ec1ebbcb9c508611dd2ef6b/src/main/java/cadiboo/wiptech/client/ClientEventSubscriber.java#L228 and https://github.com/Cadiboo/WIPTech/blob/fb5883e9d76ef0361ec1ebbcb9c508611dd2ef6b/src/main/java/cadiboo/wiptech/client/ClientEventSubscriber.java#L358. Notice that I do some stuff to get the render position, which I then use for translations to be at the right position for my in-world rendering 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)
December 28, 20186 yr 8 minutes ago, Cadiboo said: Notice that I do some stuff to get the render position, which I then use for translations to be at the right position for my in-world rendering https://github.com/Cadiboo/WIPTech/blob/fb5883e9d76ef0361ec1ebbcb9c508611dd2ef6b/src/main/java/cadiboo/wiptech/client/ClientEventSubscriber.java#L259 https://github.com/Cadiboo/WIPTech/blob/fb5883e9d76ef0361ec1ebbcb9c508611dd2ef6b/src/main/java/cadiboo/wiptech/client/ClientEventSubscriber.java#L265 https://github.com/Cadiboo/WIPTech/blob/fb5883e9d76ef0361ec1ebbcb9c508611dd2ef6b/src/main/java/cadiboo/wiptech/client/ClientEventSubscriber.java#L294 I don't see you doing any translating at all Edited December 28, 20186 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)
December 28, 20186 yr Author I don't understand why I need to translate Edited December 28, 20186 yr by Insane96MCP
December 28, 20186 yr Author I just tried copy-paste your code HAHHAHAHHAA Btw yeah, I would like to understand why all this needs to be done Edited December 28, 20186 yr by Insane96MCP
December 28, 20186 yr To change from render coordinates (on screen coordinates) to world coordinates (BlockPoss) you have to do some translations. This article explains it nicely https://www.quora.com/What-does-it-mean-by-world-and-world-coordinate-in-computer-graphics 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.