9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-25 18:09:27 +00:00

fix(furniture): 兼容反作弊

This commit is contained in:
jhqwqmc
2025-04-01 21:11:57 +08:00
parent f53f5a9166
commit 595ddd7981
3 changed files with 3 additions and 3 deletions

View File

@@ -136,7 +136,7 @@ public class LoadedFurniture {
double z1 = z - offset1.z();
double z2 = z - offset2.z();
Object aabb = FastNMS.INSTANCE.constructor$AABB(x1, y1, z1, x2, y2, z2);
CollisionEntity entity = FastNMS.INSTANCE.createCollisionEntity(world, aabb, x, y, z, collider.canBeHitByProjectile());
CollisionEntity entity = FastNMS.INSTANCE.createCollisionShulker(world, aabb, x, y, z, collider.canBeHitByProjectile());
FastNMS.INSTANCE.method$LevelWriter$addFreshEntity(world, entity);
this.collisionEntities[i] = entity;
}

View File

@@ -625,7 +625,7 @@ public class PacketConsumers {
event.setCancelled(true);
}
}
} else if (entityType == Reflections.instance$EntityType$INTERACTION) {
} else if (entityType == Reflections.instance$EntityType$SHULKER) {
// Cancel collider entity packet
int entityId = (int) Reflections.field$ClientboundAddEntityPacket$entityId.get(packet);
LoadedFurniture furniture = BukkitFurnitureManager.instance().getLoadedFurnitureByCollisionEntityId(entityId);

View File

@@ -49,7 +49,7 @@ mojang_brigadier_version=1.0.18
byte_buddy_version=1.15.11
snake_yaml_version=2.3
anti_grief_version=0.13
nms_helper_version=0.27
nms_helper_version=0.28
# Ignite Dependencies
mixinextras_version=0.4.1
mixin_version=0.15.2+mixin.0.8.7