Search in sources :

Example 56 with PathType

use of net.minecraft.server.v1_15_R1.PathType in project Citizens2 by CitizensDev.

the class PlayerPathfinderNormal method a.

public static PathType a(IBlockAccess var0, BlockPosition.MutableBlockPosition var1) {
    int var2 = var1.getX();
    int var3 = var1.getY();
    int var4 = var1.getZ();
    PathType var5 = b(var0, var1);
    if (var5 == PathType.OPEN && var3 >= 1) {
        PathType var6 = b(var0, var1.d(var2, var3 - 1, var4));
        var5 = (var6 == PathType.WALKABLE || var6 == PathType.OPEN || var6 == PathType.WATER || var6 == PathType.LAVA) ? PathType.OPEN : PathType.WALKABLE;
        if (var6 == PathType.DAMAGE_FIRE)
            var5 = PathType.DAMAGE_FIRE;
        if (var6 == PathType.DAMAGE_CACTUS)
            var5 = PathType.DAMAGE_CACTUS;
        if (var6 == PathType.DAMAGE_OTHER)
            var5 = PathType.DAMAGE_OTHER;
        if (var6 == PathType.STICKY_HONEY)
            var5 = PathType.STICKY_HONEY;
    }
    if (var5 == PathType.WALKABLE)
        var5 = a(var0, var1.d(var2, var3, var4), var5);
    return var5;
}
Also used : PathType(net.minecraft.server.v1_16_R3.PathType) PathPoint(net.minecraft.server.v1_16_R3.PathPoint)

Aggregations

PathType (net.minecraft.server.v1_10_R1.PathType)8 PathType (net.minecraft.server.v1_12_R1.PathType)8 PathType (net.minecraft.server.v1_14_R1.PathType)8 PooledBlockPosition (net.minecraft.server.v1_15_R1.BlockPosition.PooledBlockPosition)8 PathType (net.minecraft.server.v1_15_R1.PathType)8 PathType (net.minecraft.server.v1_16_R3.PathType)8 BlockPosition (net.minecraft.server.v1_10_R1.BlockPosition)7 MutableBlockPosition (net.minecraft.server.v1_10_R1.BlockPosition.MutableBlockPosition)7 PathPoint (net.minecraft.server.v1_10_R1.PathPoint)7 PathPoint (net.minecraft.server.v1_11_R1.PathPoint)7 PathType (net.minecraft.server.v1_11_R1.PathType)7 PathType (net.minecraft.server.v1_13_R2.PathType)7 BlockPosition (net.minecraft.server.v1_15_R1.BlockPosition)7 MutableBlockPosition (net.minecraft.server.v1_15_R1.BlockPosition.MutableBlockPosition)7 Iterator (java.util.Iterator)6 BlockPosition (net.minecraft.server.v1_11_R1.BlockPosition)6 MutableBlockPosition (net.minecraft.server.v1_11_R1.BlockPosition.MutableBlockPosition)6 BlockPosition (net.minecraft.server.v1_12_R1.BlockPosition)6 MutableBlockPosition (net.minecraft.server.v1_12_R1.BlockPosition.MutableBlockPosition)6 BlockPosition (net.minecraft.server.v1_13_R2.BlockPosition)6