diff options
Diffstat (limited to 'src/main')
21 files changed, 64 insertions, 54 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java b/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java index 89983726..67f28566 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftCrashReport.java @@ -5,6 +5,7 @@ import java.io.StringWriter; import java.util.Arrays; import java.util.Map; import java.util.concurrent.Callable; +import net.minecraft.server.CrashReportCallable; import org.bukkit.Bukkit; import org.bukkit.plugin.Plugin; @@ -12,7 +13,7 @@ import org.bukkit.plugin.PluginDescriptionFile; import net.minecraft.server.MinecraftServer; -public class CraftCrashReport implements Callable<Object> { +public class CraftCrashReport implements CrashReportCallable<Object> { public Object call() throws Exception { StringWriter value = new StringWriter(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java index 7037f6cb..b66a6281 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java @@ -136,7 +136,7 @@ public class CraftStatistic { return monsteregginfo.killEntityStatistic; } if (stat == org.bukkit.Statistic.ENTITY_KILLED_BY) { - return monsteregginfo.e; // PAIL: rename + return monsteregginfo.killedByEntityStatistic; } } return null; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 04e99b1b..46c6f00e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -41,6 +41,7 @@ import org.bukkit.craftbukkit.util.CraftMagicNumbers; import org.bukkit.craftbukkit.util.LongHash; import org.bukkit.entity.*; import org.bukkit.entity.Entity; +import org.bukkit.entity.minecart.CommandMinecart; import org.bukkit.entity.minecart.ExplosiveMinecart; import org.bukkit.entity.minecart.HopperMinecart; import org.bukkit.entity.minecart.PoweredMinecart; @@ -125,7 +126,7 @@ public class CraftWorld implements World { } public Chunk getChunkAt(int x, int z) { - return this.world.getChunkProviderServer().getOrCreateChunkFast(x, z).bukkitChunk; + return this.world.getChunkProviderServer().getChunkAt(x, z).bukkitChunk; } public Chunk getChunkAt(Block block) { @@ -133,7 +134,7 @@ public class CraftWorld implements World { } public boolean isChunkLoaded(int x, int z) { - return world.getChunkProviderServer().isChunkLoaded(x, z); + return world.getChunkProviderServer().isLoaded(x, z); } public Chunk[] getLoadedChunks() { @@ -173,7 +174,10 @@ public class CraftWorld implements World { return false; } - world.getChunkProviderServer().queueUnload(x, z); + net.minecraft.server.Chunk chunk = world.getChunkProviderServer().getLoadedChunkAt(x, z); + if (chunk != null) { + world.getChunkProviderServer().unload(chunk); + } return true; } @@ -200,7 +204,7 @@ public class CraftWorld implements World { } world.getChunkProviderServer().unloadQueue.remove(x, z); - world.getChunkProviderServer().chunks.remove(LongHash.toLong(x, z)); + world.getChunkProviderServer().chunks.remove(ChunkCoordIntPair.a(x, z)); // Update neighbor counts for (int xx = -2; xx < 3; xx++) { @@ -209,7 +213,7 @@ public class CraftWorld implements World { continue; } - net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getChunkIfLoaded(chunk.locX + x, chunk.locZ + z); + net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getLoadedChunkAt(chunk.locX + x, chunk.locZ + z); if (neighbor != null) { neighbor.setNeighborUnloaded(-xx, -zz); chunk.setNeighborUnloaded(xx, zz); @@ -228,7 +232,7 @@ public class CraftWorld implements World { net.minecraft.server.Chunk chunk = null; chunk = world.getChunkProviderServer().chunkGenerator.getOrCreateChunk(x, z); - PlayerChunk playerChunk = world.getPlayerChunkMap().b/*PAIL: Rename*/(x, z); + PlayerChunk playerChunk = world.getPlayerChunkMap().getChunk(x, z); if (playerChunk != null) { playerChunk.chunk = chunk; } @@ -272,7 +276,7 @@ public class CraftWorld implements World { } world.getChunkProviderServer().unloadQueue.remove(x, z); - net.minecraft.server.Chunk chunk = world.getChunkProviderServer().chunks.get(LongHash.toLong(x, z)); + net.minecraft.server.Chunk chunk = world.getChunkProviderServer().chunks.get(ChunkCoordIntPair.a(x, z)); if (chunk == null) { chunk = world.getChunkProviderServer().getOrLoadChunkAt(x, z); @@ -282,7 +286,7 @@ public class CraftWorld implements World { private void chunkLoadPostProcess(net.minecraft.server.Chunk chunk, int cx, int cz) { if (chunk != null) { - world.getChunkProviderServer().chunks.put(LongHash.toLong(cx, cz), chunk); + world.getChunkProviderServer().chunks.put(ChunkCoordIntPair.a(cx, cz), chunk); chunk.addEntities(); @@ -293,7 +297,7 @@ public class CraftWorld implements World { continue; } - net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getChunkIfLoaded(chunk.locX + x, chunk.locZ + z); + net.minecraft.server.Chunk neighbor = world.getChunkProviderServer().getLoadedChunkAt(chunk.locX + x, chunk.locZ + z); if (neighbor != null) { neighbor.setNeighborLoaded(-x, -z); chunk.setNeighborLoaded(x, z); @@ -749,7 +753,7 @@ public class CraftWorld implements World { } AxisAlignedBB bb = new AxisAlignedBB(location.getX() - x, location.getY() - y, location.getZ() - z, location.getX() + x, location.getY() + y, location.getZ() + z); - List<net.minecraft.server.Entity> entityList = getHandle().a((net.minecraft.server.Entity) null, bb, null); // PAIL : rename + List<net.minecraft.server.Entity> entityList = getHandle().getEntities((net.minecraft.server.Entity) null, bb, null); List<Entity> bukkitEntityList = new ArrayList<org.bukkit.entity.Entity>(entityList.size()); for (Object entity : entityList) { bukkitEntityList.add(((net.minecraft.server.Entity) entity).getBukkitEntity()); @@ -961,7 +965,7 @@ public class CraftWorld implements World { entity = new EntityThrownExpBottle(world); entity.setPositionRotation(x, y, z, 0, 0); } else if (EnderPearl.class.isAssignableFrom(clazz)) { - entity = new EntityEnderPearl(world, null); + entity = new EntityEnderPearl(world); entity.setPositionRotation(x, y, z, 0, 0); } else if (ThrownPotion.class.isAssignableFrom(clazz)) { if (LingeringPotion.class.isAssignableFrom(clazz)) { @@ -997,6 +1001,8 @@ public class CraftWorld implements World { entity = new EntityMinecartHopper(world, x, y, z); } else if (SpawnerMinecart.class.isAssignableFrom(clazz)) { entity = new EntityMinecartMobSpawner(world, x, y, z); + } else if (CommandMinecart.class.isAssignableFrom(clazz)) { + entity = new EntityMinecartCommandBlock(world, x, y, z); } else { // Default to rideable minecart for pre-rideable compatibility entity = new EntityMinecartRideable(world, x, y, z); } @@ -1514,7 +1520,7 @@ public class CraftWorld implements World { } // Add unload request - cps.queueUnload(chunk.locX, chunk.locZ); + cps.unload(chunk); } } } diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java b/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java index 4e49b18a..45f22212 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java @@ -28,29 +28,29 @@ public class CraftEndGateway extends CraftBlockState implements EndGateway { @Override public Location getExitLocation() { - BlockPosition pos = gateway.h; // PAIL: Rename exitLocation + BlockPosition pos = gateway.exitPortal; return pos == null ? null : new Location(world, pos.getX(), pos.getY(), pos.getZ()); } @Override public void setExitLocation(Location location) { if (location == null) { - gateway.h = null; + gateway.exitPortal = null; } else if (location.getWorld() != world) { throw new IllegalArgumentException("Cannot set exit location to different world"); } else { - gateway.h = new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()); + gateway.exitPortal = new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ()); } } @Override public boolean isExactTeleport() { - return gateway.i; // PAIL: Rename exactTeleport + return gateway.exactTeleport; } @Override public void setExactTeleport(boolean exact) { - gateway.i = exact; + gateway.exactTeleport = exact; } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java index d54eb6ec..d98288cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java +++ b/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java @@ -155,7 +155,7 @@ public class CraftBossBar implements BossBar { @Override public boolean isVisible() { - return handle.j; + return handle.visible; } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java index 6dfef44a..1632f136 100644 --- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java +++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java @@ -2,12 +2,12 @@ package org.bukkit.craftbukkit.chunkio; import java.io.IOException; import net.minecraft.server.Chunk; +import net.minecraft.server.ChunkCoordIntPair; import net.minecraft.server.ChunkRegionLoader; import net.minecraft.server.NBTTagCompound; import org.bukkit.Server; import org.bukkit.craftbukkit.util.AsynchronousExecutor; -import org.bukkit.craftbukkit.util.LongHash; import java.util.concurrent.atomic.AtomicInteger; @@ -41,7 +41,7 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu queuedChunk.loader.loadEntities(chunk, queuedChunk.compound.getCompound("Level"), queuedChunk.world); chunk.setLastSaved(queuedChunk.provider.world.getTime()); - queuedChunk.provider.chunks.put(LongHash.toLong(queuedChunk.x, queuedChunk.z), chunk); + queuedChunk.provider.chunks.put(ChunkCoordIntPair.a(queuedChunk.x, queuedChunk.z), chunk); chunk.addEntities(); if (queuedChunk.provider.chunkGenerator != null) { @@ -60,7 +60,7 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu continue; } - Chunk neighbor = queuedChunk.provider.getChunkIfLoaded(chunk.locX + x, chunk.locZ + z); + Chunk neighbor = queuedChunk.provider.getLoadedChunkAt(chunk.locX + x, chunk.locZ + z); if (neighbor != null) { neighbor.setNeighborLoaded(-x, -z); chunk.setNeighborLoaded(x, z); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java index f8d6a7b3..42f6ea4a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java @@ -211,9 +211,9 @@ public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud public void setSource(ProjectileSource shooter) { if (shooter instanceof CraftLivingEntity) { - getHandle().a((EntityLiving) ((CraftLivingEntity) shooter).getHandle()); // PAIL rename setSource + getHandle().setSource((EntityLiving) ((CraftLivingEntity) shooter).getHandle()); } else { - getHandle().a((EntityLiving) null); + getHandle().setSource((EntityLiving) null); } getHandle().projectileSource = shooter; } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java index af66b90a..3613f5b3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java @@ -14,12 +14,12 @@ public class CraftBoat extends CraftVehicle implements Boat { @Override public TreeSpecies getWoodType() { - return getTreeSpecies(getHandle().r()); // PAIL: Rename getType + return getTreeSpecies(getHandle().getType()); } @Override public void setWoodType(TreeSpecies species) { - getHandle().a(getBoatType(species)); // PAIL: Rename setType + getHandle().setType(getBoatType(species)); } public double getMaxSpeed() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java index 9d9b5d4a..ffb863e6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java @@ -14,28 +14,28 @@ public class CraftEnderCrystal extends CraftEntity implements EnderCrystal { @Override public boolean isShowingBottom() { - return getHandle().k(); // PAIL: Rename isShowingBottom + return getHandle().isShowingBottom(); } @Override public void setShowingBottom(boolean showing) { - getHandle().a(showing); // PAIL: Rename setShowingBottom + getHandle().setShowingBottom(showing); } @Override public Location getBeamTarget() { - BlockPosition pos = getHandle().j(); // PAIL: Rename getBeamTarget + BlockPosition pos = getHandle().getBeamTarget(); return pos == null ? null : new Location(getWorld(), pos.getX(), pos.getY(), pos.getZ()); } @Override public void setBeamTarget(Location location) { if (location == null) { - getHandle().a((BlockPosition) null); // PAIL: Rename setBeamTarget + getHandle().setBeamTarget((BlockPosition) null); } else if (location.getWorld() != getWorld()) { throw new IllegalArgumentException("Cannot set beam target location to different world"); } else { - getHandle().a(new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ())); + getHandle().setBeamTarget(new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ())); } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java index 9b2df6ad..d31a2069 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java @@ -45,12 +45,12 @@ public class CraftEnderDragon extends CraftComplexLivingEntity implements EnderD @Override public Phase getPhase() { - return Phase.values()[getHandle().getDataWatcher().get(EntityEnderDragon.a)]; // PAIL: Rename PHASE + return Phase.values()[getHandle().getDataWatcher().get(EntityEnderDragon.PHASE)]; } @Override public void setPhase(Phase phase) { - getHandle().cT().a(getMinecraftPhase(phase)); // PAIL: Rename getDragonControllerManager setPhase + getHandle().getDragonControllerManager().setControllerPhase(getMinecraftPhase(phase)); } public static Phase getBukkitPhase(DragonControllerPhase phase) { @@ -58,6 +58,6 @@ public class CraftEnderDragon extends CraftComplexLivingEntity implements EnderD } public static DragonControllerPhase getMinecraftPhase(Phase phase) { - return DragonControllerPhase.a(phase.ordinal()); // PAIL: Rename getById + return DragonControllerPhase.getById(phase.ordinal()); } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 83f91313..79fcbc4c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -138,7 +138,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { if (entity instanceof EntityEgg) { return new CraftEgg(server, (EntityEgg) entity); } else if (entity instanceof EntitySnowball) { return new CraftSnowball(server, (EntitySnowball) entity); } else if (entity instanceof EntityPotion) { - if (!((EntityPotion) entity).n()) { return new CraftSplashPotion(server, (EntityPotion) entity); } + if (!((EntityPotion) entity).isLingering()) { return new CraftSplashPotion(server, (EntityPotion) entity); } else { return new CraftLingeringPotion(server, (EntityPotion) entity); } } else if (entity instanceof EntityEnderPearl) { return new CraftEnderPearl(server, (EntityEnderPearl) entity); } @@ -248,7 +248,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { } public List<org.bukkit.entity.Entity> getNearbyEntities(double x, double y, double z) { - List<Entity> notchEntityList = entity.world.a(entity, entity.getBoundingBox().grow(x, y, z), null); + List<Entity> notchEntityList = entity.world.getEntities(entity, entity.getBoundingBox().grow(x, y, z), null); List<org.bukkit.entity.Entity> bukkitEntityList = new java.util.ArrayList<org.bukkit.entity.Entity>(notchEntityList.size()); for (Entity e : notchEntityList) { @@ -555,7 +555,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @Override public void setInvulnerable(boolean flag) { - getHandle().h(flag); // PAIL: rename setInvulnerable + getHandle().setInvulnerable(flag); } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java index 9902e9ee..55119f23 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -62,7 +62,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { } public MainHand getMainHand() { - return getHandle().cr() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT; // PAIL Rename cr()->getMainHand() + return getHandle().getMainHand()== EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT; } public ItemStack getItemInHand() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 8aa86868..e662e4ae 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -532,13 +532,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @Override public void setAI(boolean ai) { if (this.getHandle() instanceof EntityInsentient) { - ((EntityInsentient) this.getHandle()).m(!ai); // PAIL: rename + ((EntityInsentient) this.getHandle()).setAI(!ai); } } @Override public boolean hasAI() { - return (this.getHandle() instanceof EntityInsentient) ? !((EntityInsentient) this.getHandle()).cR() : false; // PAIL: rename + return (this.getHandle() instanceof EntityInsentient) ? !((EntityInsentient) this.getHandle()).hasAI(): false; } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java index 38a5e02c..e9963e21 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java @@ -31,11 +31,11 @@ final class CraftMinecartHopper extends CraftMinecart implements HopperMinecart @Override public boolean isEnabled() { - return ((EntityMinecartHopper) getHandle()).C(); // PAIL: Rename isEnabled + return ((EntityMinecartHopper) getHandle()).isEnabled(); } @Override public void setEnabled(boolean enabled) { - ((EntityMinecartHopper) getHandle()).k(enabled); // PAIL: Rename setEnabled + ((EntityMinecartHopper) getHandle()).setEnabled(enabled); } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 681cc9b4..5bdf114c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -362,8 +362,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } IChatBaseComponent[] components = CraftSign.sanitizeLines(lines); + TileEntitySign sign = new TileEntitySign(); + sign.a(new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ())); // PAIL: rename + System.arraycopy(components, 0, sign.lines, 0, sign.lines.length); - getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateSign(getHandle().world, new BlockPosition(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ()), components)); + getHandle().playerConnection.sendPacket(sign.getUpdatePacket()); } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java index f2f28a0a..3a614edd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java @@ -28,11 +28,11 @@ public class CraftSpectralArrow extends CraftArrow implements SpectralArrow { @Override public int getGlowingTicks() { - return getHandle().f; // PAIL: Rename glowingDuration + return getHandle().duration; } @Override public void setGlowingTicks(int duration) { - getHandle().f = duration; + getHandle().duration = duration; } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java index 95ffdf67..7bb21dbb 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java @@ -93,7 +93,7 @@ public class CraftVillager extends CraftAgeable implements Villager, InventoryHo @Override public HumanEntity getTrader() { - EntityHuman eh = getHandle().t_(); // PAIL: rename t_ -> getTrader + EntityHuman eh = getHandle().getTrader(); return eh == null ? null : eh.getBukkitEntity(); } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index 646ee2bb..edfd0311 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -546,7 +546,7 @@ public class CraftEventFactory { cause = DamageCause.MAGIC; } else if (source == DamageSource.FALL) { cause = DamageCause.FALL; - } else if (source == DamageSource.j) { // PAIL: rename + } else if (source == DamageSource.FLY_INTO_WALL) { cause = DamageCause.FLY_INTO_WALL; } else if (source == DamageSource.GENERIC) { return new EntityDamageEvent(entity.getBukkitEntity(), null, modifiers, modifierFunctions); diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java index 9051d75c..4a0b5f84 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java @@ -12,7 +12,7 @@ public class CraftInventoryMerchant extends CraftInventory implements MerchantIn @Override public int getSelectedRecipeIndex() { - return getInventory().e; + return getInventory().selectedIndex; } @Override diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java index 6737fad5..609a1211 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java @@ -192,7 +192,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta if (blockEntityTag != null && material == Material.SHIELD) { blockEntityTag.setString("id", "Banner"); // Hack } - TileEntity te = blockEntityTag == null ? null : TileEntity.a(MinecraftServer.getServer(), blockEntityTag); + TileEntity te = blockEntityTag == null ? null : TileEntity.c(blockEntityTag); switch (material) { case SIGN: diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java index 160d34a0..e7688340 100644 --- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java +++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java @@ -190,9 +190,9 @@ final class CraftTeam extends CraftScoreboardComponent implements Team { case NAME_TAG_VISIBILITY: return OptionStatus.values()[team.getNameTagVisibility().ordinal()]; case DEATH_MESSAGE_VISIBILITY: - return OptionStatus.values()[team.j().ordinal()]; // PAIL: rename + return OptionStatus.values()[team.getDeathMessageVisibility().ordinal()]; case COLLISION_RULE: - return OptionStatus.values()[team.k().ordinal()]; // PAIL: rename + return OptionStatus.values()[team.getCollisionRule().ordinal()]; default: throw new IllegalArgumentException("Unrecognised option " + option); } @@ -207,10 +207,10 @@ final class CraftTeam extends CraftScoreboardComponent implements Team { team.setNameTagVisibility(EnumNameTagVisibility.values()[status.ordinal()]); break; case DEATH_MESSAGE_VISIBILITY: - team.b(EnumNameTagVisibility.values()[status.ordinal()]); // PAIL: rename + team.setDeathMessageVisibility(EnumNameTagVisibility.values()[status.ordinal()]); break; case COLLISION_RULE: - team.a(ScoreboardTeamBase.EnumTeamPush.values()[status.ordinal()]); // PAIL: rename + team.setCollisionRule(ScoreboardTeamBase.EnumTeamPush.values()[status.ordinal()]); break; default: throw new IllegalArgumentException("Unrecognised option " + option); |