vary room theme weights — sculk rare, inferno/ice uncommon

This commit is contained in:
Adrien
2026-04-16 15:53:36 +02:00
committed by NotEvil
parent cc8adfe015
commit b47f642532
44 changed files with 117 additions and 222 deletions

View File

@@ -521,16 +521,16 @@ public class HangingCagePiece extends StructurePiece {
// Fallback item IDs for worldgen when DataDrivenItemRegistry is empty (race with reload)
private static final ResourceLocation[] FALLBACK_BINDS = {
new ResourceLocation("tiedup", "ropes"),
new ResourceLocation("tiedup", "chain"),
new ResourceLocation("tiedup", "armbinder")
ResourceLocation.fromNamespaceAndPath("tiedup", "ropes"),
ResourceLocation.fromNamespaceAndPath("tiedup", "chain"),
ResourceLocation.fromNamespaceAndPath("tiedup", "armbinder")
};
private static final ResourceLocation[] FALLBACK_GAGS = {
new ResourceLocation("tiedup", "cloth_gag"),
new ResourceLocation("tiedup", "ball_gag")
ResourceLocation.fromNamespaceAndPath("tiedup", "cloth_gag"),
ResourceLocation.fromNamespaceAndPath("tiedup", "ball_gag")
};
private static final ResourceLocation[] FALLBACK_BLINDFOLDS = {
new ResourceLocation("tiedup", "classic_blindfold")
ResourceLocation.fromNamespaceAndPath("tiedup", "classic_blindfold")
};
private static ItemStack randomItemForRegion(RandomSource random, BodyRegionV2 region, ResourceLocation[] fallbacks) {

View File

@@ -125,7 +125,7 @@ public final class RoomThemeRegistry {
Map.of("default", List.of(new BlockPalette.WeightedEntry(stone, 1.0f)))
);
return new RoomThemeDefinition(
new ResourceLocation("tiedup", "fallback"),
ResourceLocation.fromNamespaceAndPath("tiedup", "fallback"),
1,
single, // wall
single, // floor

View File

@@ -65,7 +65,7 @@ public class RoomThemeReloadListener
if (cleanPath.endsWith(".json")) {
cleanPath = cleanPath.substring(0, cleanPath.length() - 5);
}
ResourceLocation cleanId = new ResourceLocation(fileId.getNamespace(), cleanPath);
ResourceLocation cleanId = ResourceLocation.fromNamespaceAndPath(fileId.getNamespace(), cleanPath);
try (InputStream input = resource.open()) {
RoomThemeDefinition def = RoomThemeParser.parse(input, cleanId);