SteamWar/BauSystem
Archiviert
13
0

Tracer-entity #147

Manuell gemergt
YoyoNow hat 47 Commits von Tracer-entity nach master 2020-12-27 22:16:04 +01:00 zusammengeführt
Nur Änderungen aus Commit 83d1570efb werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -30,10 +30,12 @@ class TraceEntity_15 extends EntityFallingBlock implements AbstractTraceEntity {
private static final Vec3D ZERO = new Vec3D(0, 0, 0); private static final Vec3D ZERO = new Vec3D(0, 0, 0);
private Vector position; private Vector position;
private boolean tnt;
public TraceEntity_15(World world, Vector position, Player player, boolean exploded, boolean tnt) { public TraceEntity_15(World world, Vector position, Player player, boolean exploded, boolean tnt) {
super(((CraftWorld) world).getHandle(), position.getX(), position.getY(), position.getZ(), tnt ? Blocks.TNT.getBlockData() : Blocks.WHITE_STAINED_GLASS.getBlockData()); super(((CraftWorld) world).getHandle(), position.getX(), position.getY(), position.getZ(), tnt ? Blocks.TNT.getBlockData() : Blocks.WHITE_STAINED_GLASS.getBlockData());
this.position = position; this.position = position;
this.tnt = tnt;
this.setNoGravity(true); this.setNoGravity(true);
this.ticksLived = -12000; this.ticksLived = -12000;
@ -53,7 +55,7 @@ class TraceEntity_15 extends EntityFallingBlock implements AbstractTraceEntity {
@Override @Override
public AbstractTraceEntity display(Player player) { public AbstractTraceEntity display(Player player) {
PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(getId(), getUniqueID(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.FALLING_BLOCK, Block.getCombinedId(Blocks.TNT.getBlockData()), ZERO); PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(getId(), getUniqueID(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.FALLING_BLOCK, tnt ? Block.getCombinedId(Blocks.TNT.getBlockData()) : Block.getCombinedId(Blocks.WHITE_STAINED_GLASS.getBlockData()), ZERO);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packetPlayOutSpawnEntity); ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packetPlayOutSpawnEntity);
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(getId(), datawatcher, true); PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(getId(), datawatcher, true);