Skip to content

Commit

Permalink
fix: updated datagen files
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBv committed Dec 27, 2023
1 parent fe4c7c8 commit f1ca470
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 59 deletions.
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
{
"type": "minecraft:crafting_shapeless",
"ingredients": [
{
"item": "iceandfire:ash"
},
{
"item": "iceandfire:ash"
},
{
"item": "iceandfire:ash"
},
{
"item": "iceandfire:ash"
},
{
"item": "iceandfire:ash"
},
{
"item": "iceandfire:ash"
},
{
"item": "iceandfire:ash"
},
{
"item": "iceandfire:ash"
},
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"B": {
"item": "iceandfire:ash"
}
},
"pattern": [
"BBB",
"BBB",
"BBB"
],
"result": {
"item": "minecraft:charcoal"
}
},
"show_notification": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
"heightmap": "MOTION_BLOCKING"
},
{
"type": "iceandfire:biome_custom"
"type": "minecraft:biome"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
"heightmap": "MOTION_BLOCKING"
},
{
"type": "iceandfire:biome_custom"
"type": "minecraft:biome"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
},
{
"type": "minecraft:heightmap",
"heightmap": "WORLD_SURFACE_WG"
"heightmap": "MOTION_BLOCKING"
},
{
"type": "iceandfire:biome_custom"
"type": "minecraft:biome"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.github.alexthe666.iceandfire.datagen;

import com.github.alexthe666.iceandfire.world.CustomBiomeFilter;
import net.minecraft.core.HolderGetter;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.BootstapContext;
import com.github.alexthe666.iceandfire.world.CustomBiomeFilter;
import net.minecraft.data.worldgen.placement.PlacementUtils;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
Expand Down Expand Up @@ -51,34 +51,38 @@ private static List<PlacementModifier> commonOrePlacement(int pCount, PlacementM
public static void bootstrap(BootstapContext<PlacedFeature> context) {
HolderGetter<ConfiguredFeature<?, ?>> features = context.lookup(Registries.CONFIGURED_FEATURE);

context.register(PLACED_FIRE_DRAGON_ROOST, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.FIRE_DRAGON_ROOST), List.of(BiomeFilter.biome())));
context.register(PLACED_ICE_DRAGON_ROOST, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.ICE_DRAGON_ROOST), List.of(BiomeFilter.biome())));
context.register(PLACED_LIGHTNING_DRAGON_ROOST, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.LIGHTNING_DRAGON_ROOST), List.of(BiomeFilter.biome())));
context.register(PLACED_FIRE_DRAGON_CAVE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.FIRE_DRAGON_CAVE), List.of(CustomBiomeFilter.biome())));
context.register(PLACED_ICE_DRAGON_CAVE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.ICE_DRAGON_CAVE), List.of(CustomBiomeFilter.biome())));
context.register(PLACED_LIGHTNING_DRAGON_CAVE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.LIGHTNING_DRAGON_CAVE), List.of(CustomBiomeFilter.biome())));
context.register(PLACED_CYCLOPS_CAVE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.CYCLOPS_CAVE), List.of(BiomeFilter.biome())));
context.register(PLACED_PIXIE_VILLAGE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.PIXIE_VILLAGE), List.of(BiomeFilter.biome())));
context.register(PLACED_SIREN_ISLAND, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SIREN_ISLAND), List.of(BiomeFilter.biome())));
context.register(PLACED_HYDRA_CAVE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.HYDRA_CAVE), List.of(BiomeFilter.biome())));
context.register(PLACED_MYRMEX_HIVE_DESERT, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.MYRMEX_HIVE_DESERT), List.of(BiomeFilter.biome())));
context.register(PLACED_MYRMEX_HIVE_JUNGLE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.MYRMEX_HIVE_JUNGLE), List.of(BiomeFilter.biome())));
context.register(PLACED_SPAWN_DEATH_WORM, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_DEATH_WORM), List.of(BiomeFilter.biome())));
context.register(PLACED_SPAWN_DRAGON_SKELETON_L, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_DRAGON_SKELETON_L), List.of(BiomeFilter.biome())));
context.register(PLACED_SPAWN_DRAGON_SKELETON_F, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_DRAGON_SKELETON_F), List.of(BiomeFilter.biome())));
context.register(PLACED_SPAWN_DRAGON_SKELETON_I, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_DRAGON_SKELETON_I), List.of(BiomeFilter.biome())));
context.register(PLACED_SPAWN_HIPPOCAMPUS, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_HIPPOCAMPUS), List.of(BiomeFilter.biome())));
context.register(PLACED_SPAWN_SEA_SERPENT, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_SEA_SERPENT), List.of(BiomeFilter.biome())));
context.register(PLACED_SPAWN_STYMPHALIAN_BIRD, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_STYMPHALIAN_BIRD), List.of(BiomeFilter.biome())));
context.register(PLACED_SPAWN_WANDERING_CYCLOPS, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_WANDERING_CYCLOPS), List.of(BiomeFilter.biome())));
// Surface
context.register(PLACED_FIRE_DRAGON_ROOST, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.FIRE_DRAGON_ROOST), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_ICE_DRAGON_ROOST, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.ICE_DRAGON_ROOST), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_LIGHTNING_DRAGON_ROOST, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.LIGHTNING_DRAGON_ROOST), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_CYCLOPS_CAVE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.CYCLOPS_CAVE), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_PIXIE_VILLAGE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.PIXIE_VILLAGE), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_SIREN_ISLAND, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SIREN_ISLAND), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_HYDRA_CAVE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.HYDRA_CAVE), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_MYRMEX_HIVE_DESERT, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.MYRMEX_HIVE_DESERT), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_MYRMEX_HIVE_JUNGLE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.MYRMEX_HIVE_JUNGLE), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_SPAWN_DEATH_WORM, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_DEATH_WORM), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_SPAWN_DRAGON_SKELETON_L, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_DRAGON_SKELETON_L), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_SPAWN_DRAGON_SKELETON_F, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_DRAGON_SKELETON_F), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_SPAWN_DRAGON_SKELETON_I, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_DRAGON_SKELETON_I), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_SPAWN_HIPPOCAMPUS, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_HIPPOCAMPUS), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_SPAWN_SEA_SERPENT, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_SEA_SERPENT), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_SPAWN_STYMPHALIAN_BIRD, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_STYMPHALIAN_BIRD), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
context.register(PLACED_SPAWN_WANDERING_CYCLOPS, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SPAWN_WANDERING_CYCLOPS), List.of(PlacementUtils.HEIGHTMAP_WORLD_SURFACE, BiomeFilter.biome())));
//TODO: Check gen chance VegetationFeatures.java
context.register(PLACED_FIRE_LILY, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.FIRE_LILY), List.of(RarityFilter.onAverageOnceEvery(32), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome())));
context.register(PLACED_FROST_LILY, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.FROST_LILY), List.of(RarityFilter.onAverageOnceEvery(32), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome())));
context.register(PLACED_LIGHTNING_LILY, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.LIGHTNING_LILY), List.of(RarityFilter.onAverageOnceEvery(32), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome())));

