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

fix #373 #374

Open
wants to merge 2 commits into
base: 1.20.1
Choose a base branch
from
Open
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
19 changes: 16 additions & 3 deletions patches/minecraft/net/minecraft/world/item/RecordItem.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,27 @@
}

public InteractionResult useOn(UseOnContext p_43048_) {
@@ -42,6 +_,7 @@
if (blockstate.is(Blocks.JUKEBOX) && !blockstate.getValue(JukeboxBlock.HAS_RECORD)) {
@@ -43,6 +_,10 @@
ItemStack itemstack = p_43048_.getItemInHand();
if (!level.isClientSide) {
+ if (true) return InteractionResult.SUCCESS; // CraftBukkit - handled in ItemStack
Player player = p_43048_.getPlayer();
+ if (player != null) {
+ player.awardStat(Stats.PLAY_RECORD);
+ }
+ if (true) return InteractionResult.SUCCESS; // CraftBukkit - handled in ItemStack
BlockEntity blockentity = level.getBlockEntity(blockpos);
if (blockentity instanceof JukeboxBlockEntity) {
JukeboxBlockEntity jukeboxblockentity = (JukeboxBlockEntity)blockentity;
@@ -51,9 +_,6 @@
}

itemstack.shrink(1);
- if (player != null) {
- player.awardStat(Stats.PLAY_RECORD);
- }
}

return InteractionResult.sidedSuccess(level.isClientSide);
@@ -80,7 +_,7 @@
}

Expand Down
Loading