--- a/net/minecraft/world/item/RecordItem.java
+++ b/net/minecraft/world/item/RecordItem.java
@@ -6,6 +6,7 @@
 import javax.annotation.Nullable;
 import net.minecraft.ChatFormatting;
 import net.minecraft.core.BlockPos;
+import net.minecraft.core.Holder;
 import net.minecraft.network.chat.Component;
 import net.minecraft.network.chat.MutableComponent;
 import net.minecraft.sounds.SoundEvent;
@@ -16,11 +17,13 @@
 import net.minecraft.world.level.Level;
 import net.minecraft.world.level.block.Blocks;
 import net.minecraft.world.level.block.JukeboxBlock;
+import net.minecraft.world.level.block.entity.BlockEntity;
 import net.minecraft.world.level.block.entity.JukeboxBlockEntity;
 import net.minecraft.world.level.block.state.BlockState;
 import net.minecraft.world.level.gameevent.GameEvent;
 
 public class RecordItem extends Item {
+
     private static final Map<SoundEvent, RecordItem> BY_NAME = Maps.newHashMap();
     private final int analogOutput;
     private final SoundEvent sound;
@@ -31,30 +34,37 @@
         this.analogOutput = comparatorOutput;
         this.sound = sound;
         this.lengthInTicks = lengthInSeconds * 20;
-        BY_NAME.put(this.sound, this);
+        RecordItem.BY_NAME.put(this.sound, this);
     }
 
     @Override
     public InteractionResult useOn(UseOnContext context) {
-        Level level = context.getLevel();
-        BlockPos blockPos = context.getClickedPos();
-        BlockState blockState = level.getBlockState(blockPos);
-        if (blockState.is(Blocks.JUKEBOX) && !blockState.getValue(JukeboxBlock.HAS_RECORD)) {
-            ItemStack itemStack = context.getItemInHand();
-            if (!level.isClientSide) {
-                Player player = context.getPlayer();
-                if (level.getBlockEntity(blockPos) instanceof JukeboxBlockEntity jukeboxBlockEntity) {
-                    jukeboxBlockEntity.setTheItem(itemStack.copy());
-                    level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, GameEvent.Context.of(player, blockState));
+        Level world = context.getLevel();
+        BlockPos blockposition = context.getClickedPos();
+        BlockState iblockdata = world.getBlockState(blockposition);
+
+        if (iblockdata.is(Blocks.JUKEBOX) && !(Boolean) iblockdata.getValue(JukeboxBlock.HAS_RECORD)) {
+            ItemStack itemstack = context.getItemInHand();
+
+            if (!world.isClientSide) {
+                if (true) return InteractionResult.sidedSuccess(world.isClientSide); // CraftBukkit - handled in ItemStack // Paper - fix duplicate animate packet
+                Player entityhuman = context.getPlayer();
+                BlockEntity tileentity = world.getBlockEntity(blockposition);
+
+                if (tileentity instanceof JukeboxBlockEntity) {
+                    JukeboxBlockEntity tileentityjukebox = (JukeboxBlockEntity) tileentity;
+
+                    tileentityjukebox.setTheItem(itemstack.copy());
+                    world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entityhuman, iblockdata));
                 }
 
-                itemStack.shrink(1);
-                if (player != null) {
-                    player.awardStat(Stats.PLAY_RECORD);
+                itemstack.shrink(1);
+                if (entityhuman != null) {
+                    entityhuman.awardStat(Stats.PLAY_RECORD);
                 }
             }
 
-            return InteractionResult.sidedSuccess(level.isClientSide);
+            return InteractionResult.sidedSuccess(world.isClientSide);
         } else {
             return InteractionResult.PASS;
         }
@@ -75,7 +85,7 @@
 
     @Nullable
     public static RecordItem getBySound(SoundEvent sound) {
-        return BY_NAME.get(sound);
+        return (RecordItem) RecordItem.BY_NAME.get(sound);
     }
 
     public SoundEvent getSound() {
