Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 by Suleiman700

Use EntityRenderersEvent.AddLayers to add a new RenderLayer to the player's LivingEntityRenderer.

For players you need to add it to each "skin".

Edited by warjort

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.

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

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.

  • Author
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);

idea64-JGvfvunz-TV.png

 

+ Do you know how to get the correct classes names in 1.19.2 ?

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

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.

  • Author
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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.