mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-04-18 11:29:40 +02:00
This could be cleaned up even more
This commit is contained in:
parent
ad73dfdb4d
commit
6a0ca6ef4e
1 changed files with 2 additions and 6 deletions
|
@ -25,7 +25,6 @@
|
|||
|
||||
package org.geysermc.geyser.translator.protocol.java.entity;
|
||||
|
||||
import org.cloudburstmc.math.vector.Vector3d;
|
||||
import org.cloudburstmc.protocol.bedrock.packet.SetEntityMotionPacket;
|
||||
import org.geysermc.geyser.entity.type.Entity;
|
||||
import org.geysermc.geyser.session.GeyserSession;
|
||||
|
@ -43,12 +42,9 @@ public class JavaMoveMinecartTranslator extends PacketTranslator<ClientboundMove
|
|||
Entity entity = session.getEntityCache().getEntityByJavaId(packet.getEntityId());
|
||||
|
||||
MinecartStep lastStep = packet.getLerpSteps().get(packet.getLerpSteps().size() - 1);
|
||||
Vector3d position = lastStep.position();
|
||||
entity.moveAbsolute(position.toFloat(), lastStep.yRot(), lastStep.xRot(), entity.isOnGround(), false);
|
||||
|
||||
Vector3d movement = lastStep.movement();
|
||||
entity.setMotion(movement.toFloat());
|
||||
entity.moveAbsolute(lastStep.position().toFloat(), lastStep.yRot(), lastStep.xRot(), entity.isOnGround(), false);
|
||||
|
||||
entity.setMotion(lastStep.movement().toFloat());
|
||||
SetEntityMotionPacket entityMotionPacket = new SetEntityMotionPacket();
|
||||
entityMotionPacket.setRuntimeEntityId(entity.getGeyserId());
|
||||
entityMotionPacket.setMotion(entity.getMotion());
|
||||
|
|
Loading…
Add table
Reference in a new issue