9
0
mirror of https://github.com/GeyserExtensionists/GeyserUtils.git synced 2025-12-19 15:09:24 +00:00
This commit is contained in:
zimzaza4
2024-07-07 22:29:41 +08:00
parent 2bf2e3c954
commit 91a3f04bd8

View File

@@ -427,6 +427,13 @@ public class GeyserUtils implements Extension {
}
}
session.sendUpstreamPacket(animateEntityPacket);
} else if (customPacket instanceof CustomEntityPacket customEntityPacket) {
if (!LOADED_ENTITY_DEFINITIONS.containsKey(customEntityPacket.getIdentifier())) {
return;
}
Cache<Integer, String> cache = CUSTOM_ENTITIES.get(session);
cache.put(customEntityPacket.getEntityId(), customEntityPacket.getIdentifier());
} else if (customPacket instanceof CameraInstructionCustomPayloadPacket cameraInstructionPacket) {
if (cameraInstructionPacket.getInstruction() instanceof SetInstruction instruction) {
session.camera().sendCameraPosition(Converter.serializeSetInstruction(instruction));