From 7f079a0cd6c87cf6360a0ed86592f88d374ba268 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Thu, 12 Jan 2012 12:02:39 +0100 Subject: Fix CraftBukkit comments. --- .../java/net/minecraft/server/BlockCauldron.java | 2 +- src/main/java/net/minecraft/server/BlockGrass.java | 2 +- .../java/net/minecraft/server/BlockMushroom.java | 4 +- .../java/net/minecraft/server/BlockPiston.java | 2 +- src/main/java/net/minecraft/server/BlockSand.java | 2 +- .../java/net/minecraft/server/BlockSapling.java | 4 +- .../java/net/minecraft/server/Enchantment.java | 6 +- src/main/java/net/minecraft/server/Entity.java | 12 ++-- .../java/net/minecraft/server/EntityCreature.java | 12 ++-- .../net/minecraft/server/EntityFallingBlock.java | 4 +- .../java/net/minecraft/server/EntityHuman.java | 2 +- .../java/net/minecraft/server/EntityLiving.java | 18 +++--- .../java/net/minecraft/server/EntityPlayer.java | 6 +- .../java/net/minecraft/server/EntitySnowball.java | 2 +- src/main/java/net/minecraft/server/EntityWolf.java | 2 +- src/main/java/net/minecraft/server/ItemDoor.java | 2 +- src/main/java/net/minecraft/server/ItemDye.java | 10 ++-- .../java/net/minecraft/server/MinecraftServer.java | 4 +- .../net/minecraft/server/NetServerHandler.java | 2 +- .../server/ServerConfigurationManager.java | 12 ++-- .../java/net/minecraft/server/SpawnerCreature.java | 2 +- src/main/java/net/minecraft/server/World.java | 68 +++++++++++----------- .../java/net/minecraft/server/WorldGenBigTree.java | 18 +++--- .../java/net/minecraft/server/WorldGenForest.java | 16 ++--- .../net/minecraft/server/WorldGenHugeMushroom.java | 20 +++---- .../java/net/minecraft/server/WorldGenTaiga2.java | 16 ++--- .../java/net/minecraft/server/WorldGenTrees.java | 20 +++---- .../java/net/minecraft/server/WorldGenerator.java | 4 +- 28 files changed, 136 insertions(+), 138 deletions(-) (limited to 'src/main') diff --git a/src/main/java/net/minecraft/server/BlockCauldron.java b/src/main/java/net/minecraft/server/BlockCauldron.java index dc5a658f..515271e5 100644 --- a/src/main/java/net/minecraft/server/BlockCauldron.java +++ b/src/main/java/net/minecraft/server/BlockCauldron.java @@ -73,7 +73,7 @@ public class BlockCauldron extends Block { if (!entityhuman.inventory.pickup(itemstack1)) { world.addEntity(new EntityItem(world, (double) i + 0.5D, (double) j + 1.5D, (double) k + 0.5D, itemstack1)); - } else if (entityhuman instanceof EntityPlayer) { //CraftBukkit + } else if (entityhuman instanceof EntityPlayer) { // CraftBukkit ((EntityPlayer) entityhuman).updateInventory(entityhuman.defaultContainer); // CraftBukkit } diff --git a/src/main/java/net/minecraft/server/BlockGrass.java b/src/main/java/net/minecraft/server/BlockGrass.java index b096269b..97afac5d 100644 --- a/src/main/java/net/minecraft/server/BlockGrass.java +++ b/src/main/java/net/minecraft/server/BlockGrass.java @@ -5,7 +5,7 @@ import java.util.Random; // CraftBukkit start import org.bukkit.event.block.BlockSpreadEvent; import org.bukkit.event.block.BlockFadeEvent; -//CraftBukkit end +// CraftBukkit end public class BlockGrass extends Block { diff --git a/src/main/java/net/minecraft/server/BlockMushroom.java b/src/main/java/net/minecraft/server/BlockMushroom.java index 2d8cf25f..b9090d78 100644 --- a/src/main/java/net/minecraft/server/BlockMushroom.java +++ b/src/main/java/net/minecraft/server/BlockMushroom.java @@ -2,14 +2,14 @@ package net.minecraft.server; import java.util.ArrayList; import java.util.Random; -// Craftbukkit start +// CraftBukkit start import org.bukkit.Location; import org.bukkit.TreeType; import org.bukkit.block.BlockState; import org.bukkit.entity.Player; import org.bukkit.event.block.BlockSpreadEvent; import org.bukkit.event.world.StructureGrowEvent; -// Craftbukkit end +// CraftBukkit end public class BlockMushroom extends BlockFlower { diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java index 93a7138d..e3e42824 100644 --- a/src/main/java/net/minecraft/server/BlockPiston.java +++ b/src/main/java/net/minecraft/server/BlockPiston.java @@ -267,7 +267,7 @@ public class BlockPiston extends Block { } } - // CraftBukkkit boolean -> int + // CraftBukkit - boolean -> int private static int g(World world, int i, int j, int k, int l) { int i1 = i + Facing.b[l]; int j1 = j + Facing.c[l]; diff --git a/src/main/java/net/minecraft/server/BlockSand.java b/src/main/java/net/minecraft/server/BlockSand.java index 938ebedc..a0b93aa0 100644 --- a/src/main/java/net/minecraft/server/BlockSand.java +++ b/src/main/java/net/minecraft/server/BlockSand.java @@ -28,7 +28,7 @@ public class BlockSand extends Block { if (!instaFall && world.a(i - b0, j - b0, k - b0, i + b0, j + b0, k + b0)) { if (!world.isStatic) { - // CraftBukkit Change call to add data + // CraftBukkit - Change call to add data EntityFallingBlock entityfallingblock = new EntityFallingBlock(world, (double) ((float) i + 0.5F), (double) ((float) j + 0.5F), (double) ((float) k + 0.5F), this.id, world.getData(i, j, k)); world.addEntity(entityfallingblock); diff --git a/src/main/java/net/minecraft/server/BlockSapling.java b/src/main/java/net/minecraft/server/BlockSapling.java index c9877ba8..06d73ed2 100644 --- a/src/main/java/net/minecraft/server/BlockSapling.java +++ b/src/main/java/net/minecraft/server/BlockSapling.java @@ -9,7 +9,7 @@ import org.bukkit.TreeType; import org.bukkit.block.BlockState; import org.bukkit.entity.Player; import org.bukkit.event.world.StructureGrowEvent; -// Craftbukkit end +// CraftBukkit end public class BlockSapling extends BlockFlower { @@ -29,7 +29,7 @@ public class BlockSapling extends BlockFlower { if ((l & 8) == 0) { world.setData(i, j, k, l | 8); } else { - this.b(world, i, j, k, random, false, null, null); // Craftbukkit - added bonemeal, player and itemstack + this.b(world, i, j, k, random, false, null, null); // CraftBukkit - added bonemeal, player and itemstack } } } diff --git a/src/main/java/net/minecraft/server/Enchantment.java b/src/main/java/net/minecraft/server/Enchantment.java index 6397455a..5975439f 100644 --- a/src/main/java/net/minecraft/server/Enchantment.java +++ b/src/main/java/net/minecraft/server/Enchantment.java @@ -3,7 +3,7 @@ package net.minecraft.server; import org.bukkit.craftbukkit.enchantments.CraftEnchantment; public abstract class Enchantment { -// CraftBukkit comment - update CraftEnchant.getName(i) if this changes. +// CraftBukkit - update CraftEnchant.getName(i) if this changes. public static final Enchantment[] byId = new Enchantment[256]; public static final Enchantment PROTECTION_ENVIRONMENTAL = new EnchantmentProtection(0, 10, 0); public static final Enchantment PROTECTION_FIRE = new EnchantmentProtection(1, 5, 1); @@ -37,9 +37,7 @@ public abstract class Enchantment { byId[i] = this; } - // CraftBukkit start - org.bukkit.enchantments.Enchantment.registerEnchantment(new CraftEnchantment(this)); - // CraftBukkit end + org.bukkit.enchantments.Enchantment.registerEnchantment(new CraftEnchantment(this)); // CraftBukkit } public int getRandomWeight() { diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index 2839fa7b..fec6ac75 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -196,7 +196,7 @@ public abstract class Entity { } public void af() { - // MethodProfiler.a("entityBaseTick"); // CraftBukkit -- not in production code + // MethodProfiler.a("entityBaseTick"); // CraftBukkit - not in production code if (this.vehicle != null && this.vehicle.dead) { this.vehicle = null; } @@ -299,7 +299,7 @@ public abstract class Entity { } this.justCreated = false; - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code } protected void av() { @@ -370,7 +370,7 @@ public abstract class Entity { this.locY = this.boundingBox.b + (double) this.height - (double) this.bL; this.locZ = (this.boundingBox.c + this.boundingBox.f) / 2.0D; } else { - // MethodProfiler.a("move"); // CraftBukkit -- not in production code + // MethodProfiler.a("move"); // CraftBukkit - not in production code this.bL *= 0.4F; double d3 = this.locX; double d4 = this.locZ; @@ -532,8 +532,8 @@ public abstract class Entity { } } - // MethodProfiler.a(); // CraftBukkit -- not in production code - // MethodProfiler.a("rest"); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code + // MethodProfiler.a("rest"); // CraftBukkit - not in production code this.locX = (this.boundingBox.a + this.boundingBox.d) / 2.0D; this.locY = this.boundingBox.b + (double) this.height - (double) this.bL; this.locZ = (this.boundingBox.c + this.boundingBox.f) / 2.0D; @@ -646,7 +646,7 @@ public abstract class Entity { this.fireTicks = -this.maxFireTicks; } - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code } } diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java index 84bf92f4..a974890d 100644 --- a/src/main/java/net/minecraft/server/EntityCreature.java +++ b/src/main/java/net/minecraft/server/EntityCreature.java @@ -22,7 +22,7 @@ public abstract class EntityCreature extends EntityLiving { } protected void m_() { - // MethodProfiler.a("ai"); // CraftBukkit -- not in production code + // MethodProfiler.a("ai"); // CraftBukkit - not in production code if (this.f > 0) { --this.f; } @@ -73,7 +73,7 @@ public abstract class EntityCreature extends EntityLiving { } } - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code if (!this.e && this.target != null && (this.pathEntity == null || this.random.nextInt(20) == 0)) { this.pathEntity = this.world.findPath(this, this.target, f); } else if (!this.e && (this.pathEntity == null && this.random.nextInt(180) == 0 || this.random.nextInt(120) == 0 || this.f > 0) && this.aS < 100) { @@ -86,7 +86,7 @@ public abstract class EntityCreature extends EntityLiving { this.pitch = 0.0F; if (this.pathEntity != null && this.random.nextInt(100) != 0) { - // MethodProfiler.a("followpath"); // CraftBukkit -- not in production code + // MethodProfiler.a("followpath"); // CraftBukkit - not in production code Vec3D vec3d = this.pathEntity.a(this); double d0 = (double) (this.width * 2.0F); @@ -154,7 +154,7 @@ public abstract class EntityCreature extends EntityLiving { this.aW = true; } - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code } else { super.m_(); this.pathEntity = null; @@ -162,7 +162,7 @@ public abstract class EntityCreature extends EntityLiving { } protected void C() { - // MethodProfiler.a("stroll"); // CraftBukkit -- not in production code + // MethodProfiler.a("stroll"); // CraftBukkit - not in production code boolean flag = false; int i = -1; int j = -1; @@ -188,7 +188,7 @@ public abstract class EntityCreature extends EntityLiving { this.pathEntity = this.world.a(this, i, j, k, 10.0F); } - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code } protected void a(Entity entity, float f) {} diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java index b95d61ac..2ffe49ef 100644 --- a/src/main/java/net/minecraft/server/EntityFallingBlock.java +++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java @@ -10,7 +10,7 @@ public class EntityFallingBlock extends Entity { super(world); } - // CraftBukkit -- changed method signature + // CraftBukkit - changed method signature public EntityFallingBlock(World world, double d0, double d1, double d2, int i, int data) { super(world); this.a = i; @@ -66,7 +66,7 @@ public class EntityFallingBlock extends Entity { this.motY *= -0.5D; if (this.world.getTypeId(i, j, k) != Block.PISTON_MOVING.id) { this.die(); - // CraftBukkit -- setTypeId => setTypeIdAndData + // CraftBukkit - setTypeId => setTypeIdAndData if ((!this.world.a(this.a, i, j, k, true, 1) || BlockSand.g(this.world, i, j - 1, k) || !this.world.setTypeIdAndData(i, j, k, this.a, this.data)) && !this.world.isStatic) { this.b(this.a, 1); } diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java index bb84236b..14d35021 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -48,7 +48,7 @@ public abstract class EntityHuman extends EntityLiving { // CraftBukkit end public ChunkCoordinates F; - public int sleepTicks; // CraftBukkit private -> public + public int sleepTicks; // CraftBukkit - private -> public public float G; public float H; private ChunkCoordinates b; diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index e3aabd29..81eb8578 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -81,8 +81,8 @@ public abstract class EntityLiving extends Entity { private int d = 0; private Entity e; protected int aZ = 0; - public int expToDrop = 0; // CraftBukkit added - public int maxAirTicks = 300; // CraftBukkit added + public int expToDrop = 0; // CraftBukkit + public int maxAirTicks = 300; // CraftBukkit public EntityLiving(World world) { super(world); @@ -129,7 +129,7 @@ public abstract class EntityLiving extends Entity { public void af() { this.am = this.an; super.af(); - // MethodProfiler.a("mobBaseTick"); // CraftBukkit -- not in production code + // MethodProfiler.a("mobBaseTick"); // CraftBukkit - not in production code if (this.random.nextInt(1000) < this.a++) { this.a = -this.h(); this.ae(); @@ -175,7 +175,7 @@ public abstract class EntityLiving extends Entity { this.extinguish(); } else { - if (this.getAirTicks() != 300) { // CraftBukkit -- only set if needed to work around a datawatcher inefficiency + if (this.getAirTicks() != 300) { // CraftBukkit - only set if needed to work around a datawatcher inefficiency this.setAirTicks(maxAirTicks); } } @@ -208,7 +208,7 @@ public abstract class EntityLiving extends Entity { this.W = this.V; this.lastYaw = this.yaw; this.lastPitch = this.pitch; - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code } // CraftBukkit start @@ -877,7 +877,7 @@ public abstract class EntityLiving extends Entity { } } - // MethodProfiler.a("ai"); // CraftBukkit -- not in production code + // MethodProfiler.a("ai"); // CraftBukkit - not in production code if (this.L()) { this.aW = false; this.aT = 0.0F; @@ -887,7 +887,7 @@ public abstract class EntityLiving extends Entity { this.m_(); } - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code boolean flag = this.az(); boolean flag1 = this.aA(); @@ -912,7 +912,7 @@ public abstract class EntityLiving extends Entity { this.ak *= this.F(); this.a(this.aT, this.aU); this.ak = f; - // MethodProfiler.a("push"); // CraftBukkit -- not in production code + // MethodProfiler.a("push"); // CraftBukkit - not in production code List list1 = this.world.b((Entity) this, this.boundingBox.b(0.20000000298023224D, 0.0D, 0.20000000298023224D)); if (list1 != null && list1.size() > 0) { @@ -925,7 +925,7 @@ public abstract class EntityLiving extends Entity { } } - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code } protected boolean L() { diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java index 10a60488..d6811cd9 100644 --- a/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java @@ -27,7 +27,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { private int cc = -99999999; private int cd = -99999999; private boolean ce = true; - public int cf = -99999999; // Craftbukkit - priv to pub - "lastSentExp" + public int cf = -99999999; // CraftBukkit - priv to pub - "lastSentExp" public int cg = 60; // CraftBukkit - private to public; temporary until we get an API out private ItemStack[] ch = new ItemStack[] { null, null, null, null, null}; private int ci = 0; @@ -325,13 +325,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { this.netServerHandler.sendPacket(new Packet70Bed(4, 0)); } else { this.a((Statistic) AchievementList.B); - /* //CraftBukkit start - removed to fix our handling of The End portals + /* CraftBukkit start - removed to fix our handling of The End portals ChunkCoordinates chunkcoordinates = this.b.getWorldServer(i).d(); if (chunkcoordinates != null) { this.netServerHandler.a((double) chunkcoordinates.x, (double) chunkcoordinates.y, (double) chunkcoordinates.z, 0.0F, 0.0F); } - //CraftBukkit end */ + // CraftBukkit end */ this.b.serverConfigurationManager.changeDimension(this, 1); this.cf = -1; diff --git a/src/main/java/net/minecraft/server/EntitySnowball.java b/src/main/java/net/minecraft/server/EntitySnowball.java index 6c216782..5090077b 100644 --- a/src/main/java/net/minecraft/server/EntitySnowball.java +++ b/src/main/java/net/minecraft/server/EntitySnowball.java @@ -24,7 +24,7 @@ public class EntitySnowball extends EntityProjectile { protected void a(MovingObjectPosition movingobjectposition) { if (movingobjectposition.entity != null) { - int b0 = 0; //Craftbukkit - byte -> int + int b0 = 0; // CraftBukkit - byte -> int if (movingobjectposition.entity instanceof EntityBlaze) { b0 = 3; diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java index 879501ba..037906d0 100644 --- a/src/main/java/net/minecraft/server/EntityWolf.java +++ b/src/main/java/net/minecraft/server/EntityWolf.java @@ -388,7 +388,7 @@ public class EntityWolf extends EntityAnimal { if (itemfood.p() && this.datawatcher.getInt(18) < 20) { --itemstack.count; - this.d(itemfood.n(), RegainReason.EATING); // Craftbukkit + this.d(itemfood.n(), RegainReason.EATING); // CraftBukkit if (itemstack.count <= 0) { entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null); } diff --git a/src/main/java/net/minecraft/server/ItemDoor.java b/src/main/java/net/minecraft/server/ItemDoor.java index 7c1aba2d..616a1cb0 100644 --- a/src/main/java/net/minecraft/server/ItemDoor.java +++ b/src/main/java/net/minecraft/server/ItemDoor.java @@ -104,7 +104,7 @@ public class ItemDoor extends Item { return false; } } - //CraftBukkit end + // CraftBukkit end world.setTypeIdAndData(i, j + 1, k, block.id, l + 8); world.suppressPhysics = false; world.applyPhysics(i, j, k, block.id); diff --git a/src/main/java/net/minecraft/server/ItemDye.java b/src/main/java/net/minecraft/server/ItemDye.java index aa4c8daa..3085cc2b 100644 --- a/src/main/java/net/minecraft/server/ItemDye.java +++ b/src/main/java/net/minecraft/server/ItemDye.java @@ -1,6 +1,6 @@ package net.minecraft.server; -import org.bukkit.entity.Player; // Craftbukkit +import org.bukkit.entity.Player; // CraftBukkit public class ItemDye extends Item { @@ -28,23 +28,23 @@ public class ItemDye extends Item { if (i1 == Block.SAPLING.id) { if (!world.isStatic) { - // Craftbukkit start + // CraftBukkit start Player player = (entityhuman instanceof EntityPlayer) ? (Player)entityhuman.getBukkitEntity() : null; ((BlockSapling) Block.SAPLING).b(world, i, j, k, world.random, true, player, itemstack); //--itemstack.count; - called later if the bonemeal attempt was succesful - // Craftbukkit end + // CraftBukkit end } return true; } if (i1 == Block.BROWN_MUSHROOM.id || i1 == Block.RED_MUSHROOM.id) { - // Craftbukkit start + // CraftBukkit start if (!world.isStatic) { Player player = (entityhuman instanceof EntityPlayer) ? (Player)entityhuman.getBukkitEntity() : null; ((BlockMushroom) Block.byId[i1]).b(world, i, j, k, world.random, true, player, itemstack); //--itemstack.count; - called later if the bonemeal attempt was succesful - // Craftbukkit end + // CraftBukkit end } return true; diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 1cafc0d5..c2166c0d 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -190,7 +190,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe this.propertyManager.properties.remove("spawn-protection"); this.propertyManager.savePropertiesFile(); } - // CratBukkit end + // CraftBukkit end return true; } @@ -700,7 +700,7 @@ public class MinecraftServer implements Runnable, ICommandListener, IMinecraftSe public String d(String s) { RemoteControlCommandListener.a.a(); - // CraftBukkt start + // CraftBukkit start ServerCommandEvent event = new ServerCommandEvent(Event.Type.REMOTE_COMMAND, this.remoteConsole, s); this.server.getPluginManager().callEvent(event); ServerCommand servercommand = new ServerCommand(event.getCommand(), RemoteControlCommandListener.a); diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 16ec9ee6..396d68cb 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -634,7 +634,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener { this.player.activeContainer.a(); this.player.h = false; - // CraftBukkit | TODO CHECK IF NEEDED -- new if structure might not need 'always'. Kept it in for now, but may be able to remove in future + // CraftBukkit - TODO CHECK IF NEEDED -- new if structure might not need 'always'. Kept it in for now, but may be able to remove in future if (!ItemStack.equals(this.player.inventory.getItemInHand(), packet15place.itemstack) || always) { this.sendPacket(new Packet103SetSlot(this.player.activeContainer.windowId, slot.c, this.player.inventory.getItemInHand())); } diff --git a/src/main/java/net/minecraft/server/ServerConfigurationManager.java b/src/main/java/net/minecraft/server/ServerConfigurationManager.java index 9c29487c..ef1dff1e 100644 --- a/src/main/java/net/minecraft/server/ServerConfigurationManager.java +++ b/src/main/java/net/minecraft/server/ServerConfigurationManager.java @@ -42,7 +42,7 @@ public class ServerConfigurationManager { private File l; private File m; public PlayerFileData playerFileData; // CraftBukkit - private - >public - public boolean hasWhitelist; // Craftbukkit - private -> public + public boolean hasWhitelist; // CraftBukkit - private -> public private int p = 0; // CraftBukkit start @@ -511,24 +511,24 @@ public class ServerConfigurationManager { this.operators.add(s.toLowerCase()); this.q(); - // Craftbukkit start + // CraftBukkit start Player player = server.server.getPlayer(s); if (player != null) { player.recalculatePermissions(); } - // Craftbukkit end + // CraftBukkit end } public void removeOp(String s) { this.operators.remove(s.toLowerCase()); this.q(); - // Craftbukkit start + // CraftBukkit start Player player = server.server.getPlayer(s); if (player != null) { player.recalculatePermissions(); } - // Craftbukkit end + // CraftBukkit end } private void p() { @@ -705,7 +705,7 @@ public class ServerConfigurationManager { public void updateClient(EntityPlayer entityplayer) { entityplayer.updateInventory(entityplayer.defaultContainer); entityplayer.s_(); - entityplayer.cf = -1; // CraftBukkit added + entityplayer.cf = -1; // CraftBukkit } public int getPlayerCount() { diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java index c32783cf..21b43691 100644 --- a/src/main/java/net/minecraft/server/SpawnerCreature.java +++ b/src/main/java/net/minecraft/server/SpawnerCreature.java @@ -15,7 +15,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; public final class SpawnerCreature { - // private static HashMap b = new HashMap(); // CraftBukkit -- moved local to spawnEntities + // private static HashMap b = new HashMap(); // CraftBukkit - moved local to spawnEntities static private class ChunkEntry extends EntryBase { public boolean spawn; public ChunkEntry (int x, int z, boolean spawn) { diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java index 59531c16..952113a4 100644 --- a/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java @@ -1086,8 +1086,8 @@ public class World implements IBlockAccess { } public void tickEntities() { - // MethodProfiler.a("entities"); // CraftBukkit -- not in production code - // MethodProfiler.a("global"); // CraftBukkit -- not in production code + // MethodProfiler.a("entities"); // CraftBukkit - not in production code + // MethodProfiler.a("global"); // CraftBukkit - not in production code int i; Entity entity; @@ -1105,7 +1105,7 @@ public class World implements IBlockAccess { } } - // MethodProfiler.b("remove"); // CraftBukkit -- not in production code + // MethodProfiler.b("remove"); // CraftBukkit - not in production code this.entityList.removeAll(this.J); int j; @@ -1125,7 +1125,7 @@ public class World implements IBlockAccess { } this.J.clear(); - // MethodProfiler.b("regular"); // CraftBukkit -- not in production code + // MethodProfiler.b("regular"); // CraftBukkit - not in production code for (i = 0; i < this.entityList.size(); ++i) { entity = (Entity) this.entityList.get(i); @@ -1142,7 +1142,7 @@ public class World implements IBlockAccess { this.playerJoinedWorld(entity); } - // MethodProfiler.a("remove"); // CraftBukkit -- not in production code + // MethodProfiler.a("remove"); // CraftBukkit - not in production code if (entity.dead) { j = entity.bX; k = entity.bZ; @@ -1154,10 +1154,10 @@ public class World implements IBlockAccess { this.d(entity); } - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code } - // MethodProfiler.b("tileEntities"); // CraftBukkit -- not in production code + // MethodProfiler.b("tileEntities"); // CraftBukkit - not in production code this.S = true; Iterator iterator = this.h.iterator(); @@ -1186,7 +1186,7 @@ public class World implements IBlockAccess { this.N.clear(); } - // MethodProfiler.b("pendingTileEntities"); // CraftBukkit -- not in production code + // MethodProfiler.b("pendingTileEntities"); // CraftBukkit - not in production code if (!this.M.isEmpty()) { Iterator iterator1 = this.M.iterator(); @@ -1219,8 +1219,8 @@ public class World implements IBlockAccess { this.M.clear(); } - // MethodProfiler.a(); // CraftBukkit -- not in production code - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code } public void a(Collection collection) { @@ -1254,7 +1254,7 @@ public class World implements IBlockAccess { } } - // MethodProfiler.a("chunkCheck"); // CraftBukkit -- not in production code + // MethodProfiler.a("chunkCheck"); // CraftBukkit - not in production code if (Double.isNaN(entity.locX) || Double.isInfinite(entity.locX)) { entity.locX = entity.bI; } @@ -1292,7 +1292,7 @@ public class World implements IBlockAccess { } } - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code if (flag && entity.bW && entity.passenger != null) { if (!entity.passenger.dead && entity.passenger.vehicle == entity) { this.playerJoinedWorld(entity.passenger); @@ -1715,13 +1715,13 @@ public class World implements IBlockAccess { } } - // MethodProfiler.a("mobSpawner"); // CraftBukkit -- not in production code + // MethodProfiler.a("mobSpawner"); // CraftBukkit - not in production code // CraftBukkit start - Only call spawner if we have players online and the world allows for mobs or animals if ((this.allowMonsters || this.allowAnimals) && (this instanceof WorldServer && this.getServer().getHandle().players.size() > 0)) { SpawnerCreature.spawnEntities(this, this.allowMonsters, this.allowAnimals && this.worldData.f() % 400L == 0L); } // CraftBukkit end - // MethodProfiler.b("chunkSource"); // CraftBukkit -- not in production code + // MethodProfiler.b("chunkSource"); // CraftBukkit - not in production code this.chunkProvider.unloadChunks(); int j = this.a(1.0F); @@ -1731,16 +1731,16 @@ public class World implements IBlockAccess { i = this.worldData.f() + 1L; if (i % (long) this.u == 0L) { - // MethodProfiler.b("save"); // CraftBukkit -- not in production code + // MethodProfiler.b("save"); // CraftBukkit - not in production code this.save(false, (IProgressUpdate) null); } this.worldData.a(i); - // MethodProfiler.b("tickPending"); // CraftBukkit -- not in production code + // MethodProfiler.b("tickPending"); // CraftBukkit - not in production code this.a(false); - // MethodProfiler.b("tickTiles"); // CraftBukkit -- not in production code + // MethodProfiler.b("tickTiles"); // CraftBukkit - not in production code this.k(); - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code } private void z() { @@ -1858,8 +1858,8 @@ public class World implements IBlockAccess { } protected void k() { - // this.T.clear(); // CraftBukkit -- removed - // MethodProfiler.a("buildList"); // CraftBukkit -- not in production code + // this.T.clear(); // CraftBukkit - removed + // MethodProfiler.a("buildList"); // CraftBukkit - not in production code int i; int j; @@ -1884,8 +1884,8 @@ public class World implements IBlockAccess { i = 0; int j1 = 0; - // MethodProfiler.a(); // CraftBukkit -- not in production code - // Iterator iterator = this.T.iterator(); CraftBukkit == removed + // MethodProfiler.a(); // CraftBukkit - not in production code + // Iterator iterator = this.T.iterator(); // CraftBukkit - removed // CraftBukkit start for (long chunkCoord : this.T.popAll()) { @@ -1895,13 +1895,13 @@ public class World implements IBlockAccess { int k1 = chunkX * 16; j = chunkZ * 16; - // MethodProfiler.a("getChunk"); // CraftBukkit -- not in production code + // MethodProfiler.a("getChunk"); // CraftBukkit - not in production code Chunk chunk = this.getChunkAt(chunkX, chunkZ); // CraftBukkit end - // MethodProfiler.b("tickChunk"); // CraftBukkit -- not in production code + // MethodProfiler.b("tickChunk"); // CraftBukkit - not in production code chunk.i(); - // MethodProfiler.b("moodSound"); // CraftBukkit -- not in production code + // MethodProfiler.b("moodSound"); // CraftBukkit - not in production code int l1; int i2; int j2; @@ -1927,7 +1927,7 @@ public class World implements IBlockAccess { } } - // MethodProfiler.b("thunder"); // CraftBukkit -- not in production code + // MethodProfiler.b("thunder"); // CraftBukkit - not in production code if (this.random.nextInt(100000) == 0 && this.w() && this.v()) { this.l = this.l * 3 + 1013904223; l1 = this.l >> 2; @@ -1940,7 +1940,7 @@ public class World implements IBlockAccess { } } - // MethodProfiler.b("iceandsnow"); // CraftBukkit -- not in production code + // MethodProfiler.b("iceandsnow"); // CraftBukkit - not in production code this.l = this.l * 3 + 1013904223; l1 = this.l >> 2; i2 = l1 & 15; @@ -1972,9 +1972,9 @@ public class World implements IBlockAccess { // CraftBukkit end } - // MethodProfiler.b("checkLight"); // CraftBukkit -- not in production code + // MethodProfiler.b("checkLight"); // CraftBukkit - not in production code this.s(k1 + this.random.nextInt(16), this.random.nextInt(this.height), j + this.random.nextInt(16)); - // MethodProfiler.b("tickTiles"); // CraftBukkit -- not in production code + // MethodProfiler.b("tickTiles"); // CraftBukkit - not in production code for (l1 = 0; l1 < 20; ++l1) { this.l = this.l * 3 + 1013904223; @@ -1991,7 +1991,7 @@ public class World implements IBlockAccess { } } - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code } } @@ -2467,7 +2467,7 @@ public class World implements IBlockAccess { } public PathEntity findPath(Entity entity, Entity entity1, float f) { - // MethodProfiler.a("pathfind"); // CraftBukkit -- not in production code + // MethodProfiler.a("pathfind"); // CraftBukkit - not in production code int i = MathHelper.floor(entity.locX); int j = MathHelper.floor(entity.locY); int k = MathHelper.floor(entity.locZ); @@ -2481,12 +2481,12 @@ public class World implements IBlockAccess { ChunkCache chunkcache = new ChunkCache(this, i1, j1, k1, l1, i2, j2); PathEntity pathentity = (new Pathfinder(chunkcache)).a(entity, entity1, f); - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code return pathentity; } public PathEntity a(Entity entity, int i, int j, int k, float f) { - // MethodProfiler.a("pathfind"); // CraftBukkit -- not in production code + // MethodProfiler.a("pathfind"); // CraftBukkit - not in production code int l = MathHelper.floor(entity.locX); int i1 = MathHelper.floor(entity.locY); int j1 = MathHelper.floor(entity.locZ); @@ -2500,7 +2500,7 @@ public class World implements IBlockAccess { ChunkCache chunkcache = new ChunkCache(this, l1, i2, j2, k2, l2, i3); PathEntity pathentity = (new Pathfinder(chunkcache)).a(entity, i, j, k, f); - // MethodProfiler.a(); // CraftBukkit -- not in production code + // MethodProfiler.a(); // CraftBukkit - not in production code return pathentity; } diff --git a/src/main/java/net/minecraft/server/WorldGenBigTree.java b/src/main/java/net/minecraft/server/WorldGenBigTree.java index 595ac739..123cfa76 100644 --- a/src/main/java/net/minecraft/server/WorldGenBigTree.java +++ b/src/main/java/net/minecraft/server/WorldGenBigTree.java @@ -8,17 +8,17 @@ import org.bukkit.Bukkit; import org.bukkit.block.BlockState; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.event.world.StructureGrowEvent; -// Craftbukkit end +// CraftBukkit end public class WorldGenBigTree extends WorldGenerator { static final byte[] a = new byte[] { (byte) 2, (byte) 0, (byte) 0, (byte) 1, (byte) 2, (byte) 1}; Random b = new Random(); - // Craftbukkit start + // CraftBukkit start BlockChangeDelegate c; StructureGrowEvent event; CraftWorld bukkitWorld; - // Craftbukkit end + // CraftBukkit end int[] d = new int[] { 0, 0, 0}; int e = 0; int f; @@ -131,7 +131,7 @@ public class WorldGenBigTree extends WorldGenerator { if (l1 != 0 && l1 != 18) { ++k1; } else { - // Craftbukkit start + // CraftBukkit start if (event == null) { this.a(this.c, aint1[0], aint1[1], aint1[2], l, 0); } else { @@ -139,7 +139,7 @@ public class WorldGenBigTree extends WorldGenerator { state.setTypeId(l); event.getBlocks().add(state); } - // Craftbukkit end + // CraftBukkit end ++k1; } } @@ -215,7 +215,7 @@ public class WorldGenBigTree extends WorldGenerator { aint3[b1] = MathHelper.floor((double) (aint[b1] + j) + 0.5D); aint3[b2] = MathHelper.floor((double) aint[b2] + (double) j * d0 + 0.5D); aint3[b3] = MathHelper.floor((double) aint[b3] + (double) j * d1 + 0.5D); - // Craftbukkit start + // CraftBukkit start if (event == null) { this.a(this.c, aint3[0], aint3[1], aint3[2], i, 0); } else { @@ -223,7 +223,7 @@ public class WorldGenBigTree extends WorldGenerator { state.setTypeId(i); event.getBlocks().add(state); } - // Craftbukkit end + // CraftBukkit end } } } @@ -393,7 +393,7 @@ public class WorldGenBigTree extends WorldGenerator { this.b(); this.c(); this.d(); - // Craftbukkit start + // CraftBukkit start if (event != null) { Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { @@ -403,7 +403,7 @@ public class WorldGenBigTree extends WorldGenerator { } } } - // Craftbukkit end + // CraftBukkit end return true; } } diff --git a/src/main/java/net/minecraft/server/WorldGenForest.java b/src/main/java/net/minecraft/server/WorldGenForest.java index 3d0ce870..9b8cc77d 100644 --- a/src/main/java/net/minecraft/server/WorldGenForest.java +++ b/src/main/java/net/minecraft/server/WorldGenForest.java @@ -67,7 +67,7 @@ public class WorldGenForest extends WorldGenerator { } else { i1 = world.getTypeId(i, j - 1, k); if ((i1 == Block.GRASS.id || i1 == Block.DIRT.id) && j < world.getHeight() - l - 1) { // CraftBukkit - // Craftbukkit start + // CraftBukkit start if (event == null) { world.setRawTypeId(i, j - 1, k, Block.DIRT.id); } else { @@ -75,7 +75,7 @@ public class WorldGenForest extends WorldGenerator { dirtState.setTypeId(Block.DIRT.id); event.getBlocks().add(dirtState); } - // Craftbukkit end + // CraftBukkit end int i2; for (i2 = j - 3 + l; i2 <= j + l; ++i2) { @@ -89,7 +89,7 @@ public class WorldGenForest extends WorldGenerator { int l2 = k2 - k; if ((Math.abs(j2) != k1 || Math.abs(l2) != k1 || random.nextInt(2) != 0 && j1 != 0) && !Block.o[world.getTypeId(l1, i2, k2)]) { - // Craftbukkit start + // CraftBukkit start if (event == null) { this.a(world, l1, i2, k2, Block.LEAVES.id, 2); } else { @@ -98,7 +98,7 @@ public class WorldGenForest extends WorldGenerator { leavesState.setData(new MaterialData(Block.LEAVES.id, (byte) 2)); event.getBlocks().add(leavesState); } - // Craftbukkit end + // CraftBukkit end } } } @@ -107,7 +107,7 @@ public class WorldGenForest extends WorldGenerator { for (i2 = 0; i2 < l; ++i2) { j1 = world.getTypeId(i, j + i2, k); if (j1 == 0 || j1 == Block.LEAVES.id) { - // Craftbukkit start + // CraftBukkit start if (event == null) { this.a(world, i, j + i2, k, Block.LOG.id, 2); } else { @@ -116,10 +116,10 @@ public class WorldGenForest extends WorldGenerator { logState.setData(new MaterialData(Block.LOG.id, (byte) 2)); event.getBlocks().add(logState); } - // Craftbukkit end + // CraftBukkit end } } - // Craftbukkit start + // CraftBukkit start if (event != null) { Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { @@ -128,7 +128,7 @@ public class WorldGenForest extends WorldGenerator { } } } - // Craftbukkit end + // CraftBukkit end return true; } else { return false; diff --git a/src/main/java/net/minecraft/server/WorldGenHugeMushroom.java b/src/main/java/net/minecraft/server/WorldGenHugeMushroom.java index 95ab4979..ba18d554 100644 --- a/src/main/java/net/minecraft/server/WorldGenHugeMushroom.java +++ b/src/main/java/net/minecraft/server/WorldGenHugeMushroom.java @@ -1,13 +1,13 @@ package net.minecraft.server; import java.util.Random; -// Craftbukkit start +// CraftBukkit start import org.bukkit.Bukkit; import org.bukkit.block.BlockState; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.event.world.StructureGrowEvent; import org.bukkit.material.MaterialData; -// Craftbukkit end +// CraftBukkit end public class WorldGenHugeMushroom extends WorldGenerator { @@ -71,7 +71,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { } else if (!Block.BROWN_MUSHROOM.canPlace(world, i, j, k)) { return false; } else { - // Craftbukkit start + // CraftBukkit start if (event == null) { world.setRawTypeId(i, j - 1, k, Block.DIRT.id); } else { @@ -79,7 +79,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { dirtState.setTypeId(Block.DIRT.id); event.getBlocks().add(dirtState); } - // Craftbukkit end + // CraftBukkit end int j2 = j + i1; if (l == 1) { @@ -159,7 +159,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { } if ((l2 != 0 || j >= j + i1 - 1) && !Block.o[world.getTypeId(i2, k1, k2)]) { - // Craftbukkit start + // CraftBukkit start if (event == null) { world.setRawTypeIdAndData(i2, k1, k2, Block.BIG_MUSHROOM_1.id + l, l2); } else { @@ -168,7 +168,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { state.setData(new MaterialData(Block.BIG_MUSHROOM_1.id + l, (byte) l2)); event.getBlocks().add(state); } - // Craftbukkit end + // CraftBukkit end } } } @@ -177,7 +177,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { for (k1 = 0; k1 < i1; ++k1) { l1 = world.getTypeId(i, j + k1, k); if (!Block.o[l1]) { - // Craftbukkit start + // CraftBukkit start if (event == null) { world.setRawTypeIdAndData(i, j + k1, k, Block.BIG_MUSHROOM_1.id + l, 10); } else { @@ -186,10 +186,10 @@ public class WorldGenHugeMushroom extends WorldGenerator { state.setData(new MaterialData(Block.BIG_MUSHROOM_1.id + l, (byte) 10)); event.getBlocks().add(state); } - // Craftbukkit end + // CraftBukkit end } } - // Craftbukkit start + // CraftBukkit start if (event != null) { Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { @@ -198,7 +198,7 @@ public class WorldGenHugeMushroom extends WorldGenerator { } } } - // Craftbukkit end + // CraftBukkit end return true; } } diff --git a/src/main/java/net/minecraft/server/WorldGenTaiga2.java b/src/main/java/net/minecraft/server/WorldGenTaiga2.java index 47da3a99..18b8342b 100644 --- a/src/main/java/net/minecraft/server/WorldGenTaiga2.java +++ b/src/main/java/net/minecraft/server/WorldGenTaiga2.java @@ -68,7 +68,7 @@ public class WorldGenTaiga2 extends WorldGenerator { } else { l1 = world.getTypeId(i, j - 1, k); if ((l1 == Block.GRASS.id || l1 == Block.DIRT.id) && j < world.getHeight() - l - 1) { // CraftBukkit - // Craftbukkit start + // CraftBukkit start if (event == null) { world.setRawTypeId(i, j - 1, k, Block.DIRT.id); } else { @@ -76,7 +76,7 @@ public class WorldGenTaiga2 extends WorldGenerator { dirtState.setTypeId(Block.DIRT.id); event.getBlocks().add(dirtState); } - // Craftbukkit end + // CraftBukkit end k2 = random.nextInt(2); i2 = 1; byte b0 = 0; @@ -94,7 +94,7 @@ public class WorldGenTaiga2 extends WorldGenerator { int i4 = l3 - k; if ((Math.abs(k3) != k2 || Math.abs(i4) != k2 || k2 <= 0) && !Block.o[world.getTypeId(i3, j3, l3)]) { - // Craftbukkit start + // CraftBukkit start if (event == null) { this.a(world, i3, j3, l3, Block.LEAVES.id, 1); } else { @@ -103,7 +103,7 @@ public class WorldGenTaiga2 extends WorldGenerator { leavesState.setData(new MaterialData(Block.LEAVES.id, (byte) 1)); event.getBlocks().add(leavesState); } - // Craftbukkit end + // CraftBukkit end } } } @@ -125,7 +125,7 @@ public class WorldGenTaiga2 extends WorldGenerator { for (j3 = 0; j3 < l - j2; ++j3) { i3 = world.getTypeId(i, j + j3, k); if (i3 == 0 || i3 == Block.LEAVES.id) { - // Craftbukkit start + // CraftBukkit start if (event == null) { this.a(world, i, j + j3, k, Block.LOG.id, 1); } else { @@ -134,10 +134,10 @@ public class WorldGenTaiga2 extends WorldGenerator { logState.setData(new MaterialData(Block.LOG.id, (byte) 1)); event.getBlocks().add(logState); } - // Craftbukkit end + // CraftBukkit end } } - // Craftbukkit start + // CraftBukkit start if (event != null) { Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { @@ -146,7 +146,7 @@ public class WorldGenTaiga2 extends WorldGenerator { } } } - // Craftbukkit end + // CraftBukkit end return true; } else { return false; diff --git a/src/main/java/net/minecraft/server/WorldGenTrees.java b/src/main/java/net/minecraft/server/WorldGenTrees.java index 8bcc0652..3aab9137 100644 --- a/src/main/java/net/minecraft/server/WorldGenTrees.java +++ b/src/main/java/net/minecraft/server/WorldGenTrees.java @@ -2,13 +2,13 @@ package net.minecraft.server; import java.util.Random; -// Craftbukkit start +// CraftBukkit start import org.bukkit.BlockChangeDelegate; import org.bukkit.Bukkit; import org.bukkit.block.BlockState; import org.bukkit.craftbukkit.CraftWorld; import org.bukkit.event.world.StructureGrowEvent; -// Craftbukkit end +// CraftBukkit end public class WorldGenTrees extends WorldGenerator { @@ -66,7 +66,7 @@ public class WorldGenTrees extends WorldGenerator { } else { i1 = world.getTypeId(i, j - 1, k); if ((i1 == Block.GRASS.id || i1 == Block.DIRT.id) && j < world.getHeight() - l - 1) { // CraftBukkit - // Craftbukkit start + // CraftBukkit start if (event == null) { world.setRawTypeId(i, j - 1, k, Block.DIRT.id); } else { @@ -74,7 +74,7 @@ public class WorldGenTrees extends WorldGenerator { dirtState.setTypeId(Block.DIRT.id); event.getBlocks().add(dirtState); } - // Craftbukkit end + // CraftBukkit end int i2; @@ -89,7 +89,7 @@ public class WorldGenTrees extends WorldGenerator { int l2 = k2 - k; if ((Math.abs(j2) != k1 || Math.abs(l2) != k1 || random.nextInt(2) != 0 && j1 != 0) && !Block.o[world.getTypeId(l1, i2, k2)]) { - // Craftbukkit start + // CraftBukkit start if (event == null) { this.a(world, l1, i2, k2, Block.LEAVES.id, 0); } else { @@ -97,7 +97,7 @@ public class WorldGenTrees extends WorldGenerator { leavesState.setTypeId(Block.LEAVES.id); event.getBlocks().add(leavesState); } - // Craftbukkit end + // CraftBukkit end } } } @@ -106,7 +106,7 @@ public class WorldGenTrees extends WorldGenerator { for (i2 = 0; i2 < l; ++i2) { j1 = world.getTypeId(i, j + i2, k); if (j1 == 0 || j1 == Block.LEAVES.id) { - // Craftbukkit start + // CraftBukkit start if (event == null) { this.a(world, i, j + i2, k, Block.LOG.id, 0); } else { @@ -114,10 +114,10 @@ public class WorldGenTrees extends WorldGenerator { logState.setTypeId(Block.LOG.id); event.getBlocks().add(logState); } - // Craftbukkit end + // CraftBukkit end } } - // Craftbukkit start + // CraftBukkit start if (event != null) { Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled()) { @@ -126,7 +126,7 @@ public class WorldGenTrees extends WorldGenerator { } } } - // Craftbukkit end + // CraftBukkit end return true; } else { return false; diff --git a/src/main/java/net/minecraft/server/WorldGenerator.java b/src/main/java/net/minecraft/server/WorldGenerator.java index 7ed5f7e8..9e7e4996 100644 --- a/src/main/java/net/minecraft/server/WorldGenerator.java +++ b/src/main/java/net/minecraft/server/WorldGenerator.java @@ -20,10 +20,10 @@ public abstract class WorldGenerator { public void a(double d0, double d1, double d2) {} - // CraftBukkit -- change signature + // CraftBukkit - change signature protected void a(BlockChangeDelegate world, int i, int j, int k, int l, int i1) { if (this.a) { - ((World) world).setTypeIdAndData(i, j, k, l, i1); // CraftBukkit -- force-cast to world to get it working + ((World) world).setTypeIdAndData(i, j, k, l, i1); // CraftBukkit - force-cast to world to get it working } else { world.setRawTypeIdAndData(i, j, k, l, i1); } -- cgit v1.2.3