Suleiman700 Posted October 15, 2022 Share Posted October 15, 2022 (edited) Hello. I am trying to draw a line behind player when he moves. The idea behind this mod is to help players when they go mining, It will help them follow the walk path using this mod. The problem is that in 1.19.2 I cannot find the render event & player movement event (maybe these events are not need, I dunno) - I used to create mods for 1.12.2 Like when a player moves it will call a render method that draws line at player pos xyz. Thanks in advance! Edited October 15, 2022 by Suleiman700 Quote Link to comment Share on other sites More sharing options...
warjort Posted October 15, 2022 Share Posted October 15, 2022 (edited) Use EntityRenderersEvent.AddLayers to add a new RenderLayer to the player's LivingEntityRenderer. For players you need to add it to each "skin". Edited October 15, 2022 by warjort Quote Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post. Link to comment Share on other sites More sharing options...
warjort Posted October 15, 2022 Share Posted October 15, 2022 An alternative approach if you want a "persistant" path is to spawn a Particle at the player's location every few ticks from your own client side PlayerTickEvent Quote Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post. Link to comment Share on other sites More sharing options...
Suleiman700 Posted October 16, 2022 Author Share Posted October 16, 2022 17 hours ago, warjort said: An alternative approach if you want a "persistant" path is to spawn a Particle at the player's location every few ticks from your own client side PlayerTickEvent I am trying to do that but did not find any clue how! I tried but the classes names & methods names are not found at all (World, Level, spawnParticle, addFreshEntity) World.spawnParticle("reddust", par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, 0.0D, 0.0D, 0.0D); Level.spawnParticle("reddust", par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, 0.0D, 0.0D, 0.0D); Level.addFreshEntity("reddust", par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, 0.0D, 0.0D, 0.0D); + Do you know how to get the correct classes names in 1.19.2 ? Quote Link to comment Share on other sites More sharing options...
warjort Posted October 16, 2022 Share Posted October 16, 2022 They are not static methods. You get the level via event.player.level You also need to check the event.side.isClient() and event.phase (start or end) You also don't cant addFreshEntity() for a particle, particles are not entities which need to be added on the server. https://forge.gemwire.uk/wiki/Particles Quote Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post. Link to comment Share on other sites More sharing options...
Suleiman700 Posted October 16, 2022 Author Share Posted October 16, 2022 1 hour ago, warjort said: They are not static methods. You get the level via event.player.level You also need to check the event.side.isClient() and event.phase (start or end) You also don't cant addFreshEntity() for a particle, particles are not entities which need to be added on the server. https://forge.gemwire.uk/wiki/Particles Thanks, I've managed to add particles Have a great day Quote Link to comment Share on other sites More sharing options...
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.