mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-18 23:23:19 +01:00
Deprecate Turtle#isDigging (#11959)
This commit is contained in:
parent
86c6308faf
commit
2ea6aee343
3 changed files with 8 additions and 12 deletions
paper-api/src/main/java/org/bukkit/entity
paper-server
patches/sources/net/minecraft/world/level/block/entity
src/main/java/org/bukkit/craftbukkit/entity
|
@ -22,7 +22,6 @@ public interface Turtle extends Animals {
|
|||
*/
|
||||
boolean isLayingEgg();
|
||||
|
||||
// Paper start
|
||||
/**
|
||||
* Get the turtle's home location
|
||||
*
|
||||
|
@ -49,8 +48,12 @@ public interface Turtle extends Animals {
|
|||
* Get if turtle is digging to lay eggs
|
||||
*
|
||||
* @return True if digging
|
||||
* @deprecated in favor of {@link #isLayingEgg()}
|
||||
*/
|
||||
boolean isDigging();
|
||||
@Deprecated(since = "1.21.4")
|
||||
default boolean isDigging() {
|
||||
return this.isLayingEgg();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set if turtle is carrying egg
|
||||
|
@ -58,5 +61,4 @@ public interface Turtle extends Animals {
|
|||
* @param hasEgg True if carrying egg
|
||||
*/
|
||||
void setHasEgg(boolean hasEgg);
|
||||
// Paper end
|
||||
}
|
||||
|
|
|
@ -100,10 +100,11 @@
|
|||
} else if (!isBrewable || !itemStack1.is(blockEntity.ingredient)) {
|
||||
blockEntity.brewTime = 0;
|
||||
}
|
||||
@@ -114,6 +_,14 @@
|
||||
@@ -113,7 +_,14 @@
|
||||
setChanged(level, pos, state);
|
||||
} else if (isBrewable && blockEntity.fuel > 0) {
|
||||
blockEntity.fuel--;
|
||||
blockEntity.brewTime = 400;
|
||||
- blockEntity.brewTime = 400;
|
||||
+ // CraftBukkit start
|
||||
+ org.bukkit.event.block.BrewingStartEvent event = new org.bukkit.event.block.BrewingStartEvent(
|
||||
+ org.bukkit.craftbukkit.block.CraftBlock.at(level, pos),
|
||||
|
|
|
@ -29,7 +29,6 @@ public class CraftTurtle extends CraftAnimals implements Turtle {
|
|||
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());
|
||||
|
@ -45,14 +44,8 @@ public class CraftTurtle extends CraftAnimals implements Turtle {
|
|||
return this.getHandle().isGoingHome();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDigging() {
|
||||
return this.getHandle().isLayingEgg();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHasEgg(boolean hasEgg) {
|
||||
this.getHandle().setHasEgg(hasEgg);
|
||||
}
|
||||
// Paper end
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue