mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 14:38:50 +00:00
Update createTeleportForUnknown to 1.21.3
This commit is contained in:
1 parent
01f4bef09b
commit
07cc3b3874
2 files changed
+9
-28
No files matched your search
@@ -11,12 +11,15 @@ import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.ExperienceOrb;
|
||||
import net.minecraft.world.entity.Marker;
|
||||
import net.minecraft.world.entity.Pose;
|
||||
import net.minecraft.world.entity.PositionMoveRotation;
|
||||
import net.minecraft.world.entity.Relative;
|
||||
import net.minecraft.world.entity.boss.EnderDragonPart;
|
||||
import net.minecraft.world.entity.decoration.ItemFrame;
|
||||
import net.minecraft.world.entity.decoration.Painting;
|
||||
import net.minecraft.world.entity.item.FallingBlockEntity;
|
||||
import net.minecraft.world.entity.monster.warden.Warden;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -27,19 +30,12 @@ public class PacketHelper {
|
||||
}
|
||||
|
||||
public static ClientboundTeleportEntityPacket createTeleportForUnknown(int id, double x, double y, double z, byte yRot, byte xRot, boolean onGround) {
|
||||
try {
|
||||
ClientboundTeleportEntityPacket packet = (ClientboundTeleportEntityPacket) UnsafeWrapper.UNSAFE.allocateInstance(ClientboundTeleportEntityPacket.class);
|
||||
packet.id = id;
|
||||
packet.x = x;
|
||||
packet.y = y;
|
||||
packet.z = z;
|
||||
packet.yRot = yRot;
|
||||
packet.xRot = xRot;
|
||||
packet.onGround = onGround;
|
||||
return packet;
|
||||
} catch (Exception e) {
|
||||
throw SneakyThrow.sneakyThrow(e);
|
||||
}
|
||||
return new ClientboundTeleportEntityPacket(
|
||||
id,
|
||||
new PositionMoveRotation(new Vec3(x, y, z), Vec3.ZERO, yRot, xRot),
|
||||
Relative.DELTA,
|
||||
onGround
|
||||
);
|
||||
}
|
||||
|
||||
public static Packet<ClientGamePacketListener> createAddEntity(Entity entity) {
|
||||
|
||||
@@ -161,18 +161,3 @@ accessible field com/mojang/blaze3d/audio/Library currentDevice J
|
||||
accessible field com/mojang/blaze3d/audio/Library context J
|
||||
accessible field net/minecraft/client/sounds/SoundEngine executor Lnet/minecraft/client/sounds/SoundEngineExecutor;
|
||||
accessible field net/minecraft/client/sounds/SoundEngineExecutor thread Ljava/lang/Thread;
|
||||
|
||||
accessible field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket id I
|
||||
mutable field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket id I
|
||||
accessible field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket x D
|
||||
mutable field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket x D
|
||||
accessible field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket y D
|
||||
mutable field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket y D
|
||||
accessible field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket z D
|
||||
mutable field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket z D
|
||||
accessible field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket yRot B
|
||||
mutable field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket yRot B
|
||||
accessible field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket xRot B
|
||||
mutable field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket xRot B
|
||||
accessible field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket onGround Z
|
||||
mutable field net/minecraft/network/protocol/game/ClientboundTeleportEntityPacket onGround Z
|
||||
Reference in new issue
Block a user