#Set location of player without sending teleport packet

1 messages · Page 1 of 1 (latest)

neon canyon
#

I couldn't do this even with NMS because how all the required fields to change are private, and I can't access them using reflection either

winged lantern
#

Isn't there Entity#teleport method or I'm not understanding what you want to do

tulip mortar
queen totem
#

I see no reason to not send the teleport packet

#

It's just easier that way

winged lantern
civic vigil
#

I used a Custom PlayerData class to store values for a player that i need later on. And save them in sql once in 1000 ticks and get them when server reboots

neon canyon
#

anyway I have a biiiit of progress

#

maybe

#

so I get the "entity" field from the player

#

which gives me a net.minecraft.world.entity.Entity

#

and then I try to get the "aw" field which is supposed to be net.minecraft.world.phys.Vec3D with the player's location

#

but it's actually an integer with a value of 20 for some reason

queen totem
#

Again why do you need this

neon canyon
#

🤐

queen totem
#

Aight since I see no reason I won't help

#

That would just be wasting my time

neon canyon
#

sorry this is the only way anyway (I've done enough testing)

#

because of internal changes in spigot or something the other ways that used to work don't work

neon canyon
#

okay I did it

#

here's code if anyone's interested

#
Entity entity = (Entity) FieldUtils.readField(player, "entity", true);
entity.o(x, y, z);