This commit is contained in:
zimzaza4
2024-07-19 14:08:34 +08:00
parent f1d5af45a7
commit 260c858eb8

View File

@@ -165,7 +165,7 @@ public class GeyserUtils implements Extension {
LOADED_ENTITY_DEFINITIONS.replace(entityId, new EntityDefinition(old.factory(), old.entityType(), old.identifier(),
old.width(), old.height(), old.offset(), entityProperties, old.translators()));
instance.logger().info("Defined property: " + entityId + " in registry.");
instance.logger().info("Defined entity: " + entityId + " in registry.");
}
public static void addCustomEntity(String id) {
@@ -429,8 +429,10 @@ public class GeyserUtils implements Extension {
session.sendUpstreamPacket(animateEntityPacket);
} else if (customPacket instanceof CustomEntityPacket customEntityPacket) {
if (!LOADED_ENTITY_DEFINITIONS.containsKey(customEntityPacket.getIdentifier())) {
// System.out.println("Not a vaild entity:" + customEntityPacket.getEntityId());
return;
}
// System.out.println("custom entity:" + customEntityPacket.getEntityId());
Cache<Integer, String> cache = CUSTOM_ENTITIES.get(session);
cache.put(customEntityPacket.getEntityId(), customEntityPacket.getIdentifier());