Implemented World.spawnBoat(), added CraftMappable interface that defines a method to get an org.bukkit.craftbukkit.CraftEntity from implementing net.minecart.server.Entity entities, changed CraftWorld.toCraftEntity() to use this new interface for boats and minecarts.

This commit is contained in:
sk89q
2011-01-07 14:01:37 -08:00
parent eb2cc2da4a
commit 6d6668aaeb
4 changed files with 44 additions and 13 deletions

View File

@@ -4,15 +4,17 @@ import java.util.List;
import org.bukkit.Location;
import org.bukkit.Vector;
import org.bukkit.craftbukkit.CraftEntity;
import org.bukkit.craftbukkit.CraftMappable;
import org.bukkit.craftbukkit.CraftMinecart;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.event.Event.Type;
import org.bukkit.event.vehicle.*;
public class EntityMinecart extends Entity
implements IInventory {
implements IInventory, CraftMappable {
public CraftMinecart minecart;
private CraftMinecart minecart;
private ItemStack ak[];
public int a;
@@ -99,7 +101,11 @@ public class EntityMinecart extends Entity
private double derailedZ = 0.5;
private double flyingX = 0.94999998807907104;
private double flyingY = 0.94999998807907104;
private double flyingZ = 0.94999998807907104;
private double flyingZ = 0.94999998807907104;
public CraftEntity getCraftEntity() {
return minecart;
}
public EntityMinecart(World world) {
super(world);