summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftServer.java10
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java10
-rw-r--r--src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftCustomTagTypeRegistry.java18
-rw-r--r--src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java4
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/Commodore.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java6
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java2
14 files changed, 38 insertions, 38 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e5be1ba6..f97be218 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -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;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 3dbeb376..1fadbf05 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -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);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java b/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java
index 5fbc336b..54287744 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java
@@ -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
diff --git a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java
index d39ee65c..e9f92ecc 100644
--- a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java
+++ b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java
@@ -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) {
diff --git a/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java b/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java
index a35e6c20..e6ad9402 100644
--- a/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java
+++ b/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java
@@ -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
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
index 97d5e628..a9762383 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
@@ -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);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
index 2b00b377..3df0fcb9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
@@ -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);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 26e14f0d..6890b9b4 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -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());
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftCustomTagTypeRegistry.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftCustomTagTypeRegistry.java
index 22c0abb9..47ff875b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftCustomTagTypeRegistry.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftCustomTagTypeRegistry.java
@@ -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()));
}
/*
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
index 2b96d3c9..4a08f218 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
@@ -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 {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index 24d60839..875b4f77 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -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)
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java b/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java
index da81d782..4bd46769 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java
@@ -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);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java b/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java
index d500824b..050f4d3a 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java
@@ -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());
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
index b9d92a1e..3cf5deac 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
@@ -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.");
}