(BREAKING) initial patch for 1.13 NMS repatch

This commit is contained in:
mcmonkey 2019-03-16 20:36:45 -07:00
parent 2d0370a55e
commit fe69d6c0b8
No known key found for this signature in database
GPG Key ID: 2F0F11928478A6F5
2 changed files with 7 additions and 7 deletions

View File

@ -1320,7 +1320,7 @@ public class NMSImpl implements NMSBridge {
} else {
float f9 = 0.91F;
BoundingBox bb = NMSBoundingBox.wrap(entity.getBoundingBox());
BlockPosition.b blockposition_b = BlockPosition.b.d(entity.locX, bb.minY - 1.0D, entity.locZ);
BlockPosition.PooledBlockPosition blockposition_b = BlockPosition.PooledBlockPosition.d(entity.locX, bb.minY - 1.0D, entity.locZ);
Throwable throwable = null;
float f4;
float f3;
@ -1407,12 +1407,12 @@ public class NMSImpl implements NMSBridge {
entity.aK += entity.aJ;
}
private static BlockPosition.b getBlockPositionBE(BlockPosition.b blockPos, double x, double y, double z) {
private static BlockPosition.PooledBlockPosition getBlockPositionBE(BlockPosition.PooledBlockPosition blockPos, double x, double y, double z) {
try {
return blockPos.c(x, y, z);
} catch (NoSuchMethodError ex) {
try {
return (BlockPosition.b) BLOCK_POSITION_B_D.invoke(blockPos, x, y, z);
return (BlockPosition.PooledBlockPosition) BLOCK_POSITION_B_D.invoke(blockPos, x, y, z);
} catch (Throwable ex2) {
ex2.printStackTrace();
return null;
@ -1619,7 +1619,7 @@ public class NMSImpl implements NMSBridge {
private static final Set<EntityType> BAD_CONTROLLER_LOOK = EnumSet.of(EntityType.POLAR_BEAR, EntityType.SILVERFISH,
EntityType.SHULKER, EntityType.ENDERMITE, EntityType.ENDER_DRAGON, EntityType.BAT, EntityType.SLIME,
EntityType.MAGMA_CUBE, EntityType.HORSE, EntityType.GHAST);
private static final Method BLOCK_POSITION_B_D = NMS.getMethod(BlockPosition.b.class, "e", false, double.class,
private static final Method BLOCK_POSITION_B_D = NMS.getMethod(BlockPosition.PooledBlockPosition.class, "e", false, double.class,
double.class, double.class);
private static final Field CRAFT_BOSSBAR_HANDLE_FIELD = NMS.getField(CraftBossBar.class, "handle");
private static final float DEFAULT_SPEED = 1F;

View File

@ -185,11 +185,11 @@ public class PlayerPathfinderNormal extends PlayerPathfinderAbstract {
return var11;
}
private static final Method BLOCK_POSITION_B_C = NMS.getMethod(BlockPosition.b.class, "f", false, int.class, int.class, int.class);
private static final Method BLOCK_POSITION_B_C = NMS.getMethod(BlockPosition.PooledBlockPosition.class, "f", false, int.class, int.class, int.class);
public PathType a(IBlockAccess var1, int var2, int var3, int var4, PathType var5) {
if (var5 == PathType.WALKABLE) {
BlockPosition.b var6 = BlockPosition.b.r();
BlockPosition.PooledBlockPosition var6 = BlockPosition.PooledBlockPosition.r();
Throwable var7 = null;
try {
@ -202,7 +202,7 @@ public class PlayerPathfinderNormal extends PlayerPathfinderAbstract {
}
catch (NoSuchMethodError ex) {
try {
blockPos = (BlockPosition.b) BLOCK_POSITION_B_C.invoke(var6, var8 + var2, var3, var9 + var4);
blockPos = (BlockPosition.PooledBlockPosition) BLOCK_POSITION_B_C.invoke(var6, var8 + var2, var3, var9 + var4);
}
catch (Throwable ex2) {
ex2.printStackTrace();