diff options
author | Nate Mortensen <nate.richard.mortensen@gmail.com> | 2014-03-20 22:26:30 -0600 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2014-03-21 23:56:34 -0400 |
commit | 385ace970ee7b7912419d601b8a0867c4c2794df (patch) | |
tree | 2549da069930b488940f8a99833c396ffc7e36d1 /src/main/java/org/bukkit | |
parent | afb3511a4a5a63007217f2dbbbbc753f3bee0aed (diff) | |
download | craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar.gz craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar.lz craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.tar.xz craftbukkit-385ace970ee7b7912419d601b8a0867c4c2794df.zip |
Update CraftBukkit to Minecraft 1.7.5
Diffstat (limited to 'src/main/java/org/bukkit')
15 files changed, 73 insertions, 71 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index e6c85758..04f8a693 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -43,6 +43,7 @@ import net.minecraft.server.CommandKick; import net.minecraft.server.CommandKill; import net.minecraft.server.CommandList; import net.minecraft.server.CommandMe; +import net.minecraft.server.CommandNetstat; import net.minecraft.server.CommandOp; import net.minecraft.server.CommandPardon; import net.minecraft.server.CommandPardonIP; @@ -432,6 +433,8 @@ public final class CraftServer implements Server { commandMap.register("minecraft", new VanillaCommandWrapper(new CommandWeather(), "/weather <clear/rain/thunder> [duration in seconds]")); commandMap.register("minecraft", new VanillaCommandWrapper(new CommandWhitelist(), "/whitelist (add|remove) <player>\n/whitelist (on|off|list|reload)")); commandMap.register("minecraft", new VanillaCommandWrapper(new CommandXp(), "/xp <amount> [player]\n/xp <amount>L [player]")); + // This is what is in the lang file, I swear. + commandMap.register("minecraft", new VanillaCommandWrapper(new CommandNetstat(), "/list")); } private void loadPlugin(Plugin plugin) { @@ -1609,11 +1612,11 @@ public final class CraftServer implements Server { } public void setIdleTimeout(int threshold) { - console.d(threshold); // Should be setIdleTimeout + console.setIdleTimeout(threshold); } public int getIdleTimeout() { - return console.aq(); // Should be getIdleTimeout + return console.getIdleTimeout(); } @Deprecated diff --git a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java index 7190c570..24c8bf24 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java @@ -54,7 +54,7 @@ public class CraftStatistic { private CraftStatistic() {} public static org.bukkit.Achievement getBukkitAchievement(net.minecraft.server.Achievement achievement) { - return getBukkitAchievementByName(achievement.e); + return getBukkitAchievementByName(achievement.name); } public static org.bukkit.Achievement getBukkitAchievementByName(String name) { @@ -62,7 +62,7 @@ public class CraftStatistic { } public static org.bukkit.Statistic getBukkitStatistic(net.minecraft.server.Statistic statistic) { - return getBukkitStatisticByName(statistic.e); + return getBukkitStatisticByName(statistic.name); } public static org.bukkit.Statistic getBukkitStatisticByName(String name) { @@ -88,26 +88,26 @@ public class CraftStatistic { } public static net.minecraft.server.Statistic getNMSStatistic(org.bukkit.Statistic statistic) { - return StatisticList.a(statistics.inverse().get(statistic)); + return StatisticList.getStatistic(statistics.inverse().get(statistic)); } public static net.minecraft.server.Achievement getNMSAchievement(org.bukkit.Achievement achievement) { - return (net.minecraft.server.Achievement) StatisticList.a(achievements.inverse().get(achievement)); + return (net.minecraft.server.Achievement) StatisticList.getStatistic(achievements.inverse().get(achievement)); } public static net.minecraft.server.Statistic getMaterialStatistic(org.bukkit.Statistic stat, Material material) { try { if (stat == Statistic.MINE_BLOCK) { - return StatisticList.C[material.getId()]; + return StatisticList.MINE_BLOCK_COUNT[material.getId()]; } if (stat == Statistic.CRAFT_ITEM) { - return StatisticList.D[material.getId()]; + return StatisticList.CRAFT_BLOCK_COUNT[material.getId()]; } if (stat == Statistic.USE_ITEM) { - return StatisticList.E[material.getId()]; + return StatisticList.USE_ITEM_COUNT[material.getId()]; } if (stat == Statistic.BREAK_ITEM) { - return StatisticList.F[material.getId()]; + return StatisticList.BREAK_ITEM_COUNT[material.getId()]; } } catch (ArrayIndexOutOfBoundsException e) { return null; @@ -116,21 +116,21 @@ public class CraftStatistic { } public static net.minecraft.server.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) { - MonsterEggInfo monsteregginfo = (MonsterEggInfo) EntityTypes.a.get(Integer.valueOf(entity.getTypeId())); + MonsterEggInfo monsteregginfo = (MonsterEggInfo) EntityTypes.eggInfo.get(Integer.valueOf(entity.getTypeId())); if (monsteregginfo != null) { - return monsteregginfo.d; + return monsteregginfo.killEntityStatistic; } return null; } public static EntityType getEntityTypeFromStatistic(net.minecraft.server.Statistic statistic) { - String statisticString = statistic.e; + String statisticString = statistic.name; return EntityType.fromName(statisticString.substring(statisticString.lastIndexOf(".") + 1)); } public static Material getMaterialFromStatistic(net.minecraft.server.Statistic statistic) { - String statisticString = statistic.e; + String statisticString = statistic.name; int id; try { id = Integer.valueOf(statisticString.substring(statisticString.lastIndexOf(".") + 1)); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java b/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java index 12331598..f7ca6a3f 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java @@ -41,13 +41,13 @@ public class CraftTravelAgent extends PortalTravelAgent implements TravelAgent { } public Location findPortal(Location location) { - PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().t(); // Should be getTravelAgent + PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().getTravelAgent(); ChunkCoordinates found = pta.findPortal(location.getX(), location.getY(), location.getZ(), this.getSearchRadius()); return found != null ? new Location(location.getWorld(), found.x, found.y, found.z, location.getYaw(), location.getPitch()) : null; } public boolean createPortal(Location location) { - PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().t(); + PortalTravelAgent pta = ((CraftWorld) location.getWorld()).getHandle().getTravelAgent(); return pta.createPortal(location.getX(), location.getY(), location.getZ(), this.getCreationRadius()); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 2c1fbb53..a4ede348 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1011,7 +1011,7 @@ public class CraftWorld implements World { entity = new EntityItemFrame(world, (int) x, (int) y, (int) z, dir); } else if (LeashHitch.class.isAssignableFrom(clazz)) { entity = new EntityLeash(world, (int) x, (int) y, (int) z); - entity.o = true; + entity.n = true; } if (entity != null && !((EntityHanging) entity).survives()) { diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java index 455f3df0..f63300fc 100644 --- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java +++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java @@ -35,16 +35,16 @@ public final class VanillaCommandWrapper extends VanillaCommand { protected final CommandAbstract vanillaCommand; public VanillaCommandWrapper(CommandAbstract vanillaCommand) { - super(vanillaCommand.c()); + super(vanillaCommand.getCommand()); this.vanillaCommand = vanillaCommand; } public VanillaCommandWrapper(CommandAbstract vanillaCommand, String usage) { - super(vanillaCommand.c()); + super(vanillaCommand.getCommand()); this.vanillaCommand = vanillaCommand; this.description = "A Mojang provided command."; this.usageMessage = usage; - this.setPermission("minecraft.command." + vanillaCommand.c()); + this.setPermission("minecraft.command." + vanillaCommand.getCommand()); } @Override @@ -57,14 +57,14 @@ public final class VanillaCommandWrapper extends VanillaCommand { WorldServer[] prev = MinecraftServer.getServer().worldServer; MinecraftServer.getServer().worldServer = new WorldServer[]{(WorldServer) icommandlistener.getWorld()}; try { - vanillaCommand.b(icommandlistener, args); + vanillaCommand.execute(icommandlistener, args); } catch (ExceptionUsage exceptionusage) { ChatMessage chatmessage = new ChatMessage("commands.generic.usage", new Object[] {new ChatMessage(exceptionusage.getMessage(), exceptionusage.a())}); - chatmessage.b().setColor(EnumChatFormat.RED); + chatmessage.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage); } catch (CommandException commandexception) { ChatMessage chatmessage = new ChatMessage(commandexception.getMessage(), commandexception.a()); - chatmessage.b().setColor(EnumChatFormat.RED); + chatmessage.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage); } finally { MinecraftServer.getServer().worldServer = prev; @@ -77,7 +77,7 @@ public final class VanillaCommandWrapper extends VanillaCommand { Validate.notNull(sender, "Sender cannot be null"); Validate.notNull(args, "Arguments cannot be null"); Validate.notNull(alias, "Alias cannot be null"); - return (List<String>) vanillaCommand.a(getListener(sender), args); + return (List<String>) vanillaCommand.tabComplete(getListener(sender), args); } public final int dispatchVanillaCommandBlock(CommandBlockListenerAbstract icommandlistener, String s) { @@ -95,7 +95,7 @@ public final class VanillaCommandWrapper extends VanillaCommand { WorldServer[] prev = MinecraftServer.getServer().worldServer; MinecraftServer.getServer().worldServer = new WorldServer[]{(WorldServer) icommandlistener.getWorld()}; try { - if (vanillaCommand.a(icommandlistener)) { + if (vanillaCommand.canUse(icommandlistener)) { if (i > -1) { EntityPlayer aentityplayer[] = PlayerSelector.getPlayers(icommandlistener, as[i]); String s2 = as[i]; @@ -105,12 +105,12 @@ public final class VanillaCommandWrapper extends VanillaCommand { EntityPlayer entityplayer = aentityplayer1[l]; as[i] = entityplayer.getName(); try { - vanillaCommand.b(icommandlistener, as); + vanillaCommand.execute(icommandlistener, as); j++; continue; } catch (CommandException commandexception1) { ChatMessage chatmessage4 = new ChatMessage(commandexception1.getMessage(), commandexception1.a()); - chatmessage4.b().setColor(EnumChatFormat.RED); + chatmessage4.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage4); l++; } @@ -118,34 +118,34 @@ public final class VanillaCommandWrapper extends VanillaCommand { as[i] = s2; } else { - vanillaCommand.b(icommandlistener, as); + vanillaCommand.execute(icommandlistener, as); j++; } } else { ChatMessage chatmessage = new ChatMessage("commands.generic.permission", new Object[0]); - chatmessage.b().setColor(EnumChatFormat.RED); + chatmessage.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage); } } catch (ExceptionUsage exceptionusage) { ChatMessage chatmessage1 = new ChatMessage("commands.generic.usage", new Object[] { new ChatMessage(exceptionusage.getMessage(), exceptionusage.a()) }); - chatmessage1.b().setColor(EnumChatFormat.RED); + chatmessage1.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage1); } catch (CommandException commandexception) { ChatMessage chatmessage2 = new ChatMessage(commandexception.getMessage(), commandexception.a()); - chatmessage2.b().setColor(EnumChatFormat.RED); + chatmessage2.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage2); } catch (Throwable throwable) { ChatMessage chatmessage3 = new ChatMessage("commands.generic.exception", new Object[0]); - chatmessage3.b().setColor(EnumChatFormat.RED); + chatmessage3.getChatModifier().setColor(EnumChatFormat.RED); icommandlistener.sendMessage(chatmessage3); if(icommandlistener instanceof TileEntityCommandListener) { TileEntityCommandListener listener = (TileEntityCommandListener) icommandlistener; - MinecraftServer.av().log(Level.WARN, String.format("CommandBlock at (%d,%d,%d) failed to handle command", listener.getChunkCoordinates().x, listener.getChunkCoordinates().y, listener.getChunkCoordinates().z), throwable); + MinecraftServer.getLogger().log(Level.WARN, String.format("CommandBlock at (%d,%d,%d) failed to handle command", listener.getChunkCoordinates().x, listener.getChunkCoordinates().y, listener.getChunkCoordinates().z), throwable); } else if (icommandlistener instanceof EntityMinecartCommandBlockListener) { EntityMinecartCommandBlockListener listener = (EntityMinecartCommandBlockListener) icommandlistener; - MinecraftServer.av().log(Level.WARN, String.format("MinecartCommandBlock at (%d,%d,%d) failed to handle command", listener.getChunkCoordinates().x, listener.getChunkCoordinates().y, listener.getChunkCoordinates().z), throwable); + MinecraftServer.getLogger().log(Level.WARN, String.format("MinecartCommandBlock at (%d,%d,%d) failed to handle command", listener.getChunkCoordinates().x, listener.getChunkCoordinates().y, listener.getChunkCoordinates().z), throwable); } else { - MinecraftServer.av().log(Level.WARN, String.format("Unknown CommandBlock failed to handle command"), throwable); + MinecraftServer.getLogger().log(Level.WARN, String.format("Unknown CommandBlock failed to handle command"), throwable); } } finally { MinecraftServer.getServer().worldServer = prev; @@ -174,7 +174,7 @@ public final class VanillaCommandWrapper extends VanillaCommand { private int getPlayerListSize(String as[]) { for (int i = 0; i < as.length; i++) { - if (vanillaCommand.a(as, i) && PlayerSelector.isList(as[i])) { + if (vanillaCommand.isListStart(as, i) && PlayerSelector.isList(as[i])) { return i; } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java index 4c319a7f..4f8d47d6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java @@ -17,19 +17,19 @@ public class CraftArrow extends AbstractProjectile implements Arrow { public void setKnockbackStrength(int knockbackStrength) { Validate.isTrue(knockbackStrength >= 0, "Knockback cannot be negative"); - getHandle().a(knockbackStrength); + getHandle().setKnockbackStrength(knockbackStrength); } public int getKnockbackStrength() { - return getHandle().aw; + return getHandle().knockbackStrength; } public boolean isCritical() { - return getHandle().f(); + return getHandle().isCritical(); } public void setCritical(boolean critical) { - getHandle().a(critical); + getHandle().setCritical(critical); } public ProjectileSource getShooter() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index 9cdb0c18..c1f17829 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -348,7 +348,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } public boolean hasLineOfSight(Entity other) { - return getHandle().o(((CraftEntity) other).getHandle()); + return getHandle().p(((CraftEntity) other).getHandle()); } public boolean getRemoveWhenFarAway() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 60b0435e..da574e0b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -522,8 +522,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (achievement.hasParent() && !hasAchievement(achievement.getParent())) { awardAchievement(achievement.getParent()); } - getHandle().x().a(getHandle(), CraftStatistic.getNMSAchievement(achievement), 1); - getHandle().x().b(getHandle()); + getHandle().getStatisticManager().setStatistic(getHandle(), CraftStatistic.getNMSAchievement(achievement), 1); + getHandle().getStatisticManager().updateStatistics(getHandle()); } @Override @@ -534,13 +534,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { removeAchievement(achieve); } } - getHandle().x().a(getHandle(), CraftStatistic.getNMSAchievement(achievement), 0); + getHandle().getStatisticManager().setStatistic(getHandle(), CraftStatistic.getNMSAchievement(achievement), 0); } @Override public boolean hasAchievement(Achievement achievement) { Validate.notNull(achievement, "Achievement cannot be null"); - return getHandle().x().a(CraftStatistic.getNMSAchievement(achievement)); + return getHandle().getStatisticManager().a(CraftStatistic.getNMSAchievement(achievement)); } @Override @@ -557,7 +557,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public int getStatistic(Statistic statistic) { Validate.notNull(statistic, "Statistic cannot be null"); Validate.isTrue(statistic.getType() == Type.UNTYPED, "Must supply additional paramater for this statistic"); - return getHandle().x().a(CraftStatistic.getNMSStatistic(statistic)); + return getHandle().getStatisticManager().getStatisticValue(CraftStatistic.getNMSStatistic(statistic)); } @Override @@ -578,7 +578,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { Validate.isTrue(statistic.getType() == Type.UNTYPED, "Must supply additional paramater for this statistic"); Validate.isTrue(newValue >= 0, "Value must be greater than or equal to 0"); net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getNMSStatistic(statistic); - getHandle().x().a(getHandle(), nmsStatistic, newValue); + getHandle().getStatisticManager().setStatistic(getHandle(), nmsStatistic, newValue); } @Override @@ -598,7 +598,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { Validate.isTrue(statistic.getType() == Type.BLOCK || statistic.getType() == Type.ITEM, "This statistic does not take a Material parameter"); net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material); Validate.notNull(nmsStatistic, "The supplied Material does not have a corresponding statistic"); - return getHandle().x().a(nmsStatistic); + return getHandle().getStatisticManager().getStatisticValue(nmsStatistic); } @Override @@ -621,7 +621,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { Validate.isTrue(statistic.getType() == Type.BLOCK || statistic.getType() == Type.ITEM, "This statistic does not take a Material parameter"); net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material); Validate.notNull(nmsStatistic, "The supplied Material does not have a corresponding statistic"); - getHandle().x().a(getHandle(), nmsStatistic, newValue); + getHandle().getStatisticManager().setStatistic(getHandle(), nmsStatistic, newValue); } @Override @@ -641,7 +641,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { Validate.isTrue(statistic.getType() == Type.ENTITY, "This statistic does not take an EntityType parameter"); net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType); Validate.notNull(nmsStatistic, "The supplied EntityType does not have a corresponding statistic"); - return getHandle().x().a(nmsStatistic); + return getHandle().getStatisticManager().getStatisticValue(nmsStatistic); } @Override @@ -664,7 +664,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { Validate.isTrue(statistic.getType() == Type.ENTITY, "This statistic does not take an EntityType parameter"); net.minecraft.server.Statistic nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType); Validate.notNull(nmsStatistic, "The supplied EntityType does not have a corresponding statistic"); - getHandle().x().a(getHandle(), nmsStatistic, newValue); + getHandle().getStatisticManager().setStatistic(getHandle(), nmsStatistic, newValue); } @Override @@ -1011,7 +1011,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setResourcePack(String url) { Validate.notNull(url, "Resource pack URL cannot be null"); - getHandle().a(url); // should be setResourcePack + getHandle().setResourcePack(url); } public void addChannel(String channel) { @@ -1225,7 +1225,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void updateScaledHealth() { - AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().bc(); + AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().bb(); Set set = attributemapserver.b(); injectScaledMaxHealth(set, true); @@ -1250,6 +1250,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } continue; } - collection.add(new AttributeModifiable(getHandle().bc(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true))); + collection.add(new AttributeModifiable(getHandle().bb(), (new AttributeRanged("generic.maxHealth", scaledHealth ? healthScale : getMaxHealth(), 0.0D, Float.MAX_VALUE)).a("Max Health").a(true))); } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java index a91ffb17..2911d601 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -393,8 +393,7 @@ public class CraftEventFactory { } public static EntityDamageEvent handleEntityDamageEvent(Entity entity, DamageSource source, float damage) { - // Should be isExplosion - if (source.c()) { + if (source.isExplosion()) { return null; } else if (source instanceof EntityDamageSource) { Entity damager = source.getEntity(); diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java index 096af8e8..dc509dfa 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java @@ -226,5 +226,5 @@ public class CustomChunkGenerator extends InternalChunkGenerator { return "CustomChunkGenerator"; } - public void b() {} + public void c() {} } diff --git a/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java index 8af99918..ceab5816 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java @@ -82,5 +82,5 @@ public class NormalChunkGenerator extends InternalChunkGenerator { return "NormalWorldGenerator"; } - public void b() {} + public void c() {} } diff --git a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java index f3550458..0959a09e 100644 --- a/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java +++ b/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java @@ -83,13 +83,13 @@ public class CraftBlockProjectileSource implements BlockProjectileSource { ((EntityArrow) launch).fromPlayer = 1; ((EntityArrow) launch).projectileSource = this; } else if (Fireball.class.isAssignableFrom(projectile)) { - double d0 = iposition.getX() + (double) ((float) enumfacing.c() * 0.3F); - double d1 = iposition.getY() + (double) ((float) enumfacing.c() * 0.3F); - double d2 = iposition.getZ() + (double) ((float) enumfacing.e() * 0.3F); + double d0 = iposition.getX() + (double) ((float) enumfacing.getAdjacentX() * 0.3F); + double d1 = iposition.getY() + (double) ((float) enumfacing.getAdjacentY() * 0.3F); + double d2 = iposition.getZ() + (double) ((float) enumfacing.getAdjacentZ() * 0.3F); Random random = world.random; - double d3 = random.nextGaussian() * 0.05D + (double) enumfacing.c(); - double d4 = random.nextGaussian() * 0.05D + (double) enumfacing.d(); - double d5 = random.nextGaussian() * 0.05D + (double) enumfacing.e(); + double d3 = random.nextGaussian() * 0.05D + (double) enumfacing.getAdjacentX(); + double d4 = random.nextGaussian() * 0.05D + (double) enumfacing.getAdjacentY(); + double d5 = random.nextGaussian() * 0.05D + (double) enumfacing.getAdjacentZ(); if (SmallFireball.class.isAssignableFrom(projectile)) { launch = new EntitySmallFireball(world, d0, d1, d2, d3, d4, d5); @@ -129,7 +129,7 @@ public class CraftBlockProjectileSource implements BlockProjectileSource { b *= 1.25F; } // Copied from DispenseBehaviorProjectile - ((IProjectile) launch).shoot((double) enumfacing.c(), (double) ((float) enumfacing.d() + 0.1F), (double) enumfacing.e(), b, a); + ((IProjectile) launch).shoot((double) enumfacing.getAdjacentX(), (double) ((float) enumfacing.getAdjacentY() + 0.1F), (double) enumfacing.getAdjacentZ(), b, a); } if (velocity != null) { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java index 66368f4f..2b57bf88 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java @@ -85,9 +85,9 @@ public final class CraftChatMessage { currentChatComponent = null; break; case 3: - modifier.a(new ChatClickable(EnumClickAction.OPEN_URL, match)); // Should be setChatClickable + modifier.setChatClickable(new ChatClickable(EnumClickAction.OPEN_URL, match)); appendNewComponent(matcher.end(groupId)); - modifier.a((ChatClickable) null); + modifier.setChatClickable((ChatClickable) null); } currentIndex = matcher.end(groupId); } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java b/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java index 23ae7ff2..0a72a953 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftDamageSource.java @@ -18,7 +18,7 @@ public final class CraftDamageSource extends DamageSource { } // Check fire - if (original.c()) { + if (original.isExplosion()) { newSource.n(); } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java index 43adac13..54e2f5d6 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -93,14 +93,14 @@ public final class CraftMagicNumbers implements UnsafeValues { @Override public List<String> tabCompleteInternalMaterialName(String token, List<String> completions) { - return StringUtil.copyPartialMatches(token, Item.REGISTRY.b(), completions); + return StringUtil.copyPartialMatches(token, Item.REGISTRY.keySet(), completions); } @Override public ItemStack modifyItemStack(ItemStack stack, String arguments) { net.minecraft.server.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack); - nmsStack.setTag((NBTTagCompound) MojangsonParser.a(arguments)); + nmsStack.setTag((NBTTagCompound) MojangsonParser.parse(arguments)); stack.setItemMeta(CraftItemStack.getItemMeta(nmsStack)); @@ -122,7 +122,7 @@ public final class CraftMagicNumbers implements UnsafeValues { List<String> matches = new ArrayList<String>(); Iterator iterator = StatisticList.b.iterator(); while (iterator.hasNext()) { - String statistic = ((net.minecraft.server.Statistic) iterator.next()).e; + String statistic = ((net.minecraft.server.Statistic) iterator.next()).name; if (statistic.startsWith(token)) { matches.add(statistic); } |