geforkt von Mirrors/Paper
Fix compile issue in MinecraftServer
Dieser Commit ist enthalten in:
Ursprung
f25c1a33a0
Commit
afa25753de
@ -1220,7 +1220,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -1980,23 +_,29 @@
|
||||
@@ -1980,16 +_,22 @@
|
||||
}
|
||||
|
||||
public void logChatMessage(Component content, ChatType.Bound boundChatType, @Nullable String header) {
|
||||
@ -1247,14 +1247,6 @@
|
||||
}
|
||||
|
||||
public boolean logIPs() {
|
||||
return true;
|
||||
}
|
||||
|
||||
- public void subscribeToDebugSample(ServerPlayer player, RemoteDebugSampleType sampleType) {
|
||||
+ public void subscribeToDebugSample(ServerPlaye player, RemoteDebugSampleType sampleType) {
|
||||
}
|
||||
|
||||
public boolean acceptsTransfers() {
|
||||
@@ -2122,4 +_,53 @@
|
||||
};
|
||||
}
|
||||
|
@ -21,8 +21,8 @@
|
||||
+ this.onClose(level, blockPos, blockState);
|
||||
+ }
|
||||
+
|
||||
+ public void openerAPICountChanged(Level world, BlockPos blockPos, BlockState blockState, int count, int openCount) {
|
||||
+ this.openerCountChanged(world, blockPos, blockState, count, openCount);
|
||||
+ public void openerAPICountChanged(Level level, BlockPos blockPos, BlockState blockState, int count, int openCount) {
|
||||
+ this.openerCountChanged(level, blockPos, blockState, count, openCount);
|
||||
+ }
|
||||
+ // CraftBukkit en
|
||||
+
|
||||
|
@ -54,15 +54,19 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -147,9 +_,14 @@
|
||||
@@ -145,11 +_,16 @@
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public void setSongItemWithoutPlaying(ItemStack stack) {
|
||||
- public void setSongItemWithoutPlaying(ItemStack stack) {
|
||||
+ public void setSongItemWithoutPlaying(ItemStack stack, final long ticksSinceSongStarted) { // CraftBukkit - passed ticks since song started
|
||||
this.item = stack;
|
||||
- JukeboxSong.fromStack(this.level.registryAccess(), stack)
|
||||
- .ifPresent(holder -> this.jukeboxSongPlayer.setSongWithoutPlaying((Holder<JukeboxSong>)holder, 0L));
|
||||
- this.level.updateNeighborsAt(this.getBlockPos(), this.getBlockState().getBlock());
|
||||
+ this.jukeboxSongPlayer.song = null; // CraftBukkit - reset
|
||||
+ JukeboxSong.fromStack(this.level != null ? this.level.registryAccess() : org.bukkit.craftbukkit.CraftRegistry.getMinecraftRegistry(), stack) // Paper - fallback to other RegistyrAccess if no level
|
||||
.ifPresent(holder -> this.jukeboxSongPlayer.setSongWithoutPlaying((Holder<JukeboxSong>)holder, 0L));
|
||||
- this.level.updateNeighborsAt(this.getBlockPos(), this.getBlockState().getBlock());
|
||||
+ .ifPresent(holder -> this.jukeboxSongPlayer.setSongWithoutPlaying((Holder<JukeboxSong>)holder, ticksSinceSongStarted)); // CraftBukkit - passed ticks since song started
|
||||
+ // CraftBukkit start - add null check for level
|
||||
+ if (this.level != null) {
|
||||
+ this.level.updateNeighborsAt(this.getBlockPos(), this.getBlockState().getBlock());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren