mirror of
https://github.com/GeyserExtensionists/GeyserModelEngine.git
synced 2025-12-19 23:19:19 +00:00
Packet-based entity
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package re.imc.geysermodelengine.packet;
|
||||
|
||||
import com.comphenix.protocol.PacketType;
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
public class EntityDestroyPacket implements WrapperPacket {
|
||||
|
||||
private final int id;
|
||||
|
||||
public EntityDestroyPacket(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketContainer encode() {
|
||||
PacketContainer packet = new PacketContainer(PacketType.Play.Server.ENTITY_DESTROY);
|
||||
packet.getIntLists().write(0, Collections.singletonList(this.id));
|
||||
return packet;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user