// Underground
//TODO: Make it different from copper ore
context.register(PLACED_SILVER_ORE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SILVER_ORE), commonOrePlacement(16, HeightRangePlacement.triangle(VerticalAnchor.absolute(-16), VerticalAnchor.absolute(112)))));
//TODO: Maybe copper emerald ore?
context.register(PLACED_SAPPHIRE_ORE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.SAPPHIRE_ORE), commonOrePlacement(4, HeightRangePlacement.triangle(VerticalAnchor.absolute(-16), VerticalAnchor.absolute(112)))));
//TODO: Check gen chance VegetationFeatures.java
context.register(PLACED_FIRE_LILY, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.FIRE_LILY), List.of(RarityFilter.onAverageOnceEvery(32), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome())));
context.register(PLACED_FROST_LILY, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.FROST_LILY), List.of(RarityFilter.onAverageOnceEvery(32), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome())));
context.register(PLACED_LIGHTNING_LILY, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.LIGHTNING_LILY), List.of(RarityFilter.onAverageOnceEvery(32), InSquarePlacement.spread(), PlacementUtils.HEIGHTMAP, BiomeFilter.biome())));
context.register(PLACED_FIRE_DRAGON_CAVE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.FIRE_DRAGON_CAVE), List.of(CustomBiomeFilter.biome())));
context.register(PLACED_ICE_DRAGON_CAVE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.ICE_DRAGON_CAVE), List.of(CustomBiomeFilter.biome())));
context.register(PLACED_LIGHTNING_DRAGON_CAVE, new PlacedFeature(features.getOrThrow(IafConfiguredFeatures.LIGHTNING_DRAGON_CAVE), List.of(CustomBiomeFilter.biome())));

}

public static ResourceKey<PlacedFeature> registerKey(String name) {
Expand Down

0 comments on commit f1ca470

Please sign in to comment.