9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-25 01:49:30 +00:00

fix(furniture): 修复家具互动逻辑

This commit is contained in:
jhqwqmc
2025-04-01 09:14:42 +08:00
parent b504be805e
commit fb203b8716
2 changed files with 0 additions and 7 deletions

View File

@@ -360,7 +360,6 @@ public class BukkitFurnitureManager implements FurnitureManager {
try {
int collisionEntityId = (int) Reflections.method$Entity$getId.invoke(collisionEntity);
this.furnitureByCollisionEntitiesId.put(collisionEntityId, loadedFurniture);
this.furnitureByEntityId.put(collisionEntityId, loadedFurniture);
} catch (IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(e);
}

View File

@@ -99,7 +99,6 @@ public class LoadedFurniture {
}
for (HitBox hitBox : placement.hitBoxes()) {
int[] ids = hitBox.acquireEntityIds(Reflections.instance$Entity$ENTITY_COUNTER::incrementAndGet);
int lastEntityId = -1;
for (int entityId : ids) {
fakeEntityIds.add(entityId);
mainEntityIds.add(entityId);
@@ -110,11 +109,6 @@ public class LoadedFurniture {
}
});
this.hitBoxes.put(entityId, hitBox);
lastEntityId = entityId;
}
// 预测添加一个CollisionEntity
if (lastEntityId != -1) {
this.hitBoxes.put(lastEntityId + 1, hitBox);
}
}
try {