diff options
author | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-01-15 21:52:43 +0000 |
---|---|---|
committer | Dinnerbone <dinnerbone@dinnerbone.com> | 2011-01-15 21:53:09 +0000 |
commit | f78b8c12a6c728e77d3567602754645207870818 (patch) | |
tree | 5f473e387d30bff1e5f636f497e5e4e8fe9ad405 /src | |
parent | 7fd0125db5d08eb81da27dc2e9820da2a373e0f9 (diff) | |
download | craftbukkit-f78b8c12a6c728e77d3567602754645207870818.tar craftbukkit-f78b8c12a6c728e77d3567602754645207870818.tar.gz craftbukkit-f78b8c12a6c728e77d3567602754645207870818.tar.lz craftbukkit-f78b8c12a6c728e77d3567602754645207870818.tar.xz craftbukkit-f78b8c12a6c728e77d3567602754645207870818.zip |
Fixed compilation issues (+small import cleanup in CraftWorld)
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 36 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java | 7 |
2 files changed, 10 insertions, 33 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index 67cf4e49..b90930e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -1,36 +1,12 @@ package org.bukkit.craftbukkit; import org.bukkit.craftbukkit.block.CraftBlock; -import org.bukkit.craftbukkit.entity.CraftPoweredMinecart; -import org.bukkit.craftbukkit.entity.CraftEntity; -import org.bukkit.craftbukkit.entity.CraftEgg; -import org.bukkit.craftbukkit.entity.CraftBoat; -import org.bukkit.craftbukkit.entity.CraftLivingEntity; -import org.bukkit.craftbukkit.entity.CraftSnowball; -import org.bukkit.craftbukkit.entity.CraftHumanEntity; -import org.bukkit.craftbukkit.entity.CraftPlayer; -import org.bukkit.craftbukkit.entity.CraftArrow; -import org.bukkit.craftbukkit.entity.CraftMinecart; -import org.bukkit.craftbukkit.entity.CraftStorageMinecart; -import org.bukkit.craftbukkit.entity.CraftItemDrop; +import org.bukkit.craftbukkit.entity.*; +import org.bukkit.entity.*; import java.util.HashMap; import java.util.Map; - -import net.minecraft.server.EntityMinecart; import java.util.Random; - -import net.minecraft.server.EntityBoat; -import net.minecraft.server.EntityEgg; -import net.minecraft.server.EntityItem; -import net.minecraft.server.EntityLiving; -import net.minecraft.server.EntityPlayerMP; -import net.minecraft.server.EntitySnowball; -import net.minecraft.server.EntityArrow; -import net.minecraft.server.EntityPlayer; -import net.minecraft.server.TileEntity; -import net.minecraft.server.WorldGenBigTree; -import net.minecraft.server.WorldServer; -import net.minecraft.server.WorldGenTrees; +import net.minecraft.server.*; import org.bukkit.entity.Arrow; import org.bukkit.block.Block; import org.bukkit.entity.Boat; @@ -39,9 +15,6 @@ import org.bukkit.entity.ItemDrop; import org.bukkit.inventory.ItemStack; import org.bukkit.util.Vector; import org.bukkit.Location; -import org.bukkit.entity.Minecart; -import org.bukkit.entity.PoweredMinecart; -import org.bukkit.entity.StorageMinecart; import org.bukkit.World; public class CraftWorld implements World { @@ -105,8 +78,7 @@ public class CraftWorld implements World { block = new CraftBlock(this, x, y, z, type, data); blockCache.put(loc, block); } else { - block.type = type; - block.data = data; + block.update(); } return block; diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java index 4a60fb83..facc1624 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -22,7 +22,7 @@ public class CraftBlock implements Block { protected byte data; protected byte light; - protected CraftBlock(final CraftWorld world, final int x, final int y, final int z, final int type, final byte data) { + public CraftBlock(final CraftWorld world, final int x, final int y, final int z, final int type, final byte data) { this.world = world; this.x = x; this.y = y; @@ -305,4 +305,9 @@ public class CraftBlock implements Block { return null; } + + public void update() { + type = world.getHandle().a(x, y, z); + data = (byte)world.getHandle().b(x, y, z); + } } |