Fixed compilation issues (+small import cleanup in CraftWorld)
Dieser Commit ist enthalten in:
Ursprung
7fd0125db5
Commit
f78b8c12a6
@ -1,36 +1,12 @@
|
|||||||
package org.bukkit.craftbukkit;
|
package org.bukkit.craftbukkit;
|
||||||
|
|
||||||
import org.bukkit.craftbukkit.block.CraftBlock;
|
import org.bukkit.craftbukkit.block.CraftBlock;
|
||||||
import org.bukkit.craftbukkit.entity.CraftPoweredMinecart;
|
import org.bukkit.craftbukkit.entity.*;
|
||||||
import org.bukkit.craftbukkit.entity.CraftEntity;
|
import org.bukkit.entity.*;
|
||||||
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 java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import net.minecraft.server.EntityMinecart;
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
import net.minecraft.server.*;
|
||||||
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 org.bukkit.entity.Arrow;
|
import org.bukkit.entity.Arrow;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.entity.Boat;
|
import org.bukkit.entity.Boat;
|
||||||
@ -39,9 +15,6 @@ import org.bukkit.entity.ItemDrop;
|
|||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
import org.bukkit.util.Vector;
|
import org.bukkit.util.Vector;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.entity.Minecart;
|
|
||||||
import org.bukkit.entity.PoweredMinecart;
|
|
||||||
import org.bukkit.entity.StorageMinecart;
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
|
||||||
public class CraftWorld implements World {
|
public class CraftWorld implements World {
|
||||||
@ -105,8 +78,7 @@ public class CraftWorld implements World {
|
|||||||
block = new CraftBlock(this, x, y, z, type, data);
|
block = new CraftBlock(this, x, y, z, type, data);
|
||||||
blockCache.put(loc, block);
|
blockCache.put(loc, block);
|
||||||
} else {
|
} else {
|
||||||
block.type = type;
|
block.update();
|
||||||
block.data = data;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return block;
|
return block;
|
||||||
|
@ -22,7 +22,7 @@ public class CraftBlock implements Block {
|
|||||||
protected byte data;
|
protected byte data;
|
||||||
protected byte light;
|
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.world = world;
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
@ -305,4 +305,9 @@ public class CraftBlock implements Block {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void update() {
|
||||||
|
type = world.getHandle().a(x, y, z);
|
||||||
|
data = (byte)world.getHandle().b(x, y, z);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren