Tracer-entity #147
@ -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);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren