Archive incari-client (client, 26.3, clean)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Sun, 4 Oct 2026 16:04:54 -0400
|
||||
Subject: [PATCH] world: Pass over air in block collision sweeps
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BlockCollisions.java b/src/main/java/net/minecraft/world/level/BlockCollisions.java
|
||||
index ae02e6148e01471b7647a481199ce32faf307296..49ed5ad6c44c159ff73946abbd41f2bbd39d7079 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BlockCollisions.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BlockCollisions.java
|
||||
@@ -89,2 +89,5 @@
|
||||
BlockState blockState = chunk.getBlockState(this.pos);
|
||||
+ // Incari start: air has no collision shape in any context
|
||||
+ if (incari.client.world.Collisions.passOver(blockState)) continue;
|
||||
+ // Incari end
|
||||
if ((!this.onlySuffocatingBlocks || blockState.isSuffocating(chunk, this.pos))
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Wed, 7 Oct 2026 14:38:11 -0400
|
||||
Subject: [PATCH] world: Search for each stronghold ring's biome when a chunk
|
||||
needs it
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
|
||||
index d9f1691065998834ddbbdb06b67c57f20966cf0c..9890d9eec662db285efdea0e8125274781c84abf 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java
|
||||
@@ -118,2 +118,6 @@
|
||||
private CompletableFuture<List<ChunkPos>> generateRingPositions(final Holder<StructureSet> structureSet, final ConcentricRingsStructurePlacement placement) {
|
||||
+ // Incari start: each ring's biome search runs when a chunk needs it, not all at load
|
||||
+ CompletableFuture<List<ChunkPos>> lazy = incari.client.world.StrongholdRings.plan(placement, this.concentricRingsSeed, this.biomeSource, this.randomState, Util.backgroundExecutor().forName("structureRings"));
|
||||
+ if (lazy != null) return lazy;
|
||||
+ // Incari end
|
||||
if (placement.count() == 0) {
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Wed, 7 Oct 2026 14:38:11 -0400
|
||||
Subject: [PATCH] world: Look up natural mob spawn settings once per biome
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 64f7e8ab533442e43a05e7907d6712d28e231ca8..b5d6ffa04ebdab3a6bcace2a70ef9aed8ba2bf64 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -80,3 +80,5 @@
|
||||
chunkGetter.query(ChunkPos.pack(pos), chunk -> {
|
||||
- MobSpawnSettings naturalMobSpawns = level.environmentAttributes().getValue(EnvironmentAttributes.NATURAL_MOB_SPAWNS, pos);
|
||||
+ // Incari start: the settings looked up once per biome
|
||||
+ MobSpawnSettings naturalMobSpawns = incari.client.world.SpawnCosts.naturalMobSpawns(level, pos);
|
||||
+ // Incari end
|
||||
MobSpawnSettings.MobSpawnCost mobSpawnCost = naturalMobSpawns.getMobSpawnCost(entity.getType());
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Wed, 7 Oct 2026 22:32:24 -0400
|
||||
Subject: [PATCH] world: Read and write a chunk's surface without the
|
||||
proto-chunk's per-block overhead
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/material/MaterialSystem.java b/src/main/java/net/minecraft/world/level/levelgen/material/MaterialSystem.java
|
||||
index f3807cc7b5d2313051981683ff13eb147b569af3..5d8e5d71325a04afe02db99fb1ec525705cc2e5f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/material/MaterialSystem.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/material/MaterialSystem.java
|
||||
@@ -100,2 +100,5 @@
|
||||
final int maxY = heightAccessor.getMaxY();
|
||||
+ // Incari start: the column read and written without the proto-chunk's per-block overhead
|
||||
+ final incari.client.world.SurfaceWrites writes = incari.client.world.SurfaceWrites.of(protoChunk);
|
||||
+ // Incari end
|
||||
BlockColumn column = new BlockColumn() {
|
||||
@@ -103,3 +106,5 @@
|
||||
public BlockState getBlock(final int blockY) {
|
||||
- return protoChunk.getBlockState(columnPos.setY(blockY));
|
||||
+ // Incari start: through the writer when there is one
|
||||
+ return writes != null ? writes.get(columnPos.setY(blockY)) : protoChunk.getBlockState(columnPos.setY(blockY));
|
||||
+ // Incari end
|
||||
}
|
||||
@@ -109,3 +114,5 @@
|
||||
if (blockY >= minY && blockY <= maxY) {
|
||||
- protoChunk.setBlockState(columnPos.setY(blockY), state);
|
||||
+ // Incari start: through the writer when there is one
|
||||
+ if (writes != null) writes.set(columnPos.setY(blockY), state); else protoChunk.setBlockState(columnPos.setY(blockY), state);
|
||||
+ // Incari end
|
||||
if (!state.getFluidState().isEmpty()) {
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Wed, 7 Oct 2026 22:32:36 -0400
|
||||
Subject: [PATCH] world: Find a block's biome without the blur's hashing where
|
||||
its cells agree
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/material/MaterialSystem.java b/src/main/java/net/minecraft/world/level/levelgen/material/MaterialSystem.java
|
||||
index 5d8e5d71325a04afe02db99fb1ec525705cc2e5f..eaa5ebc7308ae4a39cc19d99737809f00c65cd84 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/material/MaterialSystem.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/material/MaterialSystem.java
|
||||
@@ -139,5 +139,7 @@
|
||||
);
|
||||
+ // Incari start: a block's biome without the blur's hashing where its cells agree
|
||||
MaterialRuleContext context = new MaterialRuleContext(
|
||||
- this, randomState, narrowedVolume, noiseChunk.cachingSamplers(), biomeManager::getBiome, generationContext, possibleBiomes
|
||||
+ this, randomState, narrowedVolume, noiseChunk.cachingSamplers(), incari.client.world.BiomeCells.forChunk(biomeManager, minBlockX, minY, minBlockZ, maxY), generationContext, possibleBiomes
|
||||
);
|
||||
+ // Incari end
|
||||
RuleEvaluator rule = ruleSource.compile(context);
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: incari-client <335801235+incari-client@users.noreply.github.com>
|
||||
Date: Wed, 7 Oct 2026 22:32:50 -0400
|
||||
Subject: [PATCH] world: Read a level's and a chunk's build height once
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 8558d22ef726392ca784128fbe6135eaf08a9aae..8c4eac77220f01d20598603aea64ec81daaa546a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -124,2 +124,5 @@
|
||||
private final Holder<DimensionType> dimensionTypeRegistration;
|
||||
+ // Incari start: the dimension's height read once
|
||||
+ private final incari.client.world.Heights incariHeights;
|
||||
+ // Incari end
|
||||
protected final WritableLevelData levelData;
|
||||
@@ -145,2 +148,5 @@
|
||||
this.dimensionTypeRegistration = dimensionTypeRegistration;
|
||||
+ // Incari start: the dimension's height read once
|
||||
+ this.incariHeights = incari.client.world.Heights.of(dimensionTypeRegistration);
|
||||
+ // Incari end
|
||||
this.dimension = dimension;
|
||||
@@ -1049,2 +1055,14 @@
|
||||
|
||||
+ // Incari start: the dimension's height read once
|
||||
+ @Override
|
||||
+ public int getMinY() {
|
||||
+ return this.incariHeights.minY();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getHeight() {
|
||||
+ return this.incariHeights.height();
|
||||
+ }
|
||||
+ // Incari end
|
||||
+
|
||||
public Holder<DimensionType> dimensionTypeRegistration() {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
index d25d0044f221ec67cbc825f06a3e1e4efa24ef2e..fedc0d10d9f3030a6c19e4804b4c5cd5673179bc 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
@@ -78,2 +78,5 @@
|
||||
protected final LevelHeightAccessor levelHeightAccessor;
|
||||
+ // Incari start: the level's height read once
|
||||
+ private final incari.client.world.Heights incariHeights;
|
||||
+ // Incari end
|
||||
protected final LevelChunkSection[] sections;
|
||||
@@ -92,2 +95,5 @@
|
||||
this.levelHeightAccessor = levelHeightAccessor;
|
||||
+ // Incari start: the level's height read once
|
||||
+ this.incariHeights = incari.client.world.Heights.of(levelHeightAccessor);
|
||||
+ // Incari end
|
||||
this.sections = new LevelChunkSection[levelHeightAccessor.getSectionsCount()];
|
||||
@@ -398,3 +404,5 @@
|
||||
public int getMinY() {
|
||||
- return this.levelHeightAccessor.getMinY();
|
||||
+ // Incari start: the level's height read once
|
||||
+ return this.incariHeights.minY();
|
||||
+ // Incari end
|
||||
}
|
||||
@@ -403,3 +411,5 @@
|
||||
public int getHeight() {
|
||||
- return this.levelHeightAccessor.getHeight();
|
||||
+ // Incari start: the level's height read once
|
||||
+ return this.incariHeights.height();
|
||||
+ // Incari end
|
||||
}
|
||||
Reference in New Issue
Block a user