mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-29 22:23:59 +01:00
(BREAKING) initial patch for 1.13 NMS repatch
This commit is contained in:
parent
2d0370a55e
commit
fe69d6c0b8
@ -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;
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user