Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate Turtle#isDigging #11959

Merged
merged 2 commits into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions paper-api/src/main/java/org/bukkit/entity/Turtle.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public interface Turtle extends Animals {
*/
boolean isLayingEgg();

// Paper start
/**
* Get the turtle's home location
*
Expand All @@ -49,14 +48,17 @@ 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
*
* @param hasEgg True if carrying egg
*/
void setHasEgg(boolean hasEgg);
// Paper end
}
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ 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());
Expand All @@ -45,14 +44,8 @@ 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
}
Loading