I've been trying to predict the player's position on the next tick. The Player class seems to control all the movement in the travel method, but the bulk of the movement calculation is in LivingEntity's travel method and Entity's move method. The issue is that these methods don't exactly return the resulting position as a Vec3. They just apply it to the player and return nothing. I really don't want to extract all the calculations and reproduce it on my end since that would require quite a bit of code and access wideners would be needed to even get to some of the variables and methods. Is there any way to calculate this client-side?
#Predicting the player's position on the next tick
49 messages · Page 1 of 1 (latest)
you could either make a dummy player at 0 0, and call travel on it and compare its first position with the next, or
do that with your player
Wait... I can just do that completely client side?
yep
I did so too
but you need to be in a world because who wants to make their own dummy world and whatever else a ClientPlayerEntity needs
How would I make a dummy player?
var dummy = new ClientPlayerEntity(args)
i forgot what args are needed but you should be able to get them from the client
What's this for?
Auto sneaking on magma blocks
.., you can also just check if you're under a magma block
I don't want to take any damage
unless you take damage the first tick yeah
but this still seems very overcomplicated
ikr xd
We do not support hacked clients, cheats, or modifications that are intended to give you the upper hand in a server, competitive or otherwise.
See rule 1 in #welcome and the Discord TOS: https://discordapp.com/terms
The mappings are a little different (ex. LocalPlayer instead of ClientPlayerEntity) but the general premise is the same. It's better than just passing in the original player's block position but it still doesn't sneak in time on occasion. Is there any movement-related thing I'm not passing in?
Also, should I be killing these players after making and using them? And if so then how?
check if your ram usage spikes 
or goes up faster than normal
could you show that entire method?
wanna see if its not something with the detecting of a magma block
The only thing I'm not showing is the return statement
In the return statement
just calls copy.getBlockX, y, z and puts it in a blockpos to get the block of
y - 1 *
hmm
that seems to work for some reason lol
Idk if it's my prediction or the extra tolerance
probably extra tolerance
also looks like it is consuming ram
you sure?