Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
cc7cd81abe
Commit
9d89ebec57
@ -27,10 +27,12 @@ import net.minecraft.server.network.PlayerConnection;
|
||||
import net.minecraft.world.entity.EntityTypes;
|
||||
import net.minecraft.world.entity.item.EntityFallingBlock;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.IBlockData;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.v1_19_R1.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_19_R1.block.data.CraftBlockData;
|
||||
import org.bukkit.craftbukkit.v1_19_R1.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
@ -53,11 +55,12 @@ public class DetonatorEntity19 extends EntityFallingBlock implements AbstractDet
|
||||
private static final Vec3D ZERO = new Vec3D(0, 0, 0);
|
||||
private final Vector position;
|
||||
private int references = 0;
|
||||
private IBlockData iBlockData;
|
||||
|
||||
public DetonatorEntity19(World world, Vector position) {
|
||||
super(EntityTypes.E, ((CraftWorld) world).getHandle());
|
||||
try {
|
||||
ao.set(this, Blocks.dG.m());
|
||||
ao.set(this, ((CraftBlockData) Material.RED_STAINED_GLASS.createBlockData()).getState());
|
||||
} catch (IllegalAccessException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
@ -69,9 +72,9 @@ public class DetonatorEntity19 extends EntityFallingBlock implements AbstractDet
|
||||
v = position.getZ();
|
||||
a(this.db());
|
||||
|
||||
this.iBlockData = ((CraftBlockData) Material.RED_STAINED_GLASS.createBlockData()).getState();
|
||||
this.position = position;
|
||||
|
||||
this.h(true);
|
||||
this.e(true);
|
||||
this.S = -12000;
|
||||
}
|
||||
@ -86,7 +89,7 @@ public class DetonatorEntity19 extends EntityFallingBlock implements AbstractDet
|
||||
if (references++ > 0)
|
||||
return;
|
||||
|
||||
PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(getId(), cp(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.C, Block.i(Blocks.du.m()), ZERO, 0.0);
|
||||
PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(ae(), cp(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.E, Block.i(iBlockData), ZERO, 0.0);
|
||||
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().b;
|
||||
playerConnection.a(packetPlayOutSpawnEntity);
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren