mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
compile fixes
This commit is contained in:
parent
c3eb1935c1
commit
0773a7aff5
2 changed files with 17 additions and 18 deletions
|
@ -4279,7 +4279,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ hash = "";
|
||||
+ }
|
||||
+ this.getHandle().connection.send(new ClientboundResourcePackPopPacket(Optional.empty()));
|
||||
+ this.getHandle().connection.send(new ClientboundResourcePackPushPacket(uuid, url, hash, force, io.papermc.paper.adventure.PaperAdventure.asVanilla(prompt)));
|
||||
+ this.getHandle().connection.send(new ClientboundResourcePackPushPacket(uuid, url, hash, force, Optional.ofNullable(prompt).map(io.papermc.paper.adventure.PaperAdventure::asVanilla)));
|
||||
+ }
|
||||
+
|
||||
+ @SuppressWarnings({"unchecked", "rawtypes"})
|
||||
|
@ -4439,9 +4439,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ private void adventure$sendPlayerListHeaderAndFooter() {
|
||||
+ final ServerGamePacketListenerImpl connection = this.getHandle().connection;
|
||||
+ if (connection == null) return;
|
||||
+ final ClientboundTabListPacket packet = new ClientboundTabListPacket(null, null);
|
||||
+ packet.adventure$header = (this.playerListHeader == null) ? net.kyori.adventure.text.Component.empty() : this.playerListHeader;
|
||||
+ packet.adventure$footer = (this.playerListFooter == null) ? net.kyori.adventure.text.Component.empty() : this.playerListFooter;
|
||||
+ final ClientboundTabListPacket packet = new ClientboundTabListPacket(
|
||||
+ io.papermc.paper.adventure.PaperAdventure.asVanilla((this.playerListHeader == null) ? net.kyori.adventure.text.Component.empty() : this.playerListHeader),
|
||||
+ io.papermc.paper.adventure.PaperAdventure.asVanilla((this.playerListFooter == null) ? net.kyori.adventure.text.Component.empty() : this.playerListFooter)
|
||||
+ );
|
||||
+ connection.send(packet);
|
||||
+ }
|
||||
+
|
||||
|
@ -4452,11 +4453,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ if (times != null) {
|
||||
+ connection.send(new ClientboundSetTitlesAnimationPacket(ticks(times.fadeIn()), ticks(times.stay()), ticks(times.fadeOut())));
|
||||
+ }
|
||||
+ final ClientboundSetSubtitleTextPacket sp = new ClientboundSetSubtitleTextPacket((net.minecraft.network.chat.Component) null);
|
||||
+ sp.adventure$text = title.subtitle();
|
||||
+ final ClientboundSetSubtitleTextPacket sp = new ClientboundSetSubtitleTextPacket(io.papermc.paper.adventure.PaperAdventure.asVanilla(title.subtitle()));
|
||||
+ connection.send(sp);
|
||||
+ final ClientboundSetTitleTextPacket tp = new ClientboundSetTitleTextPacket((net.minecraft.network.chat.Component) null);
|
||||
+ tp.adventure$text = title.title();
|
||||
+ final ClientboundSetTitleTextPacket tp = new ClientboundSetTitleTextPacket(io.papermc.paper.adventure.PaperAdventure.asVanilla(title.title()));
|
||||
+ connection.send(tp);
|
||||
+ }
|
||||
+
|
||||
|
@ -4465,12 +4464,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ java.util.Objects.requireNonNull(part, "part");
|
||||
+ java.util.Objects.requireNonNull(value, "value");
|
||||
+ if (part == net.kyori.adventure.title.TitlePart.TITLE) {
|
||||
+ final ClientboundSetTitleTextPacket tp = new ClientboundSetTitleTextPacket((net.minecraft.network.chat.Component) null);
|
||||
+ tp.adventure$text = (net.kyori.adventure.text.Component) value;
|
||||
+ final ClientboundSetTitleTextPacket tp = new ClientboundSetTitleTextPacket(io.papermc.paper.adventure.PaperAdventure.asVanilla((net.kyori.adventure.text.Component)value));
|
||||
+ this.getHandle().connection.send(tp);
|
||||
+ } else if (part == net.kyori.adventure.title.TitlePart.SUBTITLE) {
|
||||
+ final ClientboundSetSubtitleTextPacket sp = new ClientboundSetSubtitleTextPacket((net.minecraft.network.chat.Component) null);
|
||||
+ sp.adventure$text = (net.kyori.adventure.text.Component) value;
|
||||
+ final ClientboundSetSubtitleTextPacket sp = new ClientboundSetSubtitleTextPacket(io.papermc.paper.adventure.PaperAdventure.asVanilla((net.kyori.adventure.text.Component)value));
|
||||
+ this.getHandle().connection.send(sp);
|
||||
+ } else if (part == net.kyori.adventure.title.TitlePart.TIMES) {
|
||||
+ final net.kyori.adventure.title.Title.Times times = (net.kyori.adventure.title.Title.Times) value;
|
||||
|
|
|
@ -50,12 +50,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+ }
|
||||
+
|
||||
+ final java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> future = chunkStatus.generate(
|
||||
+ final java.util.concurrent.CompletableFuture<ChunkAccess> future = chunkStatus.generate(
|
||||
+ new net.minecraft.world.level.chunk.status.WorldGenContext(
|
||||
+ serverLevel,
|
||||
+ serverChunkCache.getGenerator(),
|
||||
+ serverLevel.getStructureManager(),
|
||||
+ serverChunkCache.getLightEngine()
|
||||
+ ),
|
||||
+ Runnable::run,
|
||||
+ serverLevel,
|
||||
+ serverChunkCache.getGenerator(),
|
||||
+ serverLevel.getStructureManager(),
|
||||
+ serverChunkCache.getLightEngine(),
|
||||
+ chunk -> {
|
||||
+ throw new UnsupportedOperationException("Not creating full chunks here");
|
||||
+ },
|
||||
|
@ -63,7 +65,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ );
|
||||
+ serverChunkCache.mainThreadProcessor.managedBlock(future::isDone);
|
||||
+ if (chunkStatus == ChunkStatus.NOISE) {
|
||||
+ future.join().left().ifPresent(chunk -> net.minecraft.world.level.levelgen.Heightmap.primeHeightmaps(chunk, ChunkStatus.POST_FEATURES));
|
||||
+ net.minecraft.world.level.levelgen.Heightmap.primeHeightmaps(future.join(), ChunkStatus.POST_FEATURES);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue