Skip to content

Commit

Permalink
Fix drink milk sound
Browse files Browse the repository at this point in the history
  • Loading branch information
wode490390 committed Oct 1, 2024
1 parent fd76af3 commit 0df2d39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/cn/nukkit/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -3291,7 +3291,7 @@ public void onCompletion(Server server) {
break;
}
Item held = inventory.getItemInHand();
if (!(held instanceof ItemEdible) && !held.is(Item.POTION)) {
if (!(held instanceof ItemEdible) && !held.is(Item.POTION) && !held.is(Item.BUCKET, ItemBucket.MILK_BUCKET)) {
break;
}

Expand Down
1 change: 1 addition & 0 deletions src/main/java/cn/nukkit/item/ItemBucket.java
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ public boolean onUse(Player player, int ticksUsed) {
}

if (!player.isCreative()) {
pop();
player.getInventory().setItemInHand(get(BUCKET));
}

Expand Down

0 comments on commit 0df2d39

Please sign in to comment.