Posted January 8, 20232 yr I would to make a method that can detects player sheepshearing. But I dont even know how to get the entity that in player's crosshair. My native language is not English, so I think I can't decribe carefully.
January 8, 20232 yr Look at GameRenderer.pick() 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.
January 9, 20232 yr Author Entity entity = this.minecraft.getCameraEntity(); like this? I found this the first line in GameRenderer.pick()
January 9, 20232 yr No, that it is the player (or the entity the player is spectating). Look at how it determines the hit results and where it stores them. 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.
January 9, 20232 yr By the way, in most normal cases the event or method will include some kind of HitResult in the parameters. 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.
January 10, 20232 yr Author thanks answering! i think i can finish this by using forge events and pick () method.
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.