mirror of
https://github.com/GeyserExtensionists/GeyserModelEngine.git
synced 2025-12-20 15:39:18 +00:00
Packet-based entity
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package re.imc.geysermodelengine.packet;
|
||||
|
||||
import com.comphenix.protocol.PacketType;
|
||||
import com.comphenix.protocol.events.PacketContainer;
|
||||
|
||||
public class EntityHurtAnimationPacket implements WrapperPacket {
|
||||
|
||||
private final int id;
|
||||
|
||||
public EntityHurtAnimationPacket(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PacketContainer encode() {
|
||||
PacketContainer packet = new PacketContainer(PacketType.Play.Server.HURT_ANIMATION);
|
||||
packet.getIntegers().write(0, id);
|
||||
packet.getFloat().write(0, 1f);
|
||||
return packet;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user