#1125: Add support for NoteBlock sounds in Skulls

By: Doc <nachito94@msn.com>
This commit is contained in:
CraftBukkit/Spigot
2022-12-23 12:26:06 +11:00
parent 7f7ce313db
commit be664f5cc4
3 changed files with 107 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
--- a/net/minecraft/world/level/block/entity/TileEntitySkull.java
+++ b/net/minecraft/world/level/block/entity/TileEntitySkull.java
@@ -33,7 +33,7 @@
@Nullable
public GameProfile owner;
@Nullable
- private MinecraftKey noteBlockSound;
+ public MinecraftKey noteBlockSound; // PAIL private->public
private int animationTickCount;
private boolean isAnimating;
@@ -148,9 +148,12 @@
gameprofile1 = TileEntitySkull.sessionService.fillProfileProperties(gameprofile1, true);
}
+ // CraftBukkit start - decompile error
+ final GameProfile finalgameprofile1 = gameprofile1;
TileEntitySkull.mainThreadExecutor.execute(() -> {
- TileEntitySkull.profileCache.add(gameprofile1);
- consumer.accept(gameprofile1);
+ TileEntitySkull.profileCache.add(finalgameprofile1);
+ consumer.accept(finalgameprofile1);
+ // CraftBukkit end
});
}, () -> {
TileEntitySkull.mainThreadExecutor.execute(() -> {