Complete X.1.0 milestone for Minecraft 1.21.1 and 26.3
Build and smoke / changes (push) Canceled after 0s
Build and smoke / build (push) Canceled after 0s

This commit is contained in:
dnorberg committed 2026-11-18 22:55:03 -05:00
1 parent 6630ed7ab1
commit 10a70e3b6a
39 files changed
+1308 -65

No files matched your search

+7 -6
View File
@@ -1,6 +1,6 @@
# Minecraft 26.3
The current **Minecraft 26.3 release is 26.3.0.15**, for NeoForge 26.3.0.99 and
The current **Minecraft 26.3 release is 26.3.1.0**, for NeoForge 26.3.0.99 and
Java 25. It uses Rivencraft's first-party Age backend, with no Dynamic Dimensions
or Bad Packets dependency. The writing loop, authored/seeded Ages, generation
features, weather/skies/celestials, libraries, crystal portals, live instability,
@@ -13,10 +13,11 @@ views. Install only one fork per instance. Built-in animations and normal travel
remain available without either. Independent settings under book_previews control
each fork's live book and crystal views.
**Known portal-mod failures:** [#118](https://git.paddedcell.org/dnorberg/rivencraft/issues/118)
tracks Reborn section-rebuild crashes and Reborn/Seamless acknowledgement disconnects
during travel. Rejoining recovered the observed Seamless Age-loading disconnect.
This release does not fix those failures. See [integration details](../../docs/SEAMLESS_PORTALS.md).
**Milestone X.1.0 is complete.** This release adds the player-accepted
world-reset acknowledgement and unavailable-section rebuild guards for the
optional portal engines. See [scope and evidence](../../docs/PORTAL_TRANSITION_GUARDS.md).
Native Nether/End fluid and sky defaults and Flat biome materials are covered
in [Native generation](../../docs/NATIVE_FLUIDS.md).
Native Caves/Nether/End Pages, desert vegetation and Number-controlled Static Sky
resolution passed player checks on both supported versions. Native controls select
@@ -29,7 +30,7 @@ The port feature and acceptance review is recorded in
movement is disabled. The final dedicated-server restart/return check passed.
Create/Ponder scenes are not ported to this target. Use matching client/server
builds, keep saves separate from 1.21.1 and back up before updating.
See [release notes](RELEASE_NOTES_26.3.0.15.md).
See [release notes](RELEASE_NOTES_26.3.1.0.md).
This release adds [Accelerated machine ticking](../../docs/ACCELERATED_MACHINES.md),
corrects [Writing Desk displays](../../docs/WRITING_DESK_MODEL.md), restores
+8
View File
@@ -0,0 +1,8 @@
# Rivencraft 26.3.0.16
Intermediate development candidate; accepted changes are included in 1.21.1.1.0 / 26.3.1.0. This candidate was not published.
- Native Nether uses lava for natural noise-terrain fluids, including Cave terrain, and disables Overworld water aquifers.
- Native End removes natural fluid filling and aquifers while retaining the chosen terrain geometry.
- Flat/Void remain flat/empty. Explicit Flooded and authored fluid features retain their own behavior.
- Updated Native-family tooltips. Existing generated chunks are not rewritten; test new Ages.
+9
View File
@@ -0,0 +1,9 @@
# Rivencraft 26.3.0.17
Intermediate development candidate; accepted changes are included in 1.21.1.1.0 / 26.3.1.0. This candidate was not published.
- Native Nether defaults to its Nether sky, and Native End to its End sky, unless an explicit Sky Page chooses another style.
- Written Sky Pages retain priority with authored celestials. Native/Caves keep their previous sky fallback.
- Includes Native Nether natural lava and Native End dry-terrain changes from the prior candidate.
- Flat/Void geometry and explicitly authored Flooded/fluid features retain their behavior.
- Updated tooltips. Existing generated chunks are not rewritten.
+10
View File
@@ -0,0 +1,10 @@
# Rivencraft 26.3.0.18
Intermediate development candidate; accepted changes are included in 1.21.1.1.0 / 26.3.1.0. This candidate was not published.
- Flat End biomes now use End Stone instead of grass/dirt.
- Flat Nether biomes use Nether ground, including Crimson/Warped Nylium, Soul Sand/Soul Soil and Basalt/Blackstone for the corresponding vanilla biomes.
- Supports single-biome plans and local materials in mixed distributions, including tagged End and TerraBlender-region Nether classification.
- Base-column queries match placed materials. Bedrock, air, height, authored features and fluids are preserved.
- Includes the earlier Native Nether lava / Native End dry generation and default sky improvements.
- Existing generated chunks are not rewritten; use fresh Ages for visual checks.
+11
View File
@@ -0,0 +1,11 @@
# Rivencraft 26.3.0.19
Intermediate development candidate; accepted changes are included in 1.21.1.1.0 / 26.3.1.0. This candidate was not published.
- Extends the block-prediction acknowledgement guard to Seamless as well as Reborn during portal-engine world-map reset.
- Preserves normal initialized multiworld acknowledgements and off-thread packet scheduling.
- Filters only unavailable section rebuild jobs before compilation when a supported portal fork is installed. Valid jobs, geometry callbacks and dirty state remain intact.
- Unrelated renderer exceptions are not swallowed. Full runtime/client validation is still required.
- Includes the accepted Native fluids/skies and Flat End/Nether ground updates.
26.3 build passed; 47 isolated guard checks passed. Minecraft runtime types were stubs, with production guard bytecode and both forks' actual acknowledgement redirect bytecode. This is not a complete client/network/GPU pass. Minecraft 1.21.1 is unchanged by this fix.
+20
View File
@@ -0,0 +1,20 @@
# Rivencraft 26.3.1.0
Completes Milestone X.1.0 for Minecraft 26.3 / NeoForge 26.3.0.99 / Java 25.
Uses Rivencraft's first-party Age backend; no Dynamic Dimensions or Bad Packets required. Use matching client/server builds and the JAR for your Minecraft version.
- Native Nether uses lava for natural noise-terrain fluids, including Cave terrain, and disables Overworld water aquifers.
- Native End removes natural fluid filling and aquifers while preserving the chosen terrain geometry.
- Native Nether and Native End default to their corresponding skies when no Sky Page is written. Explicit Sky Pages retain priority, including with authored celestials.
- Flat End biomes use End Stone instead of grass/dirt. Flat Nether biomes use Nether ground, including Crimson/Warped Nylium, Soul Sand/Soul Soil and Basalt/Blackstone for the corresponding vanilla biomes.
- Corrects single-biome Flat generation and local materials across mixed distributions. Tagged End biomes and TerraBlender-region Nether classification are recognized; other recognized Nether biomes use the Netherrack fallback.
- Base-column queries match placed Flat materials. Bedrock, air, height, authored features and explicit Flooded/fluid features retain their behavior.
- Updated Native-family tooltips. Existing generated chunks are not rewritten.
- Extends the transitional block-prediction acknowledgement guard to Seamless and Reborn, preserving ordinary initialized multiworld delivery and off-thread scheduling.
- Filters only unavailable section rebuild jobs before compilation when either supported portal engine is installed. Valid jobs, additional geometry and dirty state are preserved; unrelated renderer exceptions propagate.
Player in-game checks passed. Sequential Native-generation probes passed **219 checks on 1.21.1 / 213 on 26.3**, including actual Flat block placement, mixed distributions, generator codecs, natural-fluid settings and sky precedence. Temporary worlds were removed; no probe stalled.
The transition guards passed **47 isolated checks** using production guard bytecode and both forks' acknowledgement redirect bytecode with stubbed Minecraft runtime types. The player subsequently reported in-game acceptance. This does not claim an independent exhaustive GPU/network matrix or standalone external-fork reproduction. Install only one optional portal fork at a time.
Versioning is now **Minecraft version.1.0**: milestone/release slice 1, iteration 0. Both Minecraft tracks retain separate builds and saves.
+1 -1
View File
@@ -7,7 +7,7 @@ neo_version=26.3.0.99
mod_id=rivencraft
mod_name=Rivencraft
mod_license=LGPL-3.0-or-later
mod_version=26.3.0.15
mod_version=26.3.1.0
jei_version=31.17.0.109
@@ -3,6 +3,8 @@ package net.dnorberg.rivencraft.age;
import com.mojang.serialization.MapCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import java.util.List;
import net.dnorberg.rivencraft.shared.FlatBiomeMaterials;
import net.minecraft.resources.Identifier;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Stream;
@@ -38,16 +40,25 @@ import org.jspecify.annotations.Nullable;
public final class PortFlatChunkGenerator extends ChunkGenerator {
public static final MapCodec<PortFlatChunkGenerator> CODEC = RecordCodecBuilder.mapCodec(instance -> instance.group(
BiomeSource.CODEC.fieldOf("biome_source").forGetter(generator -> generator.biomeSource),
FlatLevelGeneratorSettings.CODEC.fieldOf("settings").forGetter(PortFlatChunkGenerator::settings)
FlatLevelGeneratorSettings.CODEC.fieldOf("settings").forGetter(PortFlatChunkGenerator::settings),
Identifier.CODEC.listOf().optionalFieldOf("nether_biomes", List.of()).forGetter(generator -> generator.netherBiomeIds)
).apply(instance, PortFlatChunkGenerator::new));
private final FlatLevelGeneratorSettings settings;
private final List<Identifier> netherBiomeIds;
private final Set<Identifier> netherBiomes;
private final MemoizedFunction<Holder<Biome>, BiomeGenerationSettings> generationSettingsGetter;
public PortFlatChunkGenerator(BiomeSource biomeSource, FlatLevelGeneratorSettings settings) {
this(biomeSource, settings, List.of());
}
public PortFlatChunkGenerator(BiomeSource biomeSource, FlatLevelGeneratorSettings settings, List<Identifier> netherBiomeIds) {
super(biomeSource, this.generationSettingsGetter = MemoizedFunction.of(
biome -> generationSettings(settings, biome)));
this.settings = settings;
this.netherBiomeIds = List.copyOf(netherBiomeIds);
this.netherBiomes = Set.copyOf(netherBiomeIds);
}
public FlatLevelGeneratorSettings settings() {
@@ -92,6 +103,7 @@ public final class PortFlatChunkGenerator extends ChunkGenerator {
RandomState random, StructureManager structures, BiomeManager biomes,
@Nullable WorldGenRegion carverBiomeRegion, Set<Holder<Biome>> possibleBiomes) {
List<BlockState> layers = settings.getLayers();
var resolver = biomeSource.createUncachedResolver(random);
BlockPos.MutableBlockPos pos = new BlockPos.MutableBlockPos();
Heightmap floor = chunk.getOrCreateHeightmapUnprimed(Heightmap.Types.OCEAN_FLOOR_WG);
Heightmap surface = chunk.getOrCreateHeightmapUnprimed(Heightmap.Types.WORLD_SURFACE_WG);
@@ -100,9 +112,11 @@ public final class PortFlatChunkGenerator extends ChunkGenerator {
if (state == null) continue;
int y = chunk.getMinY() + layer;
for (int x = 0; x < 16; x++) for (int z = 0; z < 16; z++) {
chunk.setBlockState(pos.set(x, y, z), state);
floor.update(x, y, z, state);
surface.update(x, y, z, state);
BlockState actual = layerState(state, chunk.getPos().getMinBlockX() + x, y,
chunk.getPos().getMinBlockZ() + z, resolver);
chunk.setBlockState(pos.set(x, y, z), actual);
floor.update(x, y, z, actual);
surface.update(x, y, z, actual);
}
}
return CompletableFuture.completedFuture(chunk);
@@ -121,11 +135,22 @@ public final class PortFlatChunkGenerator extends ChunkGenerator {
@Override
public NoiseColumn getBaseColumn(int x, int z, LevelHeightAccessor height, RandomState random) {
return new NoiseColumn(height.getMinY(), settings.getLayers().stream().limit(height.getHeight())
.map(state -> state == null ? Blocks.AIR.defaultBlockState() : state)
var layers = settings.getLayers();
var resolver = biomeSource.createUncachedResolver(random);
return new NoiseColumn(height.getMinY(), java.util.stream.IntStream.range(0, Math.min(height.getHeight(), layers.size()))
.mapToObj(i -> layerState(layers.get(i), x, height.getMinY() + i, z, resolver))
.toArray(BlockState[]::new));
}
private BlockState layerState(BlockState state, int x, int y, int z, net.minecraft.world.level.biome.BiomeResolver resolver) {
if (state == null) return Blocks.AIR.defaultBlockState();
if (!FlatBiomeMaterials.isBaseMaterial(state)) return state;
var biome = resolver.getNoiseBiome(net.minecraft.core.QuartPos.fromBlock(x),
net.minecraft.core.QuartPos.fromBlock(y), net.minecraft.core.QuartPos.fromBlock(z));
boolean regionNether = biome.unwrapKey().map(key -> netherBiomes.contains(key.identifier())).orElse(false);
return FlatBiomeMaterials.layer(state, biome, regionNether);
}
@Override public void addDebugScreenInfo(List<String> info, RandomState random,
BlockPos pos, SamplerContext context) { }
@Override public void spawnOriginalMobs(WorldGenRegion level) { }
@@ -2,6 +2,7 @@ package net.dnorberg.rivencraft.age;
import com.mojang.serialization.Codec;
import java.util.List;
import net.dnorberg.rivencraft.shared.NativeBiomeKind;
import java.util.Locale;
import java.util.Random;
import net.dnorberg.rivencraft.Rivencraft;
@@ -30,9 +31,25 @@ public enum PortSkyStyle {
}
public static PortSkyStyle resolve(List<Identifier> pages, long seed, PortRandomPagePolicy policy) {
return pages.stream().map(PortSkyStyle::forPage).filter(java.util.Objects::nonNull)
.findFirst().orElseGet(() -> pages.stream().anyMatch(PortSkyStyle::isCelestial)
? OVERWORLD : random(seed, policy));
var explicit = pages.stream().map(PortSkyStyle::forPage).filter(java.util.Objects::nonNull).findFirst();
if (explicit.isPresent()) return explicit.get();
NativeBiomeKind family = NativeBiomeKind.TERRAIN;
for (var page : pages) {
if (!page.getNamespace().equals(Rivencraft.MOD_ID) || !page.getPath().startsWith("biome/")) continue;
String choice = page.getPath().substring("biome/".length());
if (NativeBiomeKind.isController(choice)) family = NativeBiomeKind.controller(choice);
}
PortSkyStyle nativeSky = forNativeKind(family, null);
if (nativeSky != null) return nativeSky;
return pages.stream().anyMatch(PortSkyStyle::isCelestial) ? OVERWORLD : random(seed, policy);
}
public static PortSkyStyle forNativeKind(NativeBiomeKind kind, PortSkyStyle fallback) {
return switch (kind) {
case NETHER -> NETHER;
case END -> END;
default -> fallback;
};
}
/** Nether-style Ages use their fog clear color as the visible backdrop. */
@@ -1,5 +1,7 @@
package net.dnorberg.rivencraft.age;
import net.dnorberg.rivencraft.shared.NativeBiomeKind;
import java.io.IOException;
import java.nio.file.AtomicMoveNotSupportedException;
import java.nio.file.Files;
@@ -123,7 +125,8 @@ public final class RuntimeAgeBackend {
PortTerrainFeaturePlan terrainFeatures, PortWeatherMode weather,
PortLighting lighting) {
return create(server, id, seed, biomePlan, terrain, rocks, vegetation, dungeons, lakes,
terrainFeatures, weather, lighting, PortSkyStyle.OVERWORLD);
terrainFeatures, weather, lighting, PortSkyStyle.forNativeKind(
biomePlan == null ? NativeBiomeKind.TERRAIN : biomePlan.nativeKind(), PortSkyStyle.OVERWORLD));
}
public static ServerLevel create(MinecraftServer server, Identifier id, long seed,
@@ -539,7 +542,7 @@ public final class RuntimeAgeBackend {
if (server.getLevel(key) != null) throw new IllegalArgumentException("Level already loaded: " + id);
if (biomePlan != null && biomePlan.distribution() == PortBiomePlan.Distribution.NATIVE
&& !biomePlan.biomes().isEmpty() && terrain != PortAgeTerrain.CAVE
&& biomePlan.nativeKind() == net.dnorberg.rivencraft.shared.NativeBiomeKind.TERRAIN)
&& biomePlan.nativeKind() == NativeBiomeKind.TERRAIN)
throw new IllegalArgumentException("Only Native Cave terrain may carry an explicit native biome pool");
// Noise terrains reuse the Overworld biome source unless a
@@ -575,11 +578,15 @@ public final class RuntimeAgeBackend {
settings = new FlatLevelGeneratorSettings(Optional.empty(), biome, List.of());
settings.updateLayers();
}
generator = biomePlan != null && biomePlan.biomes().size() > 1
? new PortFlatChunkGenerator(authoredBiomeSource(server, biomePlan, seed), settings)
var netherBiomes = net.dnorberg.rivencraft.compat.TerraBlenderBiomes.nether(server.registryAccess());
boolean specialGround = net.dnorberg.rivencraft.shared.FlatBiomeMaterials.isEnd(biome)
|| net.dnorberg.rivencraft.shared.FlatBiomeMaterials.isNether(biome,
biome.unwrapKey().map(b -> netherBiomes.contains(b.identifier())).orElse(false));
generator = biomePlan != null && (biomePlan.biomes().size() > 1 || specialGround)
? new PortFlatChunkGenerator(authoredBiomeSource(server, biomePlan, seed), settings, netherBiomes)
: new FlatLevelSource(settings);
} else if ((biomePlan != null && (biomePlan.distribution() != PortBiomePlan.Distribution.NATIVE
|| biomePlan.nativeKind() != net.dnorberg.rivencraft.shared.NativeBiomeKind.TERRAIN))
|| biomePlan.nativeKind() != NativeBiomeKind.TERRAIN))
|| terrain != PortAgeTerrain.STANDARD) {
// A Flat/skyblock Overworld has no noise generator to adapt. Native
// family pages must still work with an independently authored noise terrain.
@@ -595,7 +602,7 @@ public final class RuntimeAgeBackend {
.getOrThrow(Biomes.LUSH_CAVES))
: noise.getBiomeSource();
if (terrain == PortAgeTerrain.CAVE && biomePlan != null
&& biomePlan.nativeKind() == net.dnorberg.rivencraft.shared.NativeBiomeKind.TERRAIN) {
&& biomePlan.nativeKind() == NativeBiomeKind.TERRAIN) {
var biomes = server.registryAccess().lookupOrThrow(Registries.BIOME);
for (Identifier biomeId : biomePlan.biomes()) {
var holder = biomes.get(ResourceKey.create(Registries.BIOME, biomeId))
@@ -605,7 +612,7 @@ public final class RuntimeAgeBackend {
}
}
if (biomePlan != null && (biomePlan.distribution() != PortBiomePlan.Distribution.NATIVE
|| biomePlan.nativeKind() != net.dnorberg.rivencraft.shared.NativeBiomeKind.TERRAIN
|| biomePlan.nativeKind() != NativeBiomeKind.TERRAIN
|| terrain == PortAgeTerrain.CAVE && !biomePlan.biomes().isEmpty())) {
source = authoredBiomeSource(server, biomePlan, seed);
}
@@ -615,10 +622,17 @@ public final class RuntimeAgeBackend {
.getOrThrow(NoiseGeneratorSettings.AMPLIFIED);
case ISLAND -> server.registryAccess().lookupOrThrow(Registries.NOISE_SETTINGS)
.getOrThrow(NoiseGeneratorSettings.FLOATING_ISLANDS);
case CAVE -> dryCaveSettings(server);
case CAVE -> biomePlan != null
&& biomePlan.nativeKind() == NativeBiomeKind.NETHER
? server.registryAccess().lookupOrThrow(Registries.NOISE_SETTINGS)
.getOrThrow(NoiseGeneratorSettings.CAVES)
: dryCaveSettings(server);
case FLAT, VOID -> throw new IllegalStateException("Flat terrain should use FlatLevelSource");
};
generator = new NoiseBasedChunkGenerator(source, PortBiomeMaterialRules.apply(server.registryAccess(), settings.value()));
var nativeKind = biomePlan == null ? NativeBiomeKind.TERRAIN
: biomePlan.nativeKind();
var fluids = nativeFluidSettings(settings.value(), nativeKind);
generator = new NoiseBasedChunkGenerator(source, PortBiomeMaterialRules.apply(server.registryAccess(), fluids));
}
generator = new PortFeatureChunkGenerator(generator, rocks, vegetation, dungeons, lakes, terrainFeatures, seed,
terrain != PortAgeTerrain.CAVE, PortLibraryWriting.get(server).symbols(id));
@@ -654,6 +668,18 @@ public final class RuntimeAgeBackend {
}
}
/** Native family controls natural fluid only; authored Flooded/features run later. */
static NoiseGeneratorSettings nativeFluidSettings(NoiseGeneratorSettings base,
NativeBiomeKind kind) {
if (kind != NativeBiomeKind.NETHER
&& kind != NativeBiomeKind.END) return base;
boolean nether = kind == NativeBiomeKind.NETHER;
return new NoiseGeneratorSettings(base.noiseSettings(), base.defaultBlock(),
(nether ? Blocks.LAVA : Blocks.AIR).defaultBlockState(), base.noiseRouter(),
base.materialRule(), base.spawnTarget(), nether ? base.seaLevel() : base.noiseSettings().minY() - 1,
base.disableMobGeneration(), Optional.empty(), base.useLegacyRandomSource(), base.debugFunctions());
}
private static Holder<NoiseGeneratorSettings> dryCaveSettings(MinecraftServer server) {
NoiseGeneratorSettings caves = server.registryAccess().lookupOrThrow(Registries.NOISE_SETTINGS)
.getOrThrow(NoiseGeneratorSettings.CAVES).value();
@@ -3,14 +3,14 @@ package net.dnorberg.rivencraft.client;
import net.minecraft.client.multiplayer.ClientLevel;
import qouteall.imm_ptl.core.ClientWorldLoader;
/** Reborn's world map is briefly unavailable during vanilla dimension replacement. */
public final class RebornPredictionAcks {
private RebornPredictionAcks() {}
/** The portal engine's world map is briefly unavailable during vanilla dimension replacement. */
public final class ImmersivePredictionAcks {
private ImmersivePredictionAcks() {}
public static boolean handleDuringWorldReset(ClientLevel packetLevel, int sequence) {
if (ClientWorldLoader.getIsInitialized()) return false;
// The old remote worlds have been discarded. Preserve the vanilla ack for
// the packet listener's live world until Reborn rebuilds its multiworld map.
// the packet listener's live world until the portal engine rebuilds its multiworld map.
if (packetLevel != null) packetLevel.handleBlockChangedAck(sequence);
return true;
}
@@ -0,0 +1,20 @@
package net.dnorberg.rivencraft.client;
import net.dnorberg.rivencraft.mixin.ViewAreaSectionAccessor;
import net.minecraft.client.renderer.ViewArea;
import net.minecraft.client.renderer.state.level.LevelRenderState;
/** Extracted section jobs may outlive the view area that originally supplied them. */
public final class ImmersiveSectionRebuilds {
private ImmersiveSectionRebuilds() {}
public static void discardUnavailable(ViewArea viewArea, LevelRenderState state) {
if (viewArea == null || state.sectionUpdateRenderStates.isEmpty()) return;
var sections = (ViewAreaSectionAccessor) viewArea;
// A missing section cannot be compiled in this view. Leave every existing
// section/job untouched, including dirty state and additional renderers.
// Newly allocated sections start dirty and use normal extraction afterward.
state.sectionUpdateRenderStates.removeIf(job ->
sections.rivencraft$getRenderSection(job.sectionNode()) == null);
}
}
@@ -1,6 +1,6 @@
package net.dnorberg.rivencraft.mixin;
import net.dnorberg.rivencraft.client.RebornPredictionAcks;
import net.dnorberg.rivencraft.client.ImmersivePredictionAcks;
import net.dnorberg.rivencraft.compat.ImmersiveBookPreviews;
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.ClientLevel;
@@ -12,15 +12,15 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
/** Keep transitional acks out of Reborn's initialized-world assertion. */
/** Keep transitional acks out of the portal engine's initialized-world assertion. */
@Mixin(value = ClientPacketListener.class, priority = 2000)
public abstract class RebornBlockAckMixin {
public abstract class ImmersiveBlockAckMixin {
@Shadow private ClientLevel level;
@Inject(method = "handleBlockChangedAck", at = @At("HEAD"), cancellable = true)
private void rivencraft$ackDuringWorldReset(ClientboundBlockChangedAckPacket packet, CallbackInfo callback) {
// Off-thread packets must reach vanilla's normal scheduling path first.
if (Minecraft.getInstance().isSameThread() && ImmersiveBookPreviews.reborn()
&& RebornPredictionAcks.handleDuringWorldReset(level, packet.sequence())) callback.cancel();
if (Minecraft.getInstance().isSameThread() && ImmersiveBookPreviews.available()
&& ImmersivePredictionAcks.handleDuringWorldReset(level, packet.sequence())) callback.cancel();
}
}
@@ -0,0 +1,26 @@
package net.dnorberg.rivencraft.mixin;
import net.dnorberg.rivencraft.client.ImmersiveSectionRebuilds;
import net.dnorberg.rivencraft.compat.ImmersiveBookPreviews;
import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.ViewArea;
import net.minecraft.client.renderer.state.level.CameraRenderState;
import net.minecraft.client.renderer.state.level.LevelRenderState;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(value = LevelRenderer.class, priority = 2000)
public abstract class ImmersiveSectionRebuildMixin {
@Shadow private ViewArea viewArea;
@Shadow @Final private LevelRenderState levelRenderState;
@Inject(method = "compileSections", at = @At("HEAD"))
private void rivencraft$discardUnavailableSections(CameraRenderState camera, CallbackInfo callback) {
if (ImmersiveBookPreviews.available())
ImmersiveSectionRebuilds.discardUnavailable(viewArea, levelRenderState);
}
}
@@ -0,0 +1,12 @@
package net.dnorberg.rivencraft.mixin;
import net.minecraft.client.renderer.ViewArea;
import net.minecraft.client.renderer.chunk.SectionRenderDispatcher;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker;
@Mixin(ViewArea.class)
public interface ViewAreaSectionAccessor {
@Invoker("getRenderSection")
SectionRenderDispatcher.RenderSection rivencraft$getRenderSection(long sectionNode);
}
@@ -20,7 +20,9 @@
"StaticSkyRendererMixin",
"ImmersiveGuiRenderingMixin",
"ClientLevelSoundMixin",
"RebornBlockAckMixin"
"ImmersiveBlockAckMixin",
"ViewAreaSectionAccessor",
"ImmersiveSectionRebuildMixin"
],
"injectors": {
"defaultRequire": 1