Turtle API

== AT ==
public net.minecraft.world.entity.animal.Turtle getHomePos()Lnet/minecraft/core/BlockPos;
public net.minecraft.world.entity.animal.Turtle setHasEgg(Z)V
public net.minecraft.world.entity.animal.Turtle isGoingHome()Z
public net.minecraft.world.entity.animal.Turtle setGoingHome(Z)V
public net.minecraft.world.entity.animal.Turtle isTravelling()Z
public net.minecraft.world.entity.animal.Turtle setTravelling(Z)V
This commit is contained in:
BillyGalbreath
2018-09-29 16:08:23 -05:00
parent a75d433b3e
commit fb18e19bb0
2 changed files with 48 additions and 3 deletions

View File

@@ -28,4 +28,31 @@ public class CraftTurtle extends CraftAnimals implements Turtle {
public boolean isLayingEgg() {
return this.getHandle().isLayingEgg();
}
// Paper start
@Override
public org.bukkit.Location getHome() {
return io.papermc.paper.util.MCUtil.toLocation(this.getHandle().level(), this.getHandle().getHomePos());
}
@Override
public void setHome(org.bukkit.Location location) {
this.getHandle().setHomePos(io.papermc.paper.util.MCUtil.toBlockPosition(location));
}
@Override
public boolean isGoingHome() {
return this.getHandle().isGoingHome();
}
@Override
public boolean isDigging() {
return this.getHandle().isLayingEgg();
}
@Override
public void setHasEgg(boolean hasEgg) {
this.getHandle().setHasEgg(hasEgg);
}
// Paper end
}