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

改进寻路(不正确)?修复happyghast碰撞箱

This commit is contained in:
XiaoMoMi
2025-07-05 03:40:32 +08:00
parent fff9798905
commit cf5a65e551
3 changed files with 11 additions and 4 deletions

View File

@@ -172,4 +172,11 @@ public class BukkitBlockBehavior extends AbstractBlockBehavior {
protected static final int updateShape$blockPos = VersionHelper.isOrAbove1_21_2() ? 3 : 4;
protected static final int updateShape$neighborState = VersionHelper.isOrAbove1_21_2() ? 6 : 2;
protected static final int updateShape$direction = VersionHelper.isOrAbove1_21_2() ? 4 : 1;
protected static final int isPathFindable$type = VersionHelper.isOrAbove1_20_5() ? 1 : 3;
@Override
public boolean isPathFindable(Object thisBlock, Object[] args, Callable<Object> superMethod) throws Exception {
return args[isPathFindable$type] == CoreReflections.instance$PathComputationType$AIR && !FastNMS.INSTANCE.field$BlockBehavior$hasCollision(BlockStateUtils.getBlockOwner(args[0])) || super.isPathFindable(thisBlock, args, superMethod);
}
}

View File

@@ -92,8 +92,8 @@ public class HappyGhastHitBox extends AbstractHitBox {
double maxX = x + halfSize + offset.x();
double minY = y + offset.y();
double maxY = y + baseSize + offset.y();
double minZ = z - halfSize + offset.z();
double maxZ = z + halfSize + offset.z();
double minZ = z - halfSize - offset.z();
double maxZ = z + halfSize - offset.z();
return new AABB(minX, minY, minZ, maxX, maxY, maxZ);
}

View File

@@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx1G
# Project settings
# Rule: [major update].[feature update].[bug fix]
project_version=0.0.59.3
project_version=0.0.59.4
config_version=41
lang_version=21
project_group=net.momirealms
@@ -50,7 +50,7 @@ byte_buddy_version=1.17.5
ahocorasick_version=0.6.3
snake_yaml_version=2.4
anti_grief_version=0.18
nms_helper_version=1.0.26
nms_helper_version=1.0.27
evalex_version=3.5.0
reactive_streams_version=1.0.4
amazon_awssdk_version=2.31.23