diff options
Diffstat (limited to 'src')
9 files changed, 48 insertions, 48 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java b/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java index 8822e6b9..d76fe60f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java @@ -39,7 +39,7 @@ public class CraftLootTable implements org.bukkit.loot.LootTable { @Override public Collection<ItemStack> populateLoot(Random random, LootContext context) { LootTableInfo nmsContext = convertContext(context); - List<net.minecraft.server.ItemStack> nmsItems = handle.a(random, nmsContext); // PAIL rename populateLoot + List<net.minecraft.server.ItemStack> nmsItems = handle.populateLoot(random, nmsContext); Collection<ItemStack> bukkit = new ArrayList<>(nmsItems.size()); for (net.minecraft.server.ItemStack item : nmsItems) { @@ -59,7 +59,7 @@ public class CraftLootTable implements org.bukkit.loot.LootTable { IInventory handle = craftInventory.getInventory(); // TODO: When events are added, call event here w/ custom reason? - getHandle().a(handle, random, nmsContext); // PAIL rename fillInventory + getHandle().fillInventory(handle, random, nmsContext); } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index f97be218..f86cc694 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -962,7 +962,7 @@ public final class CraftServer implements Server { } BlockPosition chunkcoordinates = internal.getSpawn(); - internal.getChunkProviderServer().getChunkAt(chunkcoordinates.getX() + j >> 4, chunkcoordinates.getZ() + k >> 4, true, true); + internal.getChunkProvider().getChunkAt(chunkcoordinates.getX() + j >> 4, chunkcoordinates.getZ() + k >> 4, true, true); } } } @@ -978,7 +978,7 @@ public final class CraftServer implements Server { long k = longiterator.nextLong(); ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(k); - internal.getChunkProviderServer().getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, true, true); + internal.getChunkProvider().getChunkAt(chunkcoordintpair.x, chunkcoordintpair.z, true, true); } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 944595a1..27ebfb30 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -140,7 +140,7 @@ public class CraftWorld implements World { } public Chunk getChunkAt(int x, int z) { - return this.world.getChunkProviderServer().getChunkAt(x, z, true, true).bukkitChunk; + return this.world.getChunkProvider().getChunkAt(x, z, true, true).bukkitChunk; } public Chunk getChunkAt(Block block) { @@ -148,16 +148,16 @@ public class CraftWorld implements World { } public boolean isChunkLoaded(int x, int z) { - return world.getChunkProviderServer().isLoaded(x, z); + return world.getChunkProvider().isLoaded(x, z); } @Override public boolean isChunkGenerated(int x, int z) { - return isChunkLoaded(x, z) || ((ChunkRegionLoader) world.getChunkProviderServer().chunkLoader).chunkExists(x, z); + return isChunkLoaded(x, z) || ((ChunkRegionLoader) world.getChunkProvider().chunkLoader).chunkExists(x, z); } public Chunk[] getLoadedChunks() { - Object[] chunks = world.getChunkProviderServer().chunks.values().toArray(); + Object[] chunks = world.getChunkProvider().chunks.values().toArray(); org.bukkit.Chunk[] craftChunks = new CraftChunk[chunks.length]; for (int i = 0; i < chunks.length; i++) { @@ -193,9 +193,9 @@ public class CraftWorld implements World { return false; } - net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkAt(x, z, false, false); + net.minecraft.server.Chunk chunk = world.getChunkProvider().getChunkAt(x, z, false, false); if (chunk != null) { - world.getChunkProviderServer().unload(chunk); + world.getChunkProvider().unload(chunk); } return true; @@ -210,13 +210,13 @@ public class CraftWorld implements World { } private boolean unloadChunk0(int x, int z, boolean save) { - net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getChunkAt(x, z, false, false); + net.minecraft.server.Chunk chunk = world.getChunkProvider().getChunkAt(x, z, false, false); if (chunk == null) { return true; } // If chunk had previously been queued to save, must do save to avoid loss of that data - return world.getChunkProviderServer().unloadChunk(chunk, chunk.mustSave || save); + return world.getChunkProvider().unloadChunk(chunk, chunk.mustSave || save); } public boolean regenerateChunk(int x, int z) { @@ -225,9 +225,9 @@ public class CraftWorld implements World { } final long chunkKey = ChunkCoordIntPair.a(x, z); - world.getChunkProviderServer().unloadQueue.remove(chunkKey); + world.getChunkProvider().unloadQueue.remove(chunkKey); - net.minecraft.server.Chunk chunk = world.getChunkProviderServer().generateChunk(x, z); + net.minecraft.server.Chunk chunk = world.getChunkProvider().generateChunk(x, z); PlayerChunk playerChunk = world.getPlayerChunkMap().getChunk(x, z); if (playerChunk != null) { playerChunk.chunk = chunk; @@ -266,7 +266,7 @@ public class CraftWorld implements World { public boolean loadChunk(int x, int z, boolean generate) { chunkLoadCount++; - return world.getChunkProviderServer().getChunkAt(x, z, true, generate) != null; + return world.getChunkProvider().getChunkAt(x, z, true, generate) != null; } public boolean isChunkLoaded(Chunk chunk) { @@ -1723,7 +1723,7 @@ public class CraftWorld implements World { @Override public Location locateNearestStructure(Location origin, StructureType structureType, int radius, boolean findUnexplored) { BlockPosition originPos = new BlockPosition(origin.getX(), origin.getY(), origin.getZ()); - BlockPosition nearest = getHandle().getChunkProviderServer().getChunkGenerator().findNearestMapFeature(getHandle(), structureType.getName(), originPos, radius, findUnexplored); + BlockPosition nearest = getHandle().getChunkProvider().getChunkGenerator().findNearestMapFeature(getHandle(), structureType.getName(), originPos, radius, findUnexplored); return (nearest == null) ? null : new Location(this, nearest.getX(), nearest.getY(), nearest.getZ()); } @@ -1738,7 +1738,7 @@ public class CraftWorld implements World { return; } - ChunkProviderServer cps = world.getChunkProviderServer(); + ChunkProviderServer cps = world.getChunkProvider(); for (net.minecraft.server.Chunk chunk : cps.chunks.values()) { // If in use, skip it if (isChunkInUse(chunk.locX, chunk.locZ)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java index 771eea2d..31c5d97e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java @@ -28,11 +28,11 @@ public class CraftEndermite extends CraftMonster implements Endermite { @Override public boolean isPlayerSpawned() { - return getHandle().l(); // PAIL + return getHandle().isPlayerSpawned(); } @Override public void setPlayerSpawned(boolean playerSpawned) { - getHandle().a(playerSpawned); // PAIL + getHandle().setPlayerSpawned(playerSpawned); } } diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java index 8c8fa453..3f2948a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java @@ -174,7 +174,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator<GeneratorSettin } @Override - public int e() { + public int getGenerationDepth() { return world.getHeight(); } } diff --git a/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java index aaa1bc1c..fd5280e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java @@ -108,7 +108,7 @@ public class NormalChunkGenerator<C extends GeneratorSettings> extends InternalC } @Override - public int e() { - return generator.e(); // PAIL: Gen depth + public int getGenerationDepth() { + return generator.getGenerationDepth(); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java index 19e52317..dc344be4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -421,7 +421,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable { continue; } - EquipmentSlot slot = CraftEquipmentSlot.getSlot(EnumItemSlot.a(slotName.toLowerCase(Locale.ROOT))); // PAIL rename fromName + EquipmentSlot slot = CraftEquipmentSlot.getSlot(EnumItemSlot.fromName(slotName.toLowerCase(Locale.ROOT))); if (slot == null) { modifiers.put(attribute, attribMod); continue; diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java index 3cf5deac..b1ecf5a5 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java +++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java @@ -44,17 +44,17 @@ public class DummyGeneratorAccess implements GeneratorAccess { } @Override - public TickList<Block> J() { + public TickList<Block> getBlockTickList() { throw new UnsupportedOperationException("Not supported yet."); } @Override - public TickList<FluidType> I() { + public TickList<FluidType> getFluidTickList() { throw new UnsupportedOperationException("Not supported yet."); } @Override - public IChunkAccess b(int i, int i1) { + public IChunkAccess getChunkAt(int i, int i1) { throw new UnsupportedOperationException("Not supported yet."); } diff --git a/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java b/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java index 8bd4e82c..7e8d5a0e 100644 --- a/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java +++ b/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java @@ -20,31 +20,31 @@ public class EnderDragonPhaseTest { @Test public void testBukkitToMinecraft() { - Assert.assertEquals("CIRCLING", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.CIRCLING), DragonControllerPhase.a); // PAIL: Rename HOLDING_PATTERN - Assert.assertEquals("STRAFING", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.STRAFING), DragonControllerPhase.b); // PAIL: Rename STRAFE_PLAYER - Assert.assertEquals("FLY_TO_PORTAL", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.FLY_TO_PORTAL), DragonControllerPhase.c); // PAIL: Rename LANDING_APPROACH - Assert.assertEquals("LAND_ON_PORTAL", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.LAND_ON_PORTAL), DragonControllerPhase.d); // PAIL: Rename LANDING - Assert.assertEquals("LEAVE_PORTAL", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.LEAVE_PORTAL), DragonControllerPhase.e); // PAIL: Rename TAKEOFF - Assert.assertEquals("BREATH_ATTACK", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.BREATH_ATTACK), DragonControllerPhase.f); // PAIL: Rename SITTING_FLAMING - Assert.assertEquals("SEARCH_FOR_BREATH_ATTACK_TARGET", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.SEARCH_FOR_BREATH_ATTACK_TARGET), DragonControllerPhase.g); // PAIL: Rename SITTING_SCANNING - Assert.assertEquals("ROAR_BEFORE_ATTACK", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.ROAR_BEFORE_ATTACK), DragonControllerPhase.h); // PAIL: Rename SITTING_ATTACKING - Assert.assertEquals("CHARGE_PLAYER", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.CHARGE_PLAYER), DragonControllerPhase.i); // PAIL: Rename CHARGING_PLAYER - Assert.assertEquals("DYING", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.DYING), DragonControllerPhase.j); // PAIL: Rename DYING - Assert.assertEquals("HOVER", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.HOVER), DragonControllerPhase.k); // PAIL: Rename HOVER + Assert.assertEquals("CIRCLING", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.CIRCLING), DragonControllerPhase.HOLDING_PATTERN); + Assert.assertEquals("STRAFING", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.STRAFING), DragonControllerPhase.STRAFE_PLAYER); + Assert.assertEquals("FLY_TO_PORTAL", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.FLY_TO_PORTAL), DragonControllerPhase.LANDING_APPROACH); + Assert.assertEquals("LAND_ON_PORTAL", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.LAND_ON_PORTAL), DragonControllerPhase.LANDING); + Assert.assertEquals("LEAVE_PORTAL", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.LEAVE_PORTAL), DragonControllerPhase.TAKEOFF); + Assert.assertEquals("BREATH_ATTACK", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.BREATH_ATTACK), DragonControllerPhase.SITTING_FLAMING); + Assert.assertEquals("SEARCH_FOR_BREATH_ATTACK_TARGET", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.SEARCH_FOR_BREATH_ATTACK_TARGET), DragonControllerPhase.SITTING_SCANNING); + Assert.assertEquals("ROAR_BEFORE_ATTACK", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.ROAR_BEFORE_ATTACK), DragonControllerPhase.SITTING_ATTACKING); + Assert.assertEquals("CHARGE_PLAYER", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.CHARGE_PLAYER), DragonControllerPhase.CHARGING_PLAYER); + Assert.assertEquals("DYING", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.DYING), DragonControllerPhase.DYING); + Assert.assertEquals("HOVER", CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.HOVER), DragonControllerPhase.HOVER); } @Test public void testMinecraftToBukkit() { - Assert.assertEquals("CIRCLING", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.a), EnderDragon.Phase.CIRCLING); - Assert.assertEquals("STRAFING", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.b), EnderDragon.Phase.STRAFING); - Assert.assertEquals("FLY_TO_PORTAL", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.c), EnderDragon.Phase.FLY_TO_PORTAL); - Assert.assertEquals("LAND_ON_PORTAL", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.d), EnderDragon.Phase.LAND_ON_PORTAL); - Assert.assertEquals("LEAVE_PORTAL", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.e), EnderDragon.Phase.LEAVE_PORTAL); - Assert.assertEquals("BREATH_ATTACK", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.f), EnderDragon.Phase.BREATH_ATTACK); - Assert.assertEquals("SEARCH_FOR_BREATH_ATTACK_TARGET", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.g), EnderDragon.Phase.SEARCH_FOR_BREATH_ATTACK_TARGET); - Assert.assertEquals("ROAR_BEFORE_ATTACK", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.h), EnderDragon.Phase.ROAR_BEFORE_ATTACK); - Assert.assertEquals("CHARGE_PLAYER", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.i), EnderDragon.Phase.CHARGE_PLAYER); - Assert.assertEquals("DYING", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.j), EnderDragon.Phase.DYING); - Assert.assertEquals("HOVER", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.k), EnderDragon.Phase.HOVER); + Assert.assertEquals("CIRCLING", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.HOLDING_PATTERN), EnderDragon.Phase.CIRCLING); + Assert.assertEquals("STRAFING", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.STRAFE_PLAYER), EnderDragon.Phase.STRAFING); + Assert.assertEquals("FLY_TO_PORTAL", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.LANDING_APPROACH), EnderDragon.Phase.FLY_TO_PORTAL); + Assert.assertEquals("LAND_ON_PORTAL", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.LANDING), EnderDragon.Phase.LAND_ON_PORTAL); + Assert.assertEquals("LEAVE_PORTAL", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.TAKEOFF), EnderDragon.Phase.LEAVE_PORTAL); + Assert.assertEquals("BREATH_ATTACK", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.SITTING_FLAMING), EnderDragon.Phase.BREATH_ATTACK); + Assert.assertEquals("SEARCH_FOR_BREATH_ATTACK_TARGET", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.SITTING_SCANNING), EnderDragon.Phase.SEARCH_FOR_BREATH_ATTACK_TARGET); + Assert.assertEquals("ROAR_BEFORE_ATTACK", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.SITTING_ATTACKING), EnderDragon.Phase.ROAR_BEFORE_ATTACK); + Assert.assertEquals("CHARGE_PLAYER", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.CHARGING_PLAYER), EnderDragon.Phase.CHARGE_PLAYER); + Assert.assertEquals("DYING", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.DYING), EnderDragon.Phase.DYING); + Assert.assertEquals("HOVER", CraftEnderDragon.getBukkitPhase(DragonControllerPhase.HOVER), EnderDragon.Phase.HOVER); } } |