diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-06-27 00:25:01 +0200 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-06-27 00:47:03 +0200 |
commit | a98c7ba2c706caa0ba83bddefa5ffecbe658ccd3 (patch) | |
tree | f7c9c5db09b72b57a85240cc7fdb2e4bcf7ab875 /src/main/java/org | |
parent | 9e5dba8306f77e0583537efe7d5b3670639e3382 (diff) | |
download | craftbukkit-a98c7ba2c706caa0ba83bddefa5ffecbe658ccd3.tar craftbukkit-a98c7ba2c706caa0ba83bddefa5ffecbe658ccd3.tar.gz craftbukkit-a98c7ba2c706caa0ba83bddefa5ffecbe658ccd3.tar.lz craftbukkit-a98c7ba2c706caa0ba83bddefa5ffecbe658ccd3.tar.xz craftbukkit-a98c7ba2c706caa0ba83bddefa5ffecbe658ccd3.zip |
Massive renaming update in nms. If you bypassed Bukkit, you will likely break.
Also minimized all the nms diffs and generic cleanups all around.
Diffstat (limited to 'src/main/java/org')
18 files changed, 87 insertions, 78 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java index 2d870eec..39512e95 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java @@ -126,12 +126,12 @@ public class CraftChunk implements Chunk { public ChunkSnapshot getChunkSnapshot(boolean includeMaxblocky, boolean includeBiome, boolean includeBiomeTempRain) { net.minecraft.server.Chunk chunk = getHandle(); byte[] buf = new byte[32768 + 16384 + 16384 + 16384]; // Get big enough buffer for whole chunk - chunk.a(buf, 0, 0, 0, 16, 128, 16, 0); // Get whole chunk + chunk.getData(buf, 0, 0, 0, 16, 128, 16, 0); // Get whole chunk byte[] hmap = null; if (includeMaxblocky) { hmap = new byte[256]; // Get copy of height map - System.arraycopy(chunk.h, 0, hmap, 0, 256); + System.arraycopy(chunk.heightMap, 0, hmap, 0, 256); } BiomeBase[] biome = null; @@ -140,29 +140,29 @@ public class CraftChunk implements Chunk { if (includeBiome || includeBiomeTempRain) { WorldChunkManager wcm = chunk.world.getWorldChunkManager(); - BiomeBase[] bb = wcm.a(getX()<<4, getZ()<<4, 16, 16); + BiomeBase[] biomeBase = wcm.getBiomeData(getX() << 4, getZ() << 4, 16, 16); if (includeBiome) { biome = new BiomeBase[256]; - System.arraycopy(bb, 0, biome, 0, biome.length); + System.arraycopy(biomeBase, 0, biome, 0, biome.length); } if (includeBiomeTempRain) { biomeTemp = new double[256]; biomeRain = new double[256]; - System.arraycopy(wcm.a, 0, biomeTemp, 0, biomeTemp.length); - System.arraycopy(wcm.b, 0, biomeRain, 0, biomeRain.length); + System.arraycopy(wcm.temperature, 0, biomeTemp, 0, biomeTemp.length); + System.arraycopy(wcm.rain, 0, biomeRain, 0, biomeRain.length); } } - World w = getWorld(); - return new CraftChunkSnapshot(getX(), getZ(), w.getName(), w.getFullTime(), buf, hmap, biome, biomeTemp, biomeRain); + World world = getWorld(); + return new CraftChunkSnapshot(getX(), getZ(), world.getName(), world.getFullTime(), buf, hmap, biome, biomeTemp, biomeRain); } /** * Empty chunk snapshot - nothing but air blocks, but can include valid biome data */ private static class EmptyChunkSnapshot extends CraftChunkSnapshot { - EmptyChunkSnapshot(int x, int z, String w, long wtime, BiomeBase[] biome, double[] biomeTemp, double[] biomeRain) { - super(x, z, w, wtime, null, null, biome, biomeTemp, biomeRain); + EmptyChunkSnapshot(int x, int z, String worldName, long time, BiomeBase[] biome, double[] biomeTemp, double[] biomeRain) { + super(x, z, worldName, time, null, null, biome, biomeTemp, biomeRain); } public final int getBlockTypeId(int x, int y, int z) { @@ -186,27 +186,27 @@ public class CraftChunk implements Chunk { } } - public static ChunkSnapshot getEmptyChunkSnapshot(int x, int z, CraftWorld w, boolean includeBiome, boolean includeBiomeTempRain) { + public static ChunkSnapshot getEmptyChunkSnapshot(int x, int z, CraftWorld world, boolean includeBiome, boolean includeBiomeTempRain) { BiomeBase[] biome = null; double[] biomeTemp = null; double[] biomeRain = null; if (includeBiome || includeBiomeTempRain) { - WorldChunkManager wcm = w.getHandle().getWorldChunkManager(); - BiomeBase[] bb = wcm.a(x<<4, z<<4, 16, 16); + WorldChunkManager wcm = world.getHandle().getWorldChunkManager(); + BiomeBase[] biomeBase = wcm.getBiomeData(x << 4, z << 4, 16, 16); if (includeBiome) { biome = new BiomeBase[256]; - System.arraycopy(bb, 0, biome, 0, biome.length); + System.arraycopy(biomeBase, 0, biome, 0, biome.length); } if (includeBiomeTempRain) { biomeTemp = new double[256]; biomeRain = new double[256]; - System.arraycopy(wcm.a, 0, biomeTemp, 0, biomeTemp.length); - System.arraycopy(wcm.b, 0, biomeRain, 0, biomeRain.length); + System.arraycopy(wcm.temperature, 0, biomeTemp, 0, biomeTemp.length); + System.arraycopy(wcm.rain, 0, biomeRain, 0, biomeRain.length); } } - return new EmptyChunkSnapshot(x, z, w.getName(), w.getFullTime(), biome, biomeTemp, biomeRain); + return new EmptyChunkSnapshot(x, z, world.getName(), world.getFullTime(), biome, biomeTemp, biomeRain); } }
\ No newline at end of file diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 46c58109..589532c9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -319,7 +319,7 @@ public final class CraftServer implements Server { console.onlineMode = config.getBoolean("online-mode", console.onlineMode); console.spawnAnimals = config.getBoolean("spawn-animals", console.spawnAnimals); console.pvpMode = config.getBoolean("pvp", console.pvpMode); - console.o = config.getBoolean("allow-flight", console.o); + console.allowFlight = config.getBoolean("allow-flight", console.allowFlight); for (WorldServer world : console.worlds) { world.spawnMonsters = monsters ? 1 : 0; @@ -395,7 +395,7 @@ public final class CraftServer implements Server { int dimension = 200 + console.worlds.size(); WorldServer internal = new WorldServer(console, new ServerNBTManager(new File("."), name, true), name, dimension, seed, environment, generator); - internal.z = console.worlds.get(0).z; + internal.worldMaps = console.worlds.get(0).worldMaps; internal.tracker = new EntityTracker(console, dimension); internal.addIWorldAccess((IWorldAccess) new WorldManager(console, internal)); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index d019e00b..b09e357e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -357,13 +357,13 @@ public class CraftWorld implements World { public LightningStrike strikeLightning(Location loc) { EntityWeatherStorm lightning = new EntityWeatherStorm(world, loc.getX(), loc.getY(), loc.getZ()); - world.a(lightning); + world.strikeLightning(lightning); return new CraftLightningStrike(server, lightning); } public LightningStrike strikeLightningEffect(Location loc) { EntityWeatherStorm lightning = new EntityWeatherStorm(world, loc.getX(), loc.getY(), loc.getZ(), true); - world.a(lightning); + world.strikeLightning(lightning); return new CraftLightningStrike(server, lightning); } @@ -396,7 +396,7 @@ public class CraftWorld implements World { } public long getId() { - return world.worldData.b(); + return world.worldData.getSeed(); } @Override @@ -453,7 +453,7 @@ public class CraftWorld implements World { public void setEnvironment(Environment env) { if (environment != env) { environment = env; - world.worldProvider = WorldProvider.a(environment.getId()); + world.worldProvider = WorldProvider.byDimension(environment.getId()); } } @@ -579,7 +579,7 @@ public class CraftWorld implements World { } public boolean hasStorm() { - return world.worldData.l(); + return world.worldData.hasStorm(); } public void setStorm(boolean hasStorm) { @@ -588,7 +588,7 @@ public class CraftWorld implements World { WeatherChangeEvent weather = new WeatherChangeEvent((org.bukkit.World) this, hasStorm); server.getPluginManager().callEvent(weather); if (!weather.isCancelled()) { - world.worldData.b(hasStorm); + world.worldData.setStorm(hasStorm); // These numbers are from Minecraft if (hasStorm) { @@ -600,15 +600,15 @@ public class CraftWorld implements World { } public int getWeatherDuration() { - return world.worldData.m(); + return world.worldData.getWeatherDuration(); } public void setWeatherDuration(int duration) { - world.worldData.c(duration); + world.worldData.setWeatherDuration(duration); } public boolean isThundering() { - return world.worldData.j(); + return world.worldData.isThundering(); } public void setThundering(boolean thundering) { @@ -617,7 +617,7 @@ public class CraftWorld implements World { ThunderChangeEvent thunder = new ThunderChangeEvent((org.bukkit.World) this, thundering); server.getPluginManager().callEvent(thunder); if (!thunder.isCancelled()) { - world.worldData.a(thundering); + world.worldData.setThundering(thundering); // These numbers are from Minecraft if (thundering) { @@ -629,15 +629,15 @@ public class CraftWorld implements World { } public int getThunderDuration() { - return world.worldData.k(); + return world.worldData.getThunderDuration(); } public void setThunderDuration(int duration) { - world.worldData.b(duration); + world.worldData.setThunderDuration(duration); } public long getSeed() { - return world.worldData.b(); + return world.worldData.getSeed(); } public boolean getPVP() { diff --git a/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java b/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java index 70878e0d..fca0b2e4 100644 --- a/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java +++ b/src/main/java/org/bukkit/craftbukkit/PortalTravelAgent.java @@ -22,7 +22,7 @@ public class PortalTravelAgent implements TravelAgent { public Location findOrCreate(Location location) { WorldServer worldServer = ((CraftWorld) location.getWorld()).getHandle(); - worldServer.chunkProviderServer.a = true; + worldServer.chunkProviderServer.forceChunkLoad = true; // Attempt to find a Portal. Location resultLocation = this.findPortal(location); // If a Portal cannot be found we will attempt to create one. @@ -36,7 +36,7 @@ public class PortalTravelAgent implements TravelAgent { resultLocation = location; } } - worldServer.chunkProviderServer.a = false; + worldServer.chunkProviderServer.forceChunkLoad = false; // Return our resulting portal location. return resultLocation; } @@ -53,10 +53,10 @@ public class PortalTravelAgent implements TravelAgent { double d1; - for (int j1 = l - searchRadius; j1 <= l + searchRadius; ++j1) { + for (int j1 = l - this.searchRadius; j1 <= l + this.searchRadius; ++j1) { double d2 = (double) j1 + 0.5D - location.getX(); - for (int k1 = i1 - searchRadius; k1 <= i1 + searchRadius; ++k1) { + for (int k1 = i1 - this.searchRadius; k1 <= i1 + this.searchRadius; ++k1) { double d3 = (double) k1 + 0.5D - location.getZ(); for (int l1 = 127; l1 >= 0; --l1) { @@ -135,10 +135,10 @@ public class PortalTravelAgent implements TravelAgent { double d3; double d4; - for (i2 = i - creationRadius; i2 <= i + creationRadius; ++i2) { + for (i2 = i - this.creationRadius; i2 <= i + this.creationRadius; ++i2) { d1 = (double) i2 + 0.5D - location.getX(); - for (j2 = k - creationRadius; j2 <= k + creationRadius; ++j2) { + for (j2 = k - this.creationRadius; j2 <= k + this.creationRadius; ++j2) { d2 = (double) j2 + 0.5D - location.getZ(); label271: @@ -186,10 +186,10 @@ public class PortalTravelAgent implements TravelAgent { } if (d0 < 0.0D) { - for (i2 = i - creationRadius; i2 <= i + creationRadius; ++i2) { + for (i2 = i - this.creationRadius; i2 <= i + this.creationRadius; ++i2) { d1 = (double) i2 + 0.5D - location.getX(); - for (j2 = k - creationRadius; j2 <= k + creationRadius; ++j2) { + for (j2 = k - this.creationRadius; j2 <= k + this.creationRadius; ++j2) { d2 = (double) j2 + 0.5D - location.getZ(); label219: @@ -321,7 +321,7 @@ public class PortalTravelAgent implements TravelAgent { } for (l2 = 0; l2 < 4; ++l2) { - world.o = true; + world.suppressPhysics = true; for (k2 = 0; k2 < 4; ++k2) { for (j3 = -1; j3 < 4; ++j3) { @@ -333,7 +333,7 @@ public class PortalTravelAgent implements TravelAgent { } } - world.o = false; + world.suppressPhysics = false; for (k2 = 0; k2 < 4; ++k2) { for (j3 = -1; j3 < 4; ++j3) { diff --git a/src/main/java/org/bukkit/craftbukkit/TextWrapper.java b/src/main/java/org/bukkit/craftbukkit/TextWrapper.java index 836fe7d1..67d3fbbb 100644 --- a/src/main/java/org/bukkit/craftbukkit/TextWrapper.java +++ b/src/main/java/org/bukkit/craftbukkit/TextWrapper.java @@ -26,7 +26,7 @@ public class TextWrapper { private static final char COLOR_CHAR = '\u00A7'; private static final int CHAT_WINDOW_WIDTH = 320; private static final int CHAT_STRING_LENGTH = 119; - private static final String allowedChars = net.minecraft.server.FontAllowedCharacters.a; + private static final String allowedChars = net.minecraft.server.FontAllowedCharacters.allowedCharacters; public static String[] wrapText(final String text) { final StringBuilder out = new StringBuilder(); diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java index 9d5f05e3..44a7bd01 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java @@ -34,8 +34,8 @@ public class CraftBlockState implements BlockState { createData(block.getData()); } - public static BlockState getBlockState(net.minecraft.server.World world, int x, int y, int z) { - return new CraftBlockState(((WorldServer) world).getWorld().getBlockAt(x, y, z)); + public static CraftBlockState getBlockState(net.minecraft.server.World world, int x, int y, int z) { + return new CraftBlockState(world.getWorld().getBlockAt(x, y, z)); } /** diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java index 76364cc6..24a66cc9 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftNoteBlock.java @@ -63,7 +63,7 @@ public class CraftNoteBlock extends CraftBlockState implements NoteBlock { synchronized (block) { if (block.getType() == Material.NOTE_BLOCK) { - world.getHandle().d(getX(), getY(), getZ(), instrument, note); + world.getHandle().playNote(getX(), getY(), getZ(), instrument, note); return true; } else { return false; @@ -76,7 +76,7 @@ public class CraftNoteBlock extends CraftBlockState implements NoteBlock { synchronized (block) { if (block.getType() == Material.NOTE_BLOCK) { - world.getHandle().d(getX(), getY(), getZ(), instrument.getType(), note.getId()); + world.getHandle().playNote(getX(), getY(), getZ(), instrument.getType(), note.getId()); return true; } else { return false; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java index 27993aa0..8e24c096 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java @@ -1,7 +1,6 @@ package org.bukkit.craftbukkit.entity; import net.minecraft.server.EntityCreeper; -import net.minecraft.server.WorldServer; import org.bukkit.craftbukkit.CraftServer; import org.bukkit.entity.Creeper; @@ -14,12 +13,17 @@ public class CraftCreeper extends CraftMonster implements Creeper { } @Override + public EntityCreeper getHandle() { + return (EntityCreeper) super.getHandle(); + } + + @Override public String toString() { return "CraftCreeper"; } public boolean isPowered() { - return getHandle().Z().a(17) == 1; + return getHandle().isPowered(); } public void setPowered(boolean powered) { @@ -32,14 +36,14 @@ public class CraftCreeper extends CraftMonster implements Creeper { server.getPluginManager().callEvent(event); if (!event.isCancelled()) { - getHandle().Z().b(17, (byte) 1); + getHandle().setPowered(true); } } else { CreeperPowerEvent event = new CreeperPowerEvent(entity, CreeperPowerEvent.PowerCause.SET_OFF); server.getPluginManager().callEvent(event); if (!event.isCancelled()) { - getHandle().Z().b(17, (byte) 0); + getHandle().setPowered(false); } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java index f377a7bf..8006bf09 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -40,7 +40,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { } if (entity instanceof EntityPlayer && health == 0) { - ((EntityPlayer) entity).a((Entity) null); + ((EntityPlayer) entity).die((Entity) null); } getHandle().health = health; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java index 225dc4e7..78d5b877 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java @@ -10,11 +10,11 @@ public class CraftPig extends CraftAnimals implements Pig { } public boolean hasSaddle() { - return getHandle().x(); + return getHandle().hasSaddle(); } public void setSaddle(boolean saddled) { - getHandle().a(saddled); + getHandle().setSaddle(saddled); } public EntityPig getHandle() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index d2001860..d40d66d4 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -169,8 +169,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void sendBlockChange(Location loc, int material, byte data) { Packet53BlockChange packet = new Packet53BlockChange(loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), ((CraftWorld) loc.getWorld()).getHandle()); - packet.d = material; - packet.e = data; + packet.material = material; + packet.data = data; getHandle().netServerHandler.sendPacket(packet); } @@ -228,7 +228,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { if (fromWorld == toWorld) { entity.netServerHandler.teleport(to); } else { - server.getHandle().a(entity, toWorld.dimension, to); + server.getHandle().moveToWorld(entity, toWorld.dimension, to); } return true; } @@ -250,7 +250,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } public void updateInventory() { - getHandle().a(getHandle().activeContainer); + getHandle().updateInventory(getHandle().activeContainer); } public void setSleepingIgnored(boolean isSleeping) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java index c4c9b5c3..bbbc58b1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java @@ -16,28 +16,33 @@ public class CraftTNTPrimed extends CraftEntity implements TNTPrimed { return "CraftTNTPrimed"; } + @Override + public EntityTNTPrimed getHandle() { + return (EntityTNTPrimed) super.getHandle(); + } + public float getYield() { - return ((EntityTNTPrimed) getHandle()).yield; + return getHandle().yield; } public boolean isIncendiary() { - return ((EntityTNTPrimed) getHandle()).isIncendiary; + return getHandle().isIncendiary; } public void setIsIncendiary(boolean isIncendiary) { - ((EntityTNTPrimed) getHandle()).isIncendiary = isIncendiary; + getHandle().isIncendiary = isIncendiary; } public void setYield(float yield) { - ((EntityTNTPrimed) getHandle()).yield = yield; + getHandle().yield = yield; } public int getFuseTicks() { - return ((EntityTNTPrimed) getHandle()).a; + return getHandle().fuseTicks; } public void setFuseTicks(int fuseTicks) { - ((EntityTNTPrimed) getHandle()).a = fuseTicks; + getHandle().fuseTicks = fuseTicks; } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java index 56a14e0c..13813a3d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java @@ -35,11 +35,11 @@ public class CraftWolf extends CraftAnimals implements Wolf { } public boolean isTamed() { - return getHandle().A(); + return getHandle().isTamed(); } public void setTamed(boolean tame) { - getHandle().d(tame); + getHandle().setTamed(tame); } public AnimalTamer getOwner() { @@ -75,11 +75,11 @@ public class CraftWolf extends CraftAnimals implements Wolf { * @return the owner's name, if they are a player; otherwise, the empty string or null. */ String getOwnerName() { - return getHandle().x(); + return getHandle().getOwnerName(); } void setOwnerName(String ownerName) { - getHandle().a(ownerName); + getHandle().setOwnerName(ownerName); } /** @@ -88,7 +88,7 @@ public class CraftWolf extends CraftAnimals implements Wolf { * @param pathentity currently the MC defined PathEntity class. Should be replaced with an API interface at some point. */ private void setPath(PathEntity pathentity) { - getHandle().a(pathentity); + getHandle().setPathEntity(pathentity); } /* diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java index 9b2d5018..45362278 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java @@ -34,7 +34,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator { Chunk chunk = new Chunk(world, types, x, z); - chunk.b(); + chunk.initLighting(); return chunk; } @@ -51,7 +51,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator { return false; } - public boolean b() { + public boolean canSave() { return true; } diff --git a/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java b/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java index 1ab59ce2..c67e546b 100644 --- a/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java +++ b/src/main/java/org/bukkit/craftbukkit/generator/NormalChunkGenerator.java @@ -14,7 +14,7 @@ public class NormalChunkGenerator extends InternalChunkGenerator { private final IChunkProvider provider; public NormalChunkGenerator(World world, long seed) { - provider = world.worldProvider.b(); + provider = world.worldProvider.getChunkProvider(); } public byte[] generate(org.bukkit.World world, Random random, int x, int z) { @@ -22,7 +22,7 @@ public class NormalChunkGenerator extends InternalChunkGenerator { } public boolean canSpawn(org.bukkit.World world, int x, int z) { - return ((CraftWorld) world).getHandle().worldProvider.a(x, z); + return ((CraftWorld) world).getHandle().worldProvider.canSpawn(x, z); } public List<BlockPopulator> getDefaultPopulators(org.bukkit.World world) { @@ -53,7 +53,7 @@ public class NormalChunkGenerator extends InternalChunkGenerator { return provider.unloadChunks(); } - public boolean b() { - return provider.b(); + public boolean canSave() { + return provider.canSave(); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java index 0c28fd2f..5b5e02d1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java @@ -29,6 +29,6 @@ public class CraftFurnaceRecipe extends FurnaceRecipe implements CraftRecipe { int id = result.getTypeId(); int amount = result.getAmount(); int dmg = result.getDurability(); - FurnaceRecipes.a().a(input.getItemTypeId(), new net.minecraft.server.ItemStack(id, amount, dmg)); + FurnaceRecipes.getInstance().registerRecipe(input.getItemTypeId(), new net.minecraft.server.ItemStack(id, amount, dmg)); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java index f54cff78..ea63b33d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java @@ -49,6 +49,6 @@ public class CraftShapedRecipe extends ShapedRecipe implements CraftRecipe { int id = this.getResult().getTypeId(); int amount = this.getResult().getAmount(); short durability = this.getResult().getDurability(); - CraftingManager.a().a(new net.minecraft.server.ItemStack(id, amount, durability), data); + CraftingManager.getInstance().registerShapedRecipe(new net.minecraft.server.ItemStack(id, amount, durability), data); } } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java index 53f2a165..d2f6d4cf 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java @@ -37,6 +37,6 @@ public class CraftShapelessRecipe extends ShapelessRecipe implements CraftRecipe int id = this.getResult().getTypeId(); int amount = this.getResult().getAmount(); short durability = this.getResult().getDurability(); - CraftingManager.a().b(new net.minecraft.server.ItemStack(id, amount, durability), data); + CraftingManager.getInstance().registerShapelessRecipe(new net.minecraft.server.ItemStack(id, amount, durability), data); } } |