geforkt von Mirrors/Paper
Added MaxSpeed methods to minecarts. Added MaxSpeed methods to boats. Added SlowWhenEmpty, FlyingMod, and DerailedMod methods to minecarts.
By: afforess <afforess@gmail.com>
Dieser Commit ist enthalten in:
Ursprung
05035305f4
Commit
c5f9d74807
@ -17,6 +17,16 @@ public class CraftBoat extends CraftVehicle implements Boat {
|
||||
boat = entity;
|
||||
}
|
||||
|
||||
public double getMaxSpeed() {
|
||||
return boat.maxSpeed;
|
||||
}
|
||||
|
||||
public void setMaxSpeed(double speed) {
|
||||
if (speed >= 0D) {
|
||||
boat.maxSpeed = speed;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftBoat";
|
||||
|
@ -3,6 +3,7 @@ package org.bukkit.craftbukkit.entity;
|
||||
import net.minecraft.server.EntityMinecart;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.Minecart;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
/**
|
||||
* A minecart.
|
||||
@ -45,6 +46,44 @@ public class CraftMinecart extends CraftVehicle implements Minecart {
|
||||
return minecart.a;
|
||||
}
|
||||
|
||||
public double getMaxSpeed() {
|
||||
return minecart.maxSpeed;
|
||||
}
|
||||
|
||||
public void setMaxSpeed(double speed) {
|
||||
if (speed >= 0D) {
|
||||
minecart.maxSpeed = speed;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isSlowWhenEmpty() {
|
||||
return minecart.slowWhenEmpty;
|
||||
}
|
||||
|
||||
public void setSlowWhenEmpty(boolean slow) {
|
||||
minecart.slowWhenEmpty = slow;
|
||||
}
|
||||
|
||||
public Vector getFlyingVelocityMod() {
|
||||
return new Vector(minecart.flyingX, minecart.flyingY, minecart.flyingZ);
|
||||
}
|
||||
|
||||
public void setFlyingVelocityMod(Vector flying) {
|
||||
minecart.flyingX = flying.getX();
|
||||
minecart.flyingY = flying.getY();
|
||||
minecart.flyingZ = flying.getZ();
|
||||
}
|
||||
|
||||
public Vector getDerailedVelocityMod() {
|
||||
return new Vector(minecart.derailedX, minecart.derailedY, minecart.derailedZ);
|
||||
}
|
||||
|
||||
public void setDerailedVelocityMod(Vector derailed) {
|
||||
minecart.derailedX = derailed.getX();
|
||||
minecart.derailedY = derailed.getY();
|
||||
minecart.derailedZ = derailed.getZ();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "CraftMinecart";
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren