Skip to content

Commit

Permalink
fixed: milk bucket effect curing was triggered before advancement tri…
Browse files Browse the repository at this point in the history
…gger
  • Loading branch information
cech12 committed Nov 4, 2023
1 parent b8eec65 commit 64eee89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) a
## [1.20.2-2.4.0.3] - 2023-11-04
### Fixed
- MobBucketItems with non-bucketable entities were added to creative menu (found in Naturalist mod 4.0)
- milk bucket effect curing was triggered before advancement trigger (see https://github.com/neoforged/NeoForge/pull/170)

## [1.20.2-2.4.0.2] - 2023-10-30
### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,13 @@ private <T extends LivingEntity & Bucketable> InteractionResult pickupEntityWith
@Override
@Nonnull
public ItemStack finishUsingItem(@Nonnull ItemStack itemStack, @Nonnull Level level, @Nonnull LivingEntity player) {
if (!level.isClientSide) {
player.curePotionEffects(new ItemStack(Items.MILK_BUCKET));
}
if (player instanceof ServerPlayer serverPlayer) {
CriteriaTriggers.CONSUME_ITEM.trigger(serverPlayer, new ItemStack(Items.MILK_BUCKET));
serverPlayer.awardStat(Stats.ITEM_USED.get(Items.MILK_BUCKET));
}
if (!level.isClientSide) {
player.curePotionEffects(new ItemStack(Items.MILK_BUCKET));
}
if (BucketLibUtil.notCreative(player)) {
return BucketLibUtil.removeMilk(itemStack);
}
Expand Down

0 comments on commit 64eee89

Please sign in to comment.