mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Updated Minecart/vehicle Bukkit implementation.
By: sk89q <the.sk89q@gmail.com>
This commit is contained in:
parent
74629b6c5f
commit
e44031b5c4
2 changed files with 10 additions and 12 deletions
|
@ -48,15 +48,6 @@ public class CraftMinecart extends CraftVehicle implements Minecart {
|
||||||
minecart.u = vel.getZ();
|
minecart.u = vel.getZ();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LivingEntity getPassenger() {
|
|
||||||
// @TODO: Implement
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isEmpty() {
|
|
||||||
return minecart.j == null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDamage(int damage) {
|
public void setDamage(int damage) {
|
||||||
minecart.a = damage;
|
minecart.a = damage;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package org.bukkit.craftbukkit;
|
package org.bukkit.craftbukkit;
|
||||||
|
|
||||||
import net.minecraft.server.Entity;
|
import org.bukkit.Entity;
|
||||||
|
|
||||||
import org.bukkit.Vehicle;
|
import org.bukkit.Vehicle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -10,7 +9,15 @@ import org.bukkit.Vehicle;
|
||||||
* @author sk89q
|
* @author sk89q
|
||||||
*/
|
*/
|
||||||
public abstract class CraftVehicle extends CraftEntity implements Vehicle {
|
public abstract class CraftVehicle extends CraftEntity implements Vehicle {
|
||||||
public CraftVehicle(CraftServer server, Entity entity) {
|
public CraftVehicle(CraftServer server, net.minecraft.server.Entity entity) {
|
||||||
super(server, entity);
|
super(server, entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Entity getPassenger() {
|
||||||
|
return ((CraftWorld)getWorld()).toCraftEntity(getHandle().j);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return getHandle().j == null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue