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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user