Skip to content

Commit eb1feeb

Browse files
committed
Add stronghold loot support for seed map
1 parent 63ab19d commit eb1feeb

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/main/c/cubiomes

src/main/java/dev/xpple/seedmapper/seedmap/MapFeature.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public enum MapFeature {
1919
DESERT_PYRAMID("desert_pyramid", Cubiomes.Desert_Pyramid(), Cubiomes.DIM_OVERWORLD(), Cubiomes.MC_1_3(), "cubiomes_viewer_icons", 19, 20),
2020
JUNGLE_PYRAMID("jungle_pyramid", Cubiomes.Jungle_Pyramid(), Cubiomes.DIM_OVERWORLD(), Cubiomes.MC_1_3(), "cubiomes_viewer_icons", 19, 20),
2121
SWAMP_HUT("swamp_hut", Cubiomes.Swamp_Hut(), Cubiomes.DIM_OVERWORLD(), Cubiomes.MC_1_4(), "cubiomes_viewer_icons", 20, 20),
22-
STRONGHOLD("stronghold", -1, Cubiomes.DIM_OVERWORLD(), Cubiomes.MC_B1_8(), "cubiomes_viewer_icons", 19, 20),
22+
STRONGHOLD("stronghold", Cubiomes.Stronghold(), Cubiomes.DIM_OVERWORLD(), Cubiomes.MC_B1_8(), "cubiomes_viewer_icons", 19, 20),
2323
IGLOO("igloo", Cubiomes.Igloo(), Cubiomes.DIM_OVERWORLD(), Cubiomes.MC_1_9(), "cubiomes_viewer_icons", 20, 20) {
2424
private static final Texture IGLOO_BASEMENT_TEXTURE = new Texture("igloo_basement", "cubiomes_viewer_icons", 20, 20);
2525
@Override

src/main/java/dev/xpple/seedmapper/seedmap/SeedMapScreen.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -972,8 +972,9 @@ private void showLoot(FeatureWidget widget) {
972972
// temporary arena so that everything will be deallocated after the loot is calculated
973973
try (Arena tempArena = Arena.ofConfined()) {
974974
MemorySegment structureVariant = StructureVariant.allocate(tempArena);
975-
Cubiomes.getVariant(structureVariant, structure, this.version, this.seed, pos.getX(), pos.getZ(), biome);
976-
biome = StructureVariant.biome(structureVariant) != -1 ? StructureVariant.biome(structureVariant) : biome;
975+
if (Cubiomes.getVariant(structureVariant, structure, this.version, this.seed, pos.getX(), pos.getZ(), biome) != 0) {
976+
biome = StructureVariant.biome(structureVariant) != -1 ? StructureVariant.biome(structureVariant) : biome;
977+
}
977978
MemorySegment structureSaltConfig = StructureSaltConfig.allocate(tempArena);
978979
if (Cubiomes.getStructureSaltConfig(structure, this.version, biome, structureSaltConfig) == 0) {
979980
return;

0 commit comments

Comments
 (0)