Novârch Posted May 17, 2020 Posted May 17, 2020 I've made a custom entity that I use Minecraft#setRenderViewEntity with. I do this because I want the player to be able to remotely control the entity and I think it looks cool. When using the method the player's model disappears, how can I prevent that, is there a better method do achieve the effect I'm looking for? Quote It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".
DavidM Posted May 17, 2020 Posted May 17, 2020 Haven't looked at the code regarding this yet (currently on mobile), but I believe this is caused by the player's model is not being rendered in first person view (the game still thinks the player is in first person view). I would suggest to check out the rendering of the player in third person view (see references to GameSettings::thirdPersonView) Quote Some tips: Spoiler Modder Support: Spoiler 1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code. 2. Always post your code. 3. Never copy and paste code. You won't learn anything from doing that. 4. Quote Programming via Eclipse's hotfixes will get you nowhere 5. Learn to use your IDE, especially the debugger. 6. Quote The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it. Support & Bug Reports: Spoiler 1. Read the EAQ before asking for help. Remember to provide the appropriate log(s). 2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.
Novârch Posted May 17, 2020 Author Posted May 17, 2020 Bump. Quote It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".
Novârch Posted May 18, 2020 Author Posted May 18, 2020 14 hours ago, diesieben07 said: The logic for when an entity is being rendered or not is in WorldRenderer#updateCameraAndRender (look at the for loop at the end where it calls renderEntity). You have to make sure that the conditions there are met. I don't think that's what I'm looking for, one of the conditions is !(entity instanceof ClientPlayerEntity), my issue is the player not rendering, the renderViewEntity renders just fine up to a certain distance from the player. Quote It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".
Novârch Posted May 18, 2020 Author Posted May 18, 2020 9 minutes ago, diesieben07 said: Breaking the check down an entity is being rendered if all the following are true: The entity is inside the view frustrum or being ridden by the player. The entity is not the renderViewEntity or third person mode is active or the entity is sleeping. The entity is not a player or is the renderViewEntity. 1 and two are satisfied (the player will be inside the view frustrum and it will not be the renderViewEntity). The third one is the problem here, it is a player and not the renderViewEntity. There does not seem to be a way to bypass this. What about making a custom entity and setting it's position to the player's? Quote It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".
DavidM Posted May 18, 2020 Posted May 18, 2020 It might be better to manually render a player there instead of creating a new entity, as the effect is intended for visual only. Quote Some tips: Spoiler Modder Support: Spoiler 1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code. 2. Always post your code. 3. Never copy and paste code. You won't learn anything from doing that. 4. Quote Programming via Eclipse's hotfixes will get you nowhere 5. Learn to use your IDE, especially the debugger. 6. Quote The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it. Support & Bug Reports: Spoiler 1. Read the EAQ before asking for help. Remember to provide the appropriate log(s). 2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.
Novârch Posted May 18, 2020 Author Posted May 18, 2020 6 hours ago, DavidM said: It might be better to manually render a player there instead of creating a new entity, as the effect is intended for visual only. You can do that? How? Quote It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".
DavidM Posted May 18, 2020 Posted May 18, 2020 3 hours ago, Novârch said: You can do that? How? You can subscribe to RenderWorldLastEvent and render the player model in the subscriber. Quote Some tips: Spoiler Modder Support: Spoiler 1. Do not follow tutorials on YouTube, especially TechnoVision (previously called Loremaster) and HarryTalks, due to their promotion of bad practice and usage of outdated code. 2. Always post your code. 3. Never copy and paste code. You won't learn anything from doing that. 4. Quote Programming via Eclipse's hotfixes will get you nowhere 5. Learn to use your IDE, especially the debugger. 6. Quote The "picture that's worth 1000 words" only works if there's an obvious problem or a freehand red circle around it. Support & Bug Reports: Spoiler 1. Read the EAQ before asking for help. Remember to provide the appropriate log(s). 2. Versions below 1.11 are no longer supported due to their age. Update to a modern version of Minecraft to receive support.
Novârch Posted May 19, 2020 Author Posted May 19, 2020 18 hours ago, DavidM said: You can subscribe to RenderWorldLastEvent and render the player model in the subscriber. A few questions about that, do I make an instance of PlayerModel or PlayerRenderer, how do I set the model's position, how do I get an instance of IVertexBuilder, do I make my own if so how does it work? Quote It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".
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.