9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-31 04:46:37 +00:00

fix(bukkit): 修复注入家具时机

This commit is contained in:
jhqwqmc
2025-06-09 18:57:23 +08:00
parent ca021229a6
commit 1faa10ac17
2 changed files with 1 additions and 1 deletions

View File

@@ -210,7 +210,6 @@ public class BukkitFurnitureManager extends AbstractFurnitureManager {
furniture.initializeColliders();
}
}
BukkitFurniture.injectFurnitureEntity(FastNMS.INSTANCE.method$CraftEntity$getHandle(display));
if (depth > 2) return;
this.plugin.scheduler().sync().runLater(() -> handleBaseEntityLoadLate(display, depth + 1), 1, location.getWorld(), location.getBlockX() >> 4, location.getBlockZ() >> 4);
}

View File

@@ -62,6 +62,7 @@ public class FurnitureEventListener implements Listener {
Entity entity = event.getEntity();
if (entity instanceof ItemDisplay itemDisplay) {
this.manager.handleBaseEntityLoadLate(itemDisplay, 0);
BukkitFurniture.injectFurnitureEntity(FastNMS.INSTANCE.method$CraftEntity$getHandle(itemDisplay));
} else if (BukkitFurnitureManager.COLLISION_ENTITY_CLASS.isInstance(entity)) {
this.manager.handleCollisionEntityLoadLate(entity, 0);
}