Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
4ee537e017
Commit
4bb25a4ca7
@ -34,8 +34,13 @@ public class SimulatorEntity18 extends BaseEntity18 implements AbstractSimulator
|
|||||||
public SimulatorEntity18(World world, Vector position, boolean highlight) {
|
public SimulatorEntity18(World world, Vector position, boolean highlight) {
|
||||||
super(world, position, highlight ? Material.WHITE_STAINED_GLASS : Material.TNT);
|
super(world, position, highlight ? Material.WHITE_STAINED_GLASS : Material.TNT);
|
||||||
|
|
||||||
this.setNoGravity(true);
|
this.e(true);
|
||||||
this.ticksLived = -12000;
|
this.S = -12000;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getId() {
|
||||||
|
return ae();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -50,7 +55,7 @@ public class SimulatorEntity18 extends BaseEntity18 implements AbstractSimulator
|
|||||||
@Override
|
@Override
|
||||||
public void setPosition(Vector position) {
|
public void setPosition(Vector position) {
|
||||||
this.position = position;
|
this.position = position;
|
||||||
setPosition(position.getX(), position.getY(), position.getZ());
|
e(position.getX(), position.getY(), position.getZ());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -60,7 +65,7 @@ public class SimulatorEntity18 extends BaseEntity18 implements AbstractSimulator
|
|||||||
}
|
}
|
||||||
|
|
||||||
sendEntityDestroy(player);
|
sendEntityDestroy(player);
|
||||||
die();
|
ag();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.shared;
|
package de.steamwar.bausystem.shared;
|
||||||
|
|
||||||
import com.sk89q.worldedit.world.entity.EntityTypes;
|
|
||||||
import net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy;
|
import net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy;
|
||||||
import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata;
|
import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata;
|
||||||
import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
|
import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
|
||||||
import net.minecraft.server.network.PlayerConnection;
|
import net.minecraft.server.network.PlayerConnection;
|
||||||
|
import net.minecraft.world.entity.EntityTypes;
|
||||||
import net.minecraft.world.entity.decoration.EntityArmorStand;
|
import net.minecraft.world.entity.decoration.EntityArmorStand;
|
||||||
import net.minecraft.world.phys.Vec3D;
|
import net.minecraft.world.phys.Vec3D;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
@ -42,21 +42,21 @@ public class BaseArmorStand18 extends EntityArmorStand implements AbstractEntity
|
|||||||
super(((CraftWorld) world).getHandle(), position.getX(), position.getY(), position.getZ());
|
super(((CraftWorld) world).getHandle(), position.getX(), position.getY(), position.getZ());
|
||||||
|
|
||||||
this.position = position;
|
this.position = position;
|
||||||
setNoGravity(true);
|
e(true);
|
||||||
ticksLived = -12000;
|
S = -12000;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendEntity(Player player) {
|
public void sendEntity(Player player) {
|
||||||
PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(getId(), getUniqueID(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.ARMOR_STAND, 0, ZERO);
|
PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(ae(), cm(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.c, 0, ZERO);
|
||||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().b;
|
||||||
playerConnection.sendPacket(packetPlayOutSpawnEntity);
|
playerConnection.a(packetPlayOutSpawnEntity);
|
||||||
|
|
||||||
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(getId(), datawatcher, true);
|
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(ae(), Z, true);
|
||||||
playerConnection.sendPacket(packetPlayOutEntityMetadata);
|
playerConnection.a(packetPlayOutEntityMetadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendEntityDestroy(Player player) {
|
public void sendEntityDestroy(Player player) {
|
||||||
PacketPlayOutEntityDestroy packetPlayOutEntityDestroy = new PacketPlayOutEntityDestroy(getId());
|
PacketPlayOutEntityDestroy packetPlayOutEntityDestroy = new PacketPlayOutEntityDestroy(ae());
|
||||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
((CraftPlayer) player).getHandle().b.a(packetPlayOutEntityDestroy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,12 +19,13 @@
|
|||||||
|
|
||||||
package de.steamwar.bausystem.shared;
|
package de.steamwar.bausystem.shared;
|
||||||
|
|
||||||
import com.sk89q.worldedit.world.entity.EntityTypes;
|
|
||||||
import net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy;
|
import net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy;
|
||||||
import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata;
|
import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata;
|
||||||
import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
|
import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
|
||||||
import net.minecraft.server.network.PlayerConnection;
|
import net.minecraft.server.network.PlayerConnection;
|
||||||
|
import net.minecraft.world.entity.EntityTypes;
|
||||||
import net.minecraft.world.entity.item.EntityFallingBlock;
|
import net.minecraft.world.entity.item.EntityFallingBlock;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.block.state.IBlockData;
|
import net.minecraft.world.level.block.state.IBlockData;
|
||||||
import net.minecraft.world.phys.Vec3D;
|
import net.minecraft.world.phys.Vec3D;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -47,21 +48,21 @@ public class BaseEntity18 extends EntityFallingBlock implements AbstractEntity {
|
|||||||
this.iBlockData = ((CraftBlockData) blockType.createBlockData()).getState();
|
this.iBlockData = ((CraftBlockData) blockType.createBlockData()).getState();
|
||||||
this.position = position;
|
this.position = position;
|
||||||
|
|
||||||
this.setNoGravity(true);
|
this.e(true);
|
||||||
this.ticksLived = -12000;
|
this.S = -12000;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendEntity(Player player) {
|
public void sendEntity(Player player) {
|
||||||
PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(getId(), getUniqueID(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.FALLING_BLOCK, Block.getCombinedId(iBlockData), ZERO);
|
PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(ae(), cm(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.C, Block.i(iBlockData), ZERO);
|
||||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
|
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().b;
|
||||||
playerConnection.sendPacket(packetPlayOutSpawnEntity);
|
playerConnection.a(packetPlayOutSpawnEntity);
|
||||||
|
|
||||||
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(getId(), datawatcher, true);
|
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(ae(), Z, true);
|
||||||
playerConnection.sendPacket(packetPlayOutEntityMetadata);
|
playerConnection.a(packetPlayOutEntityMetadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendEntityDestroy(Player player) {
|
public void sendEntityDestroy(Player player) {
|
||||||
PacketPlayOutEntityDestroy packetPlayOutEntityDestroy = new PacketPlayOutEntityDestroy(getId());
|
PacketPlayOutEntityDestroy packetPlayOutEntityDestroy = new PacketPlayOutEntityDestroy(ae());
|
||||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packetPlayOutEntityDestroy);
|
((CraftPlayer) player).getHandle().b.a(packetPlayOutEntityDestroy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren