mirror of
https://github.com/Xiao-MoMi/craft-engine.git
synced 2025-12-30 04:19:27 +00:00
改进寻路(不正确)?修复happyghast碰撞箱
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user