@@ -1739,7 +1739,7 @@ public final class CraftServer implements Server {
|
||||
public KeyedBossBar createBossBar(NamespacedKey key, String title, BarColor barColor, BarStyle barStyle, BarFlag... barFlags) {
|
||||
Preconditions.checkArgument(key != null, "key");
|
||||
|
||||
BossBattleCustom bossBattleCustom = getServer().aP().a(CraftNamespacedKey.toMinecraft(key), CraftChatMessage.fromString(title, true)[0]);
|
||||
BossBattleCustom bossBattleCustom = getServer().getBossBattleCustomData().register(CraftNamespacedKey.toMinecraft(key), CraftChatMessage.fromString(title, true)[0]);
|
||||
CraftKeyedBossbar craftKeyedBossbar = new CraftKeyedBossbar(bossBattleCustom);
|
||||
craftKeyedBossbar.setColor(barColor);
|
||||
craftKeyedBossbar.setStyle(barStyle);
|
||||
@@ -1752,7 +1752,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public Iterator<KeyedBossBar> getBossBars() {
|
||||
return Iterators.unmodifiableIterator(Iterators.transform(getServer().aP().b().iterator(), new Function<BossBattleCustom, org.bukkit.boss.KeyedBossBar>() { // PAIL: rename
|
||||
return Iterators.unmodifiableIterator(Iterators.transform(getServer().getBossBattleCustomData().getBattles().iterator(), new Function<BossBattleCustom, org.bukkit.boss.KeyedBossBar>() {
|
||||
@Override
|
||||
public org.bukkit.boss.KeyedBossBar apply(BossBattleCustom bossBattleCustom) {
|
||||
return bossBattleCustom.getBukkitEntity();
|
||||
@@ -1763,7 +1763,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public KeyedBossBar getBossBar(NamespacedKey key) {
|
||||
Preconditions.checkArgument(key != null, "key");
|
||||
net.minecraft.server.BossBattleCustom bossBattleCustom = getServer().aP().a(CraftNamespacedKey.toMinecraft(key));
|
||||
net.minecraft.server.BossBattleCustom bossBattleCustom = getServer().getBossBattleCustomData().a(CraftNamespacedKey.toMinecraft(key));
|
||||
|
||||
return (bossBattleCustom == null) ? null : bossBattleCustom.getBukkitEntity();
|
||||
}
|
||||
@@ -1771,11 +1771,11 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public boolean removeBossBar(NamespacedKey key) {
|
||||
Preconditions.checkArgument(key != null, "key");
|
||||
net.minecraft.server.BossBattleCustomData bossBattleCustomData = getServer().aP();
|
||||
net.minecraft.server.BossBattleCustomData bossBattleCustomData = getServer().getBossBattleCustomData();
|
||||
net.minecraft.server.BossBattleCustom bossBattleCustom = bossBattleCustomData.a(CraftNamespacedKey.toMinecraft(key));
|
||||
|
||||
if (bossBattleCustom != null) {
|
||||
bossBattleCustomData.a(bossBattleCustom);
|
||||
bossBattleCustomData.remove(bossBattleCustom);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -629,9 +629,9 @@ public class CraftBlock implements Block {
|
||||
|
||||
// Similar to to nms.World#rayTrace:
|
||||
IBlockData blockData = world.getType(position);
|
||||
Fluid fluid = world.b(position); // PAIL getFluid
|
||||
boolean collidableBlock = blockData.getBlock().d(blockData); // PAIL isCollidable
|
||||
boolean collideWithFluid = CraftFluidCollisionMode.toNMS(fluidCollisionMode).d.test(fluid); // PAIL predicate
|
||||
Fluid fluid = world.getFluid(position);
|
||||
boolean collidableBlock = blockData.getBlock().isCollidable(blockData);
|
||||
boolean collideWithFluid = CraftFluidCollisionMode.toNMS(fluidCollisionMode).predicate.test(fluid);
|
||||
|
||||
if (!collidableBlock && !collideWithFluid) {
|
||||
return null;
|
||||
@@ -639,11 +639,11 @@ public class CraftBlock implements Block {
|
||||
|
||||
MovingObjectPosition nmsHitResult = null;
|
||||
if (collidableBlock) {
|
||||
nmsHitResult = net.minecraft.server.Block.a(blockData, world.getMinecraftWorld(), position, startPos, endPos); // PAIL rayTrace
|
||||
nmsHitResult = net.minecraft.server.Block.rayTrace(blockData, world.getMinecraftWorld(), position, startPos, endPos);
|
||||
}
|
||||
|
||||
if (nmsHitResult == null && collideWithFluid) {
|
||||
nmsHitResult = VoxelShapes.a(0.0D, 0.0D, 0.0D, 1.0D, (double) fluid.f(), 1.0D).a(startPos, endPos, position); // PAIL create, getHeight, rayTrace
|
||||
nmsHitResult = VoxelShapes.create(0.0D, 0.0D, 0.0D, 1.0D, (double) fluid.getHeight(), 1.0D).rayTrace(startPos, endPos, position);
|
||||
}
|
||||
|
||||
return CraftRayTraceResult.fromNMS(this.getWorld(), nmsHitResult);
|
||||
|
||||
@@ -47,12 +47,12 @@ public class CraftEndGateway extends CraftBlockEntityState<TileEntityEndGateway>
|
||||
|
||||
@Override
|
||||
public long getAge() {
|
||||
return this.getSnapshot().e;
|
||||
return this.getSnapshot().age;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAge(long age) {
|
||||
this.getSnapshot().e = age;
|
||||
this.getSnapshot().age = age;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -49,9 +49,9 @@ public class CraftBossBar implements BossBar {
|
||||
|
||||
private void initialize() {
|
||||
this.flags = new HashMap<>();
|
||||
this.flags.put(BarFlag.DARKEN_SKY, new FlagContainer(handle::n, handle::setDarkenSky));
|
||||
this.flags.put(BarFlag.PLAY_BOSS_MUSIC, new FlagContainer(handle::o, handle::setPlayMusic));
|
||||
this.flags.put(BarFlag.CREATE_FOG, new FlagContainer(handle::p, handle::setCreateFog));
|
||||
this.flags.put(BarFlag.DARKEN_SKY, new FlagContainer(handle::isDarkenSky, handle::setDarkenSky));
|
||||
this.flags.put(BarFlag.PLAY_BOSS_MUSIC, new FlagContainer(handle::isPlayMusic, handle::setPlayMusic));
|
||||
this.flags.put(BarFlag.CREATE_FOG, new FlagContainer(handle::isCreateFog, handle::setCreateFog));
|
||||
}
|
||||
|
||||
private BarColor convertColor(BossBattle.BarColor color) {
|
||||
|
||||
@@ -13,7 +13,7 @@ public class CraftKeyedBossbar extends CraftBossBar implements KeyedBossBar {
|
||||
|
||||
@Override
|
||||
public NamespacedKey getKey() {
|
||||
return CraftNamespacedKey.fromMinecraft(getHandle().a());
|
||||
return CraftNamespacedKey.fromMinecraft(getHandle().getKey());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,8 +23,8 @@ public class CraftEnderDragon extends CraftComplexLivingEntity implements EnderD
|
||||
public CraftEnderDragon(CraftServer server, EntityEnderDragon entity) {
|
||||
super(server, entity);
|
||||
|
||||
if (entity.ds() != null) {
|
||||
this.bossBar = new CraftBossBar(entity.ds().c); // PAIL rename getEnderDragonBattle
|
||||
if (entity.getEnderDragonBattle() != null) {
|
||||
this.bossBar = new CraftBossBar(entity.getEnderDragonBattle().bossBattle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ public class CraftWither extends CraftMonster implements Wither {
|
||||
public CraftWither(CraftServer server, EntityWither entity) {
|
||||
super(server, entity);
|
||||
|
||||
if (entity.bL != null) {
|
||||
this.bossBar = new CraftBossBar(entity.bL);
|
||||
if (entity.bossBattle != null) {
|
||||
this.bossBar = new CraftBossBar(entity.bossBattle);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -887,7 +887,7 @@ public class CraftEventFactory {
|
||||
public static ProjectileHitEvent callProjectileHitEvent(Entity entity, MovingObjectPosition position) {
|
||||
Block hitBlock = null;
|
||||
if (position.type == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
|
||||
BlockPosition blockposition = position.a();
|
||||
BlockPosition blockposition = position.getBlockPosition();
|
||||
hitBlock = entity.getBukkitEntity().getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
}
|
||||
|
||||
|
||||
@@ -104,19 +104,19 @@ public final class CraftCustomTagTypeRegistry {
|
||||
Primitives
|
||||
*/
|
||||
if (Objects.equals(Byte.class, type)) {
|
||||
return createAdapter(Byte.class, NBTTagByte.class, NBTTagByte::new, NBTTagByte::g); // PAIL: rename asByte
|
||||
return createAdapter(Byte.class, NBTTagByte.class, NBTTagByte::new, NBTTagByte::asByte);
|
||||
}
|
||||
if (Objects.equals(Short.class, type)) {
|
||||
return createAdapter(Short.class, NBTTagShort.class, NBTTagShort::new, NBTTagShort::f); // PAIL: rename asShort
|
||||
return createAdapter(Short.class, NBTTagShort.class, NBTTagShort::new, NBTTagShort::asShort);
|
||||
}
|
||||
if (Objects.equals(Integer.class, type)) {
|
||||
return createAdapter(Integer.class, NBTTagInt.class, NBTTagInt::new, NBTTagInt::e); // PAIL: rename asInteger
|
||||
return createAdapter(Integer.class, NBTTagInt.class, NBTTagInt::new, NBTTagInt::asInt);
|
||||
}
|
||||
if (Objects.equals(Long.class, type)) {
|
||||
return createAdapter(Long.class, NBTTagLong.class, NBTTagLong::new, NBTTagLong::d); // PAIL: rename asLong
|
||||
return createAdapter(Long.class, NBTTagLong.class, NBTTagLong::new, NBTTagLong::asLong);
|
||||
}
|
||||
if (Objects.equals(Float.class, type)) {
|
||||
return createAdapter(Float.class, NBTTagFloat.class, NBTTagFloat::new, NBTTagFloat::i); // PAIL: rename asFloat
|
||||
return createAdapter(Float.class, NBTTagFloat.class, NBTTagFloat::new, NBTTagFloat::asFloat);
|
||||
}
|
||||
if (Objects.equals(Double.class, type)) {
|
||||
return createAdapter(Double.class, NBTTagDouble.class, NBTTagDouble::new, NBTTagDouble::asDouble);
|
||||
@@ -126,20 +126,20 @@ public final class CraftCustomTagTypeRegistry {
|
||||
String
|
||||
*/
|
||||
if (Objects.equals(String.class, type)) {
|
||||
return createAdapter(String.class, NBTTagString.class, NBTTagString::new, NBTTagString::b_); // PAIL: rename getString
|
||||
return createAdapter(String.class, NBTTagString.class, NBTTagString::new, NBTTagString::asString);
|
||||
}
|
||||
|
||||
/*
|
||||
Primitive Arrays
|
||||
*/
|
||||
if (Objects.equals(byte[].class, type)) {
|
||||
return createAdapter(byte[].class, NBTTagByteArray.class, array -> new NBTTagByteArray(Arrays.copyOf(array, array.length)), n -> Arrays.copyOf(n.c(), n.size())); // PAIL: rename getByteArray
|
||||
return createAdapter(byte[].class, NBTTagByteArray.class, array -> new NBTTagByteArray(Arrays.copyOf(array, array.length)), n -> Arrays.copyOf(n.c(), n.size()));
|
||||
}
|
||||
if (Objects.equals(int[].class, type)) {
|
||||
return createAdapter(int[].class, NBTTagIntArray.class, array -> new NBTTagIntArray(Arrays.copyOf(array, array.length)), n -> Arrays.copyOf(n.d(), n.size())); // PAIL: rename getIntegerArray
|
||||
return createAdapter(int[].class, NBTTagIntArray.class, array -> new NBTTagIntArray(Arrays.copyOf(array, array.length)), n -> Arrays.copyOf(n.d(), n.size()));
|
||||
}
|
||||
if (Objects.equals(long[].class, type)) {
|
||||
return createAdapter(long[].class, NBTTagLongArray.class, array -> new NBTTagLongArray(Arrays.copyOf(array, array.length)), n -> Arrays.copyOf(n.d(), n.size())); // PAIL: rename getLongArray
|
||||
return createAdapter(long[].class, NBTTagLongArray.class, array -> new NBTTagLongArray(Arrays.copyOf(array, array.length)), n -> Arrays.copyOf(n.d(), n.size()));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -91,14 +91,14 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
|
||||
Validate.notNull(renderType, "RenderType cannot be null");
|
||||
CraftScoreboard scoreboard = checkState();
|
||||
|
||||
this.objective.a(CraftScoreboardTranslations.fromBukkitRender(renderType));
|
||||
this.objective.setRenderType(CraftScoreboardTranslations.fromBukkitRender(renderType));
|
||||
}
|
||||
|
||||
@Override
|
||||
public RenderType getRenderType() throws IllegalStateException {
|
||||
CraftScoreboard scoreboard = checkState();
|
||||
|
||||
return CraftScoreboardTranslations.toBukkitRender(this.objective.f());
|
||||
return CraftScoreboardTranslations.toBukkitRender(this.objective.getRenderType());
|
||||
}
|
||||
|
||||
public Score getScore(OfflinePlayer player) throws IllegalArgumentException, IllegalStateException {
|
||||
|
||||
@@ -127,7 +127,7 @@ public class Commodore
|
||||
ClassReader cr = new ClassReader( b );
|
||||
ClassWriter cw = new ClassWriter( cr, 0 );
|
||||
|
||||
cr.accept( new ClassVisitor( Opcodes.ASM7_EXPERIMENTAL, cw )
|
||||
cr.accept( new ClassVisitor( Opcodes.ASM7, cw )
|
||||
{
|
||||
@Override
|
||||
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
|
||||
|
||||
@@ -35,7 +35,7 @@ public class CraftNBTTagConfigSerializer {
|
||||
|
||||
return baseList;
|
||||
} else if (base instanceof NBTTagString) {
|
||||
return base.b_(); //PAIL Rename getString
|
||||
return base.asString();
|
||||
}
|
||||
|
||||
return base.toString();
|
||||
@@ -66,12 +66,12 @@ public class CraftNBTTagConfigSerializer {
|
||||
|
||||
if (ARRAY.matcher(string).matches()) {
|
||||
try {
|
||||
return new MojangsonParser(new StringReader(string)).h(); // PAIL Rename parseTagList
|
||||
return new MojangsonParser(new StringReader(string)).parseArray();
|
||||
} catch (CommandSyntaxException e) {
|
||||
throw new RuntimeException("Could not deserialize found list ", e);
|
||||
}
|
||||
} else {
|
||||
return MOJANGSON_PARSER.b(string); // PAIL Rename parse tagBase
|
||||
return MOJANGSON_PARSER.parseLiteral(string);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public class CraftRayTraceResult {
|
||||
}
|
||||
|
||||
Block hitBlock = null;
|
||||
BlockPosition nmsBlockPos = nmsHitResult.a(); // PAIL: getBlockPosition
|
||||
BlockPosition nmsBlockPos = nmsHitResult.getBlockPosition();
|
||||
if (nmsBlockPos != null && world != null) {
|
||||
hitBlock = world.getBlockAt(nmsBlockPos.getX(), nmsBlockPos.getY(), nmsBlockPos.getZ());
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ public class DummyGeneratorAccess implements GeneratorAccess {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Fluid b(BlockPosition bp) {
|
||||
public Fluid getFluid(BlockPosition bp) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user