Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ org.gradle.parallel=true
org.gradle.configuration-cache=false
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=26.2
minecraft_version=26.3-pre-1
loader_version=0.19.3
loom_version=1.16-SNAPSHOT
loom_version=1.17-SNAPSHOT
fabric_kotlin_version=1.13.12+kotlin.2.4.0
# Mod Properties
mod_version=1.0.0
maven_group=com.steelextractor
archives_base_name=steel-extractor
# Dependencies
fabric_version=0.152.0+26.2
fabric_version=0.159.1+26.3
16 changes: 0 additions & 16 deletions src/main/java/com/steelextractor/mixin/AxeItemAccessor.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.steelextractor.BiomeCacheReset;
import net.minecraft.world.level.biome.BiomeResolver;
import net.minecraft.world.level.biome.Climate;
import net.minecraft.world.level.biome.MultiNoiseBiomeSource;
import net.minecraft.world.level.chunk.ChunkAccess;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -18,7 +17,7 @@ public abstract class ChunkAccessBiomeCacheMixin {
* its R-tree warm-start within the chunk, but not across chunk boundaries.
*/
@Inject(method = "fillBiomesFromNoise", at = @At("HEAD"))
private void resetBiomeCacheForChunk(BiomeResolver biomeResolver, Climate.Sampler sampler, CallbackInfo ci) {
private void resetBiomeCacheForChunk(BiomeResolver biomeResolver, CallbackInfo ci) {
if (biomeResolver instanceof MultiNoiseBiomeSource) {
BiomeCacheReset.markNeeded();
}
Expand Down
4 changes: 1 addition & 3 deletions src/main/java/com/steelextractor/mixin/ChunkStepMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@
public class ChunkStepMixin {

private static final Set<ChunkStatus> IMMEDIATE_HASH_STAGES = Set.of(
ChunkStatus.NOISE,
ChunkStatus.SURFACE,
ChunkStatus.CARVERS
ChunkStatus.TERRAIN
);

@Shadow
Expand Down
4 changes: 1 addition & 3 deletions src/main/kotlin/com/steelextractor/SteelExtractor.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import com.steelextractor.extractors.CustomStatRegistryExtractor
import com.steelextractor.extractors.Commands
import com.steelextractor.extractors.GameEvents
import com.steelextractor.extractors.Weathering
import com.steelextractor.extractors.Strippables
import net.minecraft.resources.ResourceKey
import net.minecraft.server.level.ServerLevel
import net.minecraft.world.level.ChunkPos
Expand Down Expand Up @@ -243,7 +242,6 @@ object SteelExtractor : ModInitializer {
addUnlessDisabled("LEVEL_EVENTS") { LevelEvents() }
addUnlessDisabled("TAGS") { Tags() }
addUnlessDisabled("STRUCTURE_STARTS") { StructureStarts() }
addUnlessDisabled("STRIPPABLES") { Strippables() }
addUnlessDisabled("WEATHERING") { Weathering() }
addUnlessDisabled("CANDLE_CAKES") { CandleCakes() }
addUnlessDisabled("WAXABLES") { Waxables() }
Expand Down Expand Up @@ -432,7 +430,7 @@ object SteelExtractor : ModInitializer {
val runningLightFeatureQueue = cluster.featureQueue.isEmpty() && cluster.lightFeatureQueue.isNotEmpty()
val (queue, status, batchSize) = when {
cluster.carverQueue.isNotEmpty() -> {
Triple(cluster.carverQueue, ChunkStatus.CARVERS, CARVER_CHUNKS_PER_TICK)
Triple(cluster.carverQueue, ChunkStatus.TERRAIN, CARVER_CHUNKS_PER_TICK)
}
cluster.featureQueue.isNotEmpty() -> {
Triple(cluster.featureQueue, ChunkStatus.FEATURES, FEATURE_CHUNKS_PER_TICK)
Expand Down
11 changes: 5 additions & 6 deletions src/main/kotlin/com/steelextractor/extractors/BiomeHashes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,19 @@ class BiomeHashes : SteelExtractor.Extractor {
val noiseRegistry = server.registryAccess().lookupOrThrow(Registries.NOISE)

val randomState = if (chunkGenerator is NoiseBasedChunkGenerator) {
RandomState.create(chunkGenerator.generatorSettings().value(), noiseRegistry, SEED)
RandomState.create(noiseRegistry, SEED, chunkGenerator.generatorSettings().value())
} else {
logger.warn("Chunk generator for $name is not NoiseBasedChunkGenerator, using level's RandomState")
level.chunkSource.randomState()
}

val climateSampler = randomState.sampler()
val biomeResolver = biomeSource.createUncachedResolver(randomState)

val hashesArray = JsonArray()

val sampledPositions = SteelExtractor.sampledChunkPositions()
for (pos in sampledPositions) {
val hash = chunkBiomeHash(climateSampler, biomeSource, pos.x, pos.z, minSectionY, maxSectionY)
val hash = chunkBiomeHash(biomeResolver, pos.x, pos.z, minSectionY, maxSectionY)

val entry = JsonArray()
entry.add(pos.x)
Expand All @@ -103,8 +103,7 @@ class BiomeHashes : SteelExtractor.Extractor {
* tie-breaking, then hashes in deterministic Y,Z,X order with section_y markers.
*/
private fun chunkBiomeHash(
climateSampler: net.minecraft.world.level.biome.Climate.Sampler,
biomeSource: net.minecraft.world.level.biome.BiomeSource,
biomeResolver: net.minecraft.world.level.biome.BiomeResolver,
chunkX: Int,
chunkZ: Int,
minSectionY: Int,
Expand All @@ -122,7 +121,7 @@ class BiomeHashes : SteelExtractor.Extractor {
val quartY = sectionY * 4 + y
val quartZ = chunkZ * 4 + z

val biome = biomeSource.getNoiseBiome(quartX, quartY, quartZ, climateSampler)
val biome = biomeResolver.getNoiseBiome(quartX, quartY, quartZ)
val biomeName = biome.unwrapKey()
.map { it.identifier().toString() }
.orElse("unknown")
Expand Down
1 change: 1 addition & 0 deletions src/main/kotlin/com/steelextractor/extractors/Blocks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,7 @@ class Blocks : SteelExtractor.Extractor {
behaviourJson.addProperty("friction", getPrivateFieldValue<Float>(behaviourProps, "friction"))
behaviourJson.addProperty("speedFactor", getPrivateFieldValue<Float>(behaviourProps, "speedFactor"))
behaviourJson.addProperty("jumpFactor", getPrivateFieldValue<Float>(behaviourProps, "jumpFactor"))
behaviourJson.addProperty("bounceRestitution", getPrivateFieldValue<Float>(behaviourProps, "bounceRestitution"))
behaviourJson.addProperty("dynamicShape", getPrivateFieldValue<Boolean>(behaviourProps, "dynamicShape"))
behaviourJson.addProperty("offsetType", getOffsetType(block).name)
behaviourJson.addProperty("maxHorizontalOffset", getProtectedFloatMethodValue(block, "getMaxHorizontalOffset"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ class MapDecorationTypeRegistryExtractor : SteelExtractor.Extractor {
return extractBuiltInRegistry(BuiltInRegistries.MAP_DECORATION_TYPE) { type: MapDecorationType, json ->
json.addProperty("asset_id", type.assetId().toString())
json.addProperty("show_on_item_frame", type.showOnItemFrame())
json.addProperty("map_color", type.mapColor())
json.addProperty("exploration_map_element", type.explorationMapElement())
json.addProperty("track_count", type.trackCount())
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/main/kotlin/com/steelextractor/extractors/Items.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ import net.minecraft.resources.RegistryOps
import net.minecraft.server.MinecraftServer
import net.minecraft.world.item.BlockItem
import net.minecraft.world.item.Item
import net.minecraft.world.item.SignItem
import net.minecraft.world.item.StandingAndWallBlockItem
import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.SignBlock
import org.slf4j.LoggerFactory
import java.lang.reflect.Field

Expand Down
32 changes: 0 additions & 32 deletions src/main/kotlin/com/steelextractor/extractors/Strippables.kt

This file was deleted.

1 change: 0 additions & 1 deletion src/main/resources/steel-extractor.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"ChunkAccessBiomeCacheMixin",
"ClimateRTreeMixin",
"BiomeSourcePossibleBiomesMixin",
"AxeItemAccessor",
"VegetationPatchFeatureMixin",
"WaterloggedVegetationPatchFeatureMixin",
"TreeFeatureMixin",
Expand Down
Loading