use of net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy in project InteractionVisualizer by LOOHP.
the class V1_17 method createEntityDestroyPacket.
@Override
public PacketContainer[] createEntityDestroyPacket(int... entityIds) {
if (entityDestoryIsInt) {
PacketContainer[] packets = new PacketContainer[entityIds.length];
for (int i = 0; i < entityIds.length; i++) {
PacketContainer packet = InteractionVisualizer.protocolManager.createPacket(PacketType.Play.Server.ENTITY_DESTROY);
packet.getIntegers().write(0, entityIds[i]);
packets[i] = packet;
}
return packets;
} else {
return new PacketContainer[] { PacketContainer.fromPacket(new PacketPlayOutEntityDestroy(entityIds)) };
}
}
use of net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy in project InteractionVisualizer by LOOHP.
the class V1_18 method createEntityDestroyPacket.
@Override
public PacketContainer[] createEntityDestroyPacket(int... entityIds) {
if (entityDestroyIsInt) {
PacketContainer[] packets = new PacketContainer[entityIds.length];
for (int i = 0; i < entityIds.length; i++) {
PacketContainer packet = InteractionVisualizer.protocolManager.createPacket(PacketType.Play.Server.ENTITY_DESTROY);
packet.getIntegers().write(0, entityIds[i]);
packets[i] = packet;
}
return packets;
} else {
return new PacketContainer[] { PacketContainer.fromPacket(new PacketPlayOutEntityDestroy(entityIds)) };
}
}
use of net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy in project InteractionVisualizer by LOOHP.
the class V1_18_2 method createEntityDestroyPacket.
@Override
public PacketContainer[] createEntityDestroyPacket(int... entityIds) {
if (entityDestroyIsInt) {
PacketContainer[] packets = new PacketContainer[entityIds.length];
for (int i = 0; i < entityIds.length; i++) {
PacketContainer packet = InteractionVisualizer.protocolManager.createPacket(PacketType.Play.Server.ENTITY_DESTROY);
packet.getIntegers().write(0, entityIds[i]);
packets[i] = packet;
}
return packets;
} else {
return new PacketContainer[] { PacketContainer.fromPacket(new PacketPlayOutEntityDestroy(entityIds)) };
}
}
Aggregations