From 767102be1c10aa60e7921a35637eadac4306ce05 Mon Sep 17 00:00:00 2001 From: Maxx <53229958+MBatt1@users.noreply.github.com> Date: Mon, 12 Aug 2024 15:57:08 -0500 Subject: [PATCH] biomes + mixin fixes --- gradle.properties | 2 +- .../natural/ParadiseLostGrassBlock.java | 8 +- .../mixin/block/FarmlandBlockMixin.java | 12 +- .../mixin/entity/BoatEntityMixin.java | 4 +- .../mixin/util/DefaultedRegistryMixin.java | 212 ---- .../world/dimension/ParadiseLostBiomes.java | 1106 +++++++---------- .../world/feature/ParadiseLostFeatures.java | 2 - ...adiseLostVegetationConfiguredFeatures.java | 21 - .../ParadiseLostMiscPlacedFeatures.java | 50 +- .../world/gen/carver/CloudCarver.java | 3 +- .../world/gen/carver/CloudCarverConfig.java | 13 +- .../world/gen/carver/ParadiseLostCarvers.java | 37 +- .../worldgen/biome/autumnal_tundra.json | 87 ++ .../worldgen/biome/continental_plateau.json | 89 ++ .../worldgen/biome/highlands.json | 86 ++ .../worldgen/biome/highlands_forest.json | 86 ++ .../worldgen/biome/highlands_grand_glade.json | 88 ++ .../worldgen/biome/highlands_shield.json | 97 ++ .../worldgen/biome/highlands_thicket.json | 90 ++ .../worldgen/biome/tradewinds.json | 83 ++ .../worldgen/biome/wisteria_woods.json | 86 ++ .../configured_carver/large_cold_cloud.json | 76 ++ .../placed_feature/generic_boulder.json | 16 + .../placed_feature/golden_boulder.json | 16 + .../placed_feature/heliolith_blob.json | 27 + .../worldgen/placed_feature/levita_blob.json | 27 + .../placed_feature/natural_swedroot.json | 2 +- .../worldgen/placed_feature/ore_cherine.json | 27 + .../worldgen/placed_feature/ore_levita.json | 27 + .../worldgen/placed_feature/ore_olvite.json | 27 + .../placed_feature/plains_boulder.json | 16 + .../worldgen/placed_feature/shield_pond.json | 12 + .../worldgen/placed_feature/shield_rocks.json | 28 + .../worldgen/placed_feature/spring_water.json | 27 + .../placed_feature/surtrum_meteorite.json | 27 + .../placed_feature/thicket_boulder.json | 16 + .../worldgen/placed_feature/tundra_pond.json | 12 + .../worldgen/placed_feature/tundra_snow.json | 12 + .../placed_feature/tundra_spires.json | 28 + src/main/resources/paradise_lost.mixins.json | 1 - 40 files changed, 1752 insertions(+), 934 deletions(-) delete mode 100644 src/main/java/net/id/paradiselost/mixin/util/DefaultedRegistryMixin.java create mode 100644 src/main/resources/data/paradise_lost/worldgen/biome/autumnal_tundra.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/biome/continental_plateau.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/biome/highlands.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/biome/highlands_forest.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/biome/highlands_grand_glade.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/biome/highlands_shield.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/biome/highlands_thicket.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/biome/tradewinds.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/biome/wisteria_woods.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/configured_carver/large_cold_cloud.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/generic_boulder.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/golden_boulder.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/heliolith_blob.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/levita_blob.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_cherine.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_levita.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_olvite.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/plains_boulder.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/shield_pond.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/shield_rocks.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/spring_water.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/surtrum_meteorite.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/thicket_boulder.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_pond.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_snow.json create mode 100644 src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_spires.json diff --git a/gradle.properties b/gradle.properties index b84987aba..f802df596 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ customportalapiVersion=0.0.1-beta63.5-1.19.X cardinalComponentsVersion=5.0.1 trinketsVersion=3.4.0 crowdinTranslateVersion=1.19.4 -entityAttributesVersion=2.3.0 +entityAttributesVersion=2.3.2 modmenuVersion=4.0.6 reiVersion=9.1.530 moreTagsVersion=3.0.5 diff --git a/src/main/java/net/id/paradiselost/blocks/natural/ParadiseLostGrassBlock.java b/src/main/java/net/id/paradiselost/blocks/natural/ParadiseLostGrassBlock.java index dd5bfb8fb..64baa2291 100644 --- a/src/main/java/net/id/paradiselost/blocks/natural/ParadiseLostGrassBlock.java +++ b/src/main/java/net/id/paradiselost/blocks/natural/ParadiseLostGrassBlock.java @@ -5,6 +5,7 @@ import net.id.paradiselost.world.feature.placed_features.ParadiseLostVegetationPlacedFeatures; import net.minecraft.block.BlockState; import net.minecraft.block.Fertilizable; +import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; @@ -36,6 +37,7 @@ public boolean canGrow(World world, Random random, BlockPos pos, BlockState stat public void grow(ServerWorld world, Random random, BlockPos pos, BlockState state) { BlockPos blockPos = pos.up(); BlockState blockState = ParadiseLostBlocks.GRASS.getDefaultState(); + block0: for (int i = 0; i < 128; ++i) { RegistryEntry placedFeature; BlockPos blockPos2 = blockPos; @@ -63,11 +65,11 @@ public void grow(ServerWorld world, Random random, BlockPos pos, BlockState stat if (list.isEmpty()) { continue; } - placedFeature = ((RandomPatchFeatureConfig) list.get(0).config()).feature(); + placedFeature = ((RandomPatchFeatureConfig)((ConfiguredFeature)list.get(0)).config()).feature(); } else { - placedFeature = ParadiseLostVegetationPlacedFeatures.GRASS; + placedFeature = world.getRegistryManager().get(RegistryKeys.PLACED_FEATURE).getEntry(ParadiseLostVegetationPlacedFeatures.GRASS).get(); } - placedFeature.value().generateUnregistered(world, world.getChunkManager().getChunkGenerator(), random, blockPos2); + (placedFeature.value()).generateUnregistered(world, world.getChunkManager().getChunkGenerator(), random, blockPos2); } } } diff --git a/src/main/java/net/id/paradiselost/mixin/block/FarmlandBlockMixin.java b/src/main/java/net/id/paradiselost/mixin/block/FarmlandBlockMixin.java index 9eaa5549d..82494b251 100644 --- a/src/main/java/net/id/paradiselost/mixin/block/FarmlandBlockMixin.java +++ b/src/main/java/net/id/paradiselost/mixin/block/FarmlandBlockMixin.java @@ -3,20 +3,28 @@ import net.id.paradiselost.blocks.ParadiseLostBlocks; import net.minecraft.block.Block; import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; import net.minecraft.block.FarmlandBlock; +import net.minecraft.entity.Entity; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import net.minecraft.world.event.GameEvent; +import org.jetbrains.annotations.Nullable; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import static net.minecraft.block.Block.pushEntitiesUpBeforeBlockChange; + @Mixin(FarmlandBlock.class) public class FarmlandBlockMixin { @Inject(method = "setToDirt", at = @At("HEAD"), cancellable = true) - private static void onSetToDirt(BlockState state, World world, BlockPos pos, CallbackInfo ci) { + private static void onSetToDirt(@Nullable Entity entity, BlockState state, World world, BlockPos pos, CallbackInfo ci) { if (state.isOf(ParadiseLostBlocks.FARMLAND)) { - world.setBlockState(pos, Block.pushEntitiesUpBeforeBlockChange(state, ParadiseLostBlocks.DIRT.getDefaultState(), world, pos)); + BlockState blockState = pushEntitiesUpBeforeBlockChange(state, Blocks.DIRT.getDefaultState(), world, pos); + world.setBlockState(pos, blockState); + world.emitGameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Emitter.of(entity, blockState)); ci.cancel(); } } diff --git a/src/main/java/net/id/paradiselost/mixin/entity/BoatEntityMixin.java b/src/main/java/net/id/paradiselost/mixin/entity/BoatEntityMixin.java index 132fc3d7e..cdb3801a4 100644 --- a/src/main/java/net/id/paradiselost/mixin/entity/BoatEntityMixin.java +++ b/src/main/java/net/id/paradiselost/mixin/entity/BoatEntityMixin.java @@ -13,11 +13,11 @@ @Mixin(BoatEntity.class) public abstract class BoatEntityMixin { @Shadow - public abstract BoatEntity.Type getBoatType(); + public abstract BoatEntity.Type getVariant(); @Inject(method = "asItem", at = @At(value = "FIELD", target = "Lnet/minecraft/item/Items;OAK_BOAT:Lnet/minecraft/item/Item;", opcode = Opcodes.GETSTATIC), cancellable = true) private void checkCustomBoats(CallbackInfoReturnable cir) { - BoatEntity.Type type = this.getBoatType(); + BoatEntity.Type type = this.getVariant(); if (type != BoatEntity.Type.OAK) { for (var entry : ParadiseLostItems.BOAT_SETS) { if (type == entry.type()) { diff --git a/src/main/java/net/id/paradiselost/mixin/util/DefaultedRegistryMixin.java b/src/main/java/net/id/paradiselost/mixin/util/DefaultedRegistryMixin.java deleted file mode 100644 index 7e3723a82..000000000 --- a/src/main/java/net/id/paradiselost/mixin/util/DefaultedRegistryMixin.java +++ /dev/null @@ -1,212 +0,0 @@ -package net.id.paradiselost.mixin.util; - -import net.id.paradiselost.ParadiseLost; -import net.minecraft.registry.DefaultedRegistry; -import net.minecraft.util.Identifier; -import org.jetbrains.annotations.Nullable; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.ModifyVariable; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -@Mixin(DefaultedRegistry.class) -public class DefaultedRegistryMixin { - - private static final Map renames = createMap( - /* BLOCKS */ - "quicksoil", ParadiseLost.locate("dirt"), - "quicksoil_glass", new Identifier("minecraft", "yellow_stained_glass"), - "quicksoil_glass_pane", new Identifier("minecraft", "yellow_stained_glass_pane"), - "cold_aercloud", ParadiseLost.locate("cold_cloud"), - "blue_aercloud", ParadiseLost.locate("blue_cloud"), - "pink_aercloud", ParadiseLost.locate("pink_cloud"), - "golden_aercloud", ParadiseLost.locate("golden_cloud"), - "icestone", ParadiseLost.locate("vitroulite"), - "holystone", ParadiseLost.locate("floestone"), - "holystone_slab", ParadiseLost.locate("floestone_slab"), - "holystone_stairs", ParadiseLost.locate("floestone_stairs"), - "holystone_wall", ParadiseLost.locate("floestone_wall"), - "cobbled_holystone", ParadiseLost.locate("cobbled_floestone"), - "cobbled_holystone_slab", ParadiseLost.locate("cobbled_floestone_slab"), - "cobbled_holystone_stairs", ParadiseLost.locate("cobbled_floestone_stairs"), - "cobbled_holystone_wall", ParadiseLost.locate("cobbled_floestone_wall"), - "mossy_holystone", ParadiseLost.locate("mossy_floestone"), - "golden_mossy_holystone", ParadiseLost.locate("golden_mossy_floestone"), - "mossy_holystone_slab", ParadiseLost.locate("mossy_floestone_slab"), - "mossy_holystone_stairs", ParadiseLost.locate("mossy_floestone_stairs"), - "mossy_holystone_wall", ParadiseLost.locate("mossy_floestone_wall"), - "holystone_brick", ParadiseLost.locate("floestone_brick"), - "holystone_brick_slab", ParadiseLost.locate("floestone_brick_slab"), - "holystone_brick_stairs", ParadiseLost.locate("floestone_brick_stairs"), - "holystone_brick_wall", ParadiseLost.locate("floestone_brick_wall"), - "ambrosium_campfire", ParadiseLost.locate("cherine_campfire"), - "ambrosium_ore", ParadiseLost.locate("cherine_ore"), - "zanite_ore", ParadiseLost.locate("olvite_ore"), - "gravitite_ore", ParadiseLost.locate("floestone"), - "ambrosium_block", ParadiseLost.locate("cherine_block"), - "zanite_block", ParadiseLost.locate("olvite_block"), - "block_of_gravitite", new Identifier("minecraft", "diamond_block"), - "gravitite_levitator", ParadiseLost.locate("levitator"), - "zanite_chain", ParadiseLost.locate("olvite_chain"), - "ambrosium_lantern", ParadiseLost.locate("cherine_lantern"), - "ambrosium_torch", ParadiseLost.locate("cherine_torch"), - "ambrosium_wall_torch", ParadiseLost.locate("cherine_wall_torch"), - "flutegrass", ParadiseLost.locate("grass_plant"), - "skyroot_sign", ParadiseLost.locate("aurel_sign"), - "mottled_skyroot_fallen_log", ParadiseLost.locate("mottled_aurel_fallen_log"), - "mottled_skyroot_log", ParadiseLost.locate("mottled_aurel_log"), - "potted_skyroot_sapling", ParadiseLost.locate("potted_aurel_sapling"), - "skyroot_bookshelf", ParadiseLost.locate("aurel_bookshelf"), - "skyroot_button", ParadiseLost.locate("aurel_button"), - "skyroot_door", ParadiseLost.locate("aurel_door"), - "skyroot_fence", ParadiseLost.locate("aurel_fence"), - "skyroot_fence_gate", ParadiseLost.locate("aurel_fence_gate"), - "skyroot_leaf_pile", ParadiseLost.locate("aurel_leaf_pile"), - "skyroot_leaves", ParadiseLost.locate("aurel_leaves"), - "skyroot_log", ParadiseLost.locate("aurel_log"), - "skyroot_planks", ParadiseLost.locate("aurel_planks"), - "skyroot_pressure_plate", ParadiseLost.locate("aurel_pressure_plate"), - "skyroot_sapling", ParadiseLost.locate("aurel_sapling"), - "skyroot_slab", ParadiseLost.locate("aurel_slab"), - "skyroot_stairs", ParadiseLost.locate("aurel_stairs"), - "skyroot_trapdoor", ParadiseLost.locate("aurel_trapdoor"), - "skyroot_wall_sign", ParadiseLost.locate("aurel_wall_sign"), - "skyroot_wood", ParadiseLost.locate("aurel_wood"), - "stripped_skyroot_log", ParadiseLost.locate("stripped_aurel_log"), - "stripped_skyroot_wood", ParadiseLost.locate("stripped_aurel_wood"), - "golden_oak_sign", ParadiseLost.locate("mother_aurel_sign"), - "potted_golden_oak_sapling", ParadiseLost.locate("potted_mother_aurel_sapling"), - "golden_oak_button", ParadiseLost.locate("mother_aurel_button"), - "golden_oak_door", ParadiseLost.locate("mother_aurel_door"), - "golden_oak_fence", ParadiseLost.locate("mother_aurel_fence"), - "golden_oak_fence_gate", ParadiseLost.locate("mother_aurel_fence_gate"), - "golden_oak_leaves", ParadiseLost.locate("mother_aurel_leaves"), - "golden_oak_log", ParadiseLost.locate("mother_aurel_log"), - "golden_oak_planks", ParadiseLost.locate("mother_aurel_planks"), - "golden_oak_pressure_plate", ParadiseLost.locate("mother_aurel_pressure_plate"), - "golden_oak_sapling", ParadiseLost.locate("mother_aurel_sapling"), - "golden_oak_slab", ParadiseLost.locate("mother_aurel_slab"), - "golden_oak_stairs", ParadiseLost.locate("mother_aurel_stairs"), - "golden_oak_trapdoor", ParadiseLost.locate("mother_aurel_trapdoor"), - "golden_oak_wall_sign", ParadiseLost.locate("mother_aurel_wall_sign"), - "golden_oak_wood", ParadiseLost.locate("mother_aurel_wood"), - "stripped_golden_oak_log", ParadiseLost.locate("stripped_mother_aurel_log"), - "stripped_golden_oak_wood", ParadiseLost.locate("stripped_mother_aurel_wood"), - "crystal_sign", ParadiseLost.locate("aurel_sign"), - "potted_crystal_sapling", ParadiseLost.locate("potted_aurel_sapling"), - "crystal_button", ParadiseLost.locate("aurel_button"), - "crystal_door", ParadiseLost.locate("aurel_door"), - "crystal_fence", ParadiseLost.locate("aurel_fence"), - "crystal_fence_gate", ParadiseLost.locate("aurel_fence_gate"), - "crystal_leaves", ParadiseLost.locate("aurel_leaves"), - "crystal_log", ParadiseLost.locate("aurel_log"), - "crystal_planks", ParadiseLost.locate("aurel_planks"), - "crystal_pressure_plate", ParadiseLost.locate("aurel_pressure_plate"), - "crystal_sapling", ParadiseLost.locate("aurel_sapling"), - "crystal_slab", ParadiseLost.locate("aurel_slab"), - "crystal_stairs", ParadiseLost.locate("aurel_stairs"), - "crystal_trapdoor", ParadiseLost.locate("aurel_trapdoor"), - "crystal_wall_sign", ParadiseLost.locate("aurel_wall_sign"), - "crystal_wood", ParadiseLost.locate("aurel_wood"), - "stripped_crystal_log", ParadiseLost.locate("stripped_aurel_log"), - "stripped_crystal_wood", ParadiseLost.locate("stripped_aurel_wood"), - "blueberry_bush", ParadiseLost.locate("blackcurrant_bush"), - "enchanted_grass", ParadiseLost.locate("highlands_grass"), - /* ITEMS */ - "aechor_petal", ParadiseLost.locate("hellenrose_petal"), - "ambrosium_shard", ParadiseLost.locate("cherine"), - "quicksoil_vial", ParadiseLost.locate("vial"), - "aercloud_vial", ParadiseLost.locate("cloud_vial"), - "zanite_gemstone", ParadiseLost.locate("olvite"), - "zanite_fragment", ParadiseLost.locate("olvite_nugget"), - "gravitite_gemstone", new Identifier("minecraft", "diamond"), - "zanite_shovel", ParadiseLost.locate("olvite_shovel"), - "zanite_pickaxe", ParadiseLost.locate("olvite_pickaxe"), - "zanite_axe", ParadiseLost.locate("olvite_axe"), - "zanite_sword", ParadiseLost.locate("olvite_sword"), - "zanite_hoe", ParadiseLost.locate("olvite_hoe"), - "gravitite_shovel", new Identifier("minecraft", "diamond_shovel"), - "gravitite_pickaxe", new Identifier("minecraft", "diamond_pickaxe"), - "gravitite_axe", new Identifier("minecraft", "diamond_axe"), - "gravitite_sword", new Identifier("minecraft", "diamond_sword"), - "gravitite_hoe", new Identifier("minecraft", "diamond_hoe"), - "ambrosium_bloodstone", ParadiseLost.locate("cherine_bloodstone"), - "zanite_bloodstone", ParadiseLost.locate("olvite_bloodstone"), - "zanite_helmet", ParadiseLost.locate("olvite_helmet"), - "zanite_chestplate", ParadiseLost.locate("olvite_chestplate"), - "zanite_leggings", ParadiseLost.locate("olvite_leggings"), - "zanite_boots", ParadiseLost.locate("olvite_boots"), - "gravitite_helmet", new Identifier("minecraft", "diamond_helmet"), - "gravitite_chestplate", new Identifier("minecraft", "diamond_chestplate"), - "gravitite_leggings", new Identifier("minecraft", "diamond_leggings"), - "gravitite_boots", new Identifier("minecraft", "diamond_boots"), - "blue_berry", ParadiseLost.locate("blackcurrant"), - "enchanted_blueberry", ParadiseLost.locate("blackcurrant"), - "blue_gummy_swet", ParadiseLost.locate("amadrys_bread_glazed"), - "golden_gummy_swet", ParadiseLost.locate("amadrys_bread_glazed"), - "valkyrie_milk", ParadiseLost.locate("mystery_milk"), - "ginger_bread_man", ParadiseLost.locate("gingerbread_man"), - "skyroot_bucket", ParadiseLost.locate("aurel_bucket"), - "skyroot_water_bucket", ParadiseLost.locate("aurel_water_bucket"), - "skyroot_milk_bucket", ParadiseLost.locate("aurel_milk_bucket"), - "skyroot_boat", ParadiseLost.locate("aurel_boat"), - "skyroot_chest_boat", ParadiseLost.locate("aurel_chest_boat"), - "golden_dart", new Identifier("minecraft", "arrow"), - "enchanted_dart", new Identifier("minecraft", "arrow"), - "poison_dart", new Identifier("minecraft", "arrow"), - "golden_dart_shooter", new Identifier("minecraft", "bow"), - "enchanted_dart_shooter", new Identifier("minecraft", "bow"), - "poison_dart_shooter", new Identifier("minecraft", "bow"), - "valkyrie_lance", new Identifier("minecraft", "netherite_sword"), - "swet_ball", new Identifier("minecraft", "slime_ball"), - "valkyrie_axe", new Identifier("minecraft", "diamond_axe"), - "valkyrie_hoe", new Identifier("minecraft", "diamond_hoe"), - "valkyrie_pickaxe", new Identifier("minecraft", "diamond_pickaxe"), - "valkyrie_shovel", new Identifier("minecraft", "diamond_shovel"), - "flaming_sword", new Identifier("minecraft", "diamond_sword"), - "lightning_sword", new Identifier("minecraft", "diamond_sword"), - "holy_sword", new Identifier("minecraft", "diamond_sword"), - "vampire_blade", new Identifier("minecraft", "diamond_sword"), - "pig_slayer", new Identifier("minecraft", "diamond_sword"), - "candy_cane_sword", new Identifier("minecraft", "diamond_sword"), - "phoenix_bow", new Identifier("minecraft", "bow"), - "gravitite_bloodstone", ParadiseLost.locate("olvite_bloodstone"), - "white_apple", new Identifier("minecraft", "apple"), - "candy_cane", ParadiseLost.locate("gingerbread_man"), - "neptune_helmet", new Identifier("minecraft", "diamond_helmet"), - "neptune_chestplate", new Identifier("minecraft", "diamond_chestplate"), - "neptune_leggings", new Identifier("minecraft", "diamond_leggings"), - "neptune_boots", new Identifier("minecraft", "diamond_boots"), - "phoenix_helmet", new Identifier("minecraft", "diamond_helmet"), - "phoenix_chestplate", new Identifier("minecraft", "diamond_chestplate"), - "phoenix_leggings", new Identifier("minecraft", "diamond_leggings"), - "phoenix_boots", new Identifier("minecraft", "diamond_boots") - ); - - @SafeVarargs - private static Map createMap(Object... values) { - if ((values.length & 1) != 0) { - throw new IllegalArgumentException("Odd number of values"); - } - Map map = new HashMap<>(); - for (int i = 0; i < values.length; i += 2) { - map.put((T) values[i], (V) values[i + 1]); - } - return Collections.unmodifiableMap(map); - } - - @ModifyVariable(at = @At("HEAD"), method = "get(Lnet/minecraft/util/Identifier;)Ljava/lang/Object;", ordinal = 0, argsOnly = true) - Identifier fixMissingFromRegistry(@Nullable Identifier id) { - if (id != null && id.getNamespace().equals(ParadiseLost.MOD_ID)) { - String path = id.getPath(); - if (renames.containsKey(path)) { - Identifier newId = renames.get(id.getPath()); - if (!newId.getPath().equals("")) return newId; - } - } - return id; - } -} diff --git a/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java b/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java index 6ad968985..a3fad8cb1 100644 --- a/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java +++ b/src/main/java/net/id/paradiselost/world/dimension/ParadiseLostBiomes.java @@ -38,636 +38,490 @@ * @author Gudenau */ public final class ParadiseLostBiomes { - public static final RegistryKey AUTUMNAL_TUNDRA_KEY = register("autumnal_tundra"); - public static final RegistryKey CONTINENTAL_PLATEAU_KEY = register("continental_plateau"); - public static final RegistryKey HIGHLANDS_PLAINS_KEY = register("highlands"); - public static final RegistryKey HIGHLANDS_FOREST_KEY = register("highlands_forest"); - public static final RegistryKey HIGHLANDS_GRAND_GLADE_KEY = register("highlands_grand_glade"); - public static final RegistryKey HIGHLANDS_SHIELD_KEY = register("highlands_shield"); - public static final RegistryKey HIGHLANDS_THICKET_KEY = register("highlands_thicket"); - public static final RegistryKey TRADEWINDS_KEY = register("tradewinds"); - public static final RegistryKey WISTERIA_WOODS_KEY = register("wisteria_woods"); + public static final RegistryKey AUTUMNAL_TUNDRA_KEY = of("autumnal_tundra"); + public static final RegistryKey CONTINENTAL_PLATEAU_KEY = of("continental_plateau"); + public static final RegistryKey HIGHLANDS_PLAINS_KEY = of("highlands"); + public static final RegistryKey HIGHLANDS_FOREST_KEY = of("highlands_forest"); + public static final RegistryKey HIGHLANDS_GRAND_GLADE_KEY = of("highlands_grand_glade"); + public static final RegistryKey HIGHLANDS_SHIELD_KEY = of("highlands_shield"); + public static final RegistryKey HIGHLANDS_THICKET_KEY = of("highlands_thicket"); + public static final RegistryKey TRADEWINDS_KEY = of("tradewinds"); + public static final RegistryKey WISTERIA_WOODS_KEY = of("wisteria_woods"); - public static final RegistryEntry AUTUMNAL_TUNDRA; - public static final RegistryEntry CONTINENTAL_PLATEAU; - public static final RegistryEntry HIGHLANDS_PLAINS; - public static final RegistryEntry HIGHLANDS_FOREST; - public static final RegistryEntry HIGHLANDS_GRAND_GLADE; - public static final RegistryEntry HIGHLANDS_SHIELD; - public static final RegistryEntry HIGHLANDS_THICKET; - public static final RegistryEntry TRADEWINDS; - public static final RegistryEntry WISTERIA_WOODS; + public static void init() {} - static { - AUTUMNAL_TUNDRA = register(AUTUMNAL_TUNDRA_KEY, createAutumnalTundra()); - CONTINENTAL_PLATEAU = register(CONTINENTAL_PLATEAU_KEY, createContinentalPlateau()); - HIGHLANDS_PLAINS = register(HIGHLANDS_PLAINS_KEY, createHighlandsPlains()); - HIGHLANDS_FOREST = register(HIGHLANDS_FOREST_KEY, createHighlandsForest()); - HIGHLANDS_GRAND_GLADE = register(HIGHLANDS_GRAND_GLADE_KEY, createHighlandsGrandGlade()); - HIGHLANDS_SHIELD = register(HIGHLANDS_SHIELD_KEY, createHighlandsShield()); - HIGHLANDS_THICKET = register(HIGHLANDS_THICKET_KEY, createHighlandsThicket()); - TRADEWINDS = register(TRADEWINDS_KEY, createTradewinds()); - WISTERIA_WOODS = register(WISTERIA_WOODS_KEY, createWisteriaWoods()); - } - - public static void init() { - } - - private static RegistryKey register(String name) { + private static RegistryKey of(String name) { return RegistryKey.of(RegistryKeys.BIOME, locate(name)); } - private static RegistryEntry register(RegistryKey key, Biome biome) { - return BuiltinRegistries.add(BuiltinRegistries.BIOME, key, biome); - } - - /** - * Creates a new {@link BiomeEffects} instance from the provided colors. - * - * @param skyColor The color of the sky - * @param foliageColor The color of foliage (I.E. leaves) - * @param grassColor The color of grass - * @param fogColor The color of fog - * @param waterColor The color of water - * @param waterFogColor The color of fog while in water - * @param grassModifier Modifies grass colors - * @return The new {@link BiomeEffects} instance - */ - private static BiomeEffects createBiomeEffects(int skyColor, int foliageColor, int grassColor, int fogColor, int waterColor, int waterFogColor, BiomeEffects.GrassColorModifier grassModifier) { - return new BiomeEffects.Builder() - .skyColor(skyColor) - .foliageColor(foliageColor) - .grassColor(grassColor) - .fogColor(fogColor) - .waterColor(waterColor) - .waterFogColor(waterFogColor) - .grassColorModifier(grassModifier) - .build(); - } - - /** - * Creates a new {@link BiomeEffects} instance from the provided colors. - * - * @param skyColor The color of the sky - * @param foliageColor The color of foliage (I.E. leaves) - * @param grassColor The color of grass - * @param fogColor The color of fog - * @param waterColor The color of water - * @param waterFogColor The color of fog while in water - * @return The new {@link BiomeEffects} instance - */ - private static BiomeEffects createBiomeEffects(int skyColor, int foliageColor, int grassColor, int fogColor, int waterColor, int waterFogColor) { - return createBiomeEffects(skyColor, foliageColor, grassColor, fogColor, waterColor, waterFogColor, BiomeEffects.GrassColorModifier.NONE); - } - - /** - * Creates a new {@link GenerationSettings} instance from the provided carvers and features. - * - * @param carvers The carvers to use - * @param features The features to use - * @return The new {@link GenerationSettings} instance - */ - private static GenerationSettings createGenerationSettings(Map>>> carvers, Map>> features) { - var builder = new GenerationSettings.Builder(); - for (var step : GenerationStep.Carver.values()) { - for (var carver : carvers.getOrDefault(step, List.of())) { - builder.carver(step, carver); - } - } - for (var step : GenerationStep.Feature.values()) { - for (var feature : features.getOrDefault(step, List.of())) { - builder.feature(step, feature); - } - } - return builder.build(); - } - - /** - * Creates entity {@link SpawnSettings} from provided maps. Intended to be used with the collection classes static - * of methods. - * - * @param spawns The entities to spawn - * @param costs The cost to spawn some entities - * @return The created {@link SpawnSettings} - */ - private static SpawnSettings createSpawnSettings(Map> spawns, Map, SpawnCost> costs) { - var builder = new SpawnSettings.Builder(); - for (var group : SpawnGroup.values()) { - for (var spawn : spawns.getOrDefault(group, List.of())) { - builder.spawn(group, spawn); - } - } - for (var entry : costs.entrySet()) { - var cost = entry.getValue(); - builder.spawnCost(entry.getKey(), cost.charge(), cost.energyBudget()); - } - return builder.build(); - } - - /** - * Merges two or more feature maps together. - * - * @param maps The maps to merge - * @param The type of the map keys - * @param The type of the map lists - * @return A map that contains all features - */ - @SafeVarargs - public static Map> merge(Map>... maps) { - if (maps.length == 1) { - return maps[0]; - } - - Map> result = new HashMap<>(); - for (var map : maps) { - for (Map.Entry> entry : map.entrySet()) { - result.computeIfAbsent(entry.getKey(), (ignored) -> new ArrayList<>()).addAll(entry.getValue()); - } - } - return result; - } - - /** - * Creates a {@link Map} suitable for use with {@link #createGenerationSettings} that contains all of the default - * Paradise Lost carvers. - * - * @return The default Paradise Lost carvers - */ - private static Map>>> getParadiseLostCarvers() { - return Map.of(GenerationStep.Carver.AIR, List.of( - ConfiguredCarvers.CAVE, - ParadiseLostCarvers.LARGE_COLD_CLOUD_CARVER, - ParadiseLostCarvers.COLD_CLOUD_CARVER, - ParadiseLostCarvers.TINY_COLD_CLOUD_CARVER, - ParadiseLostCarvers.LARGE_BLUE_CLOUD_CARVER, - ParadiseLostCarvers.BLUE_CLOUD_CARVER, - ParadiseLostCarvers.TINY_BLUE_CLOUD_CARVER, - ParadiseLostCarvers.LARGE_GOLDEN_CLOUD_CARVER, - ParadiseLostCarvers.GOLDEN_CLOUD_CARVER, - ParadiseLostCarvers.TINY_GOLDEN_CLOUD_CARVER - )); - } - - /** - * Returns a map of common placed features in all of the Paradise Lost biomes. - * - * @return A map of features suitable for use with {@link #createGenerationSettings} - */ - private static Map>> getStandardParadiseLostFeatures() { - return Map.of( - GenerationStep.Feature.RAW_GENERATION, List.of( - SURTRUM_METEORITE - ), - GenerationStep.Feature.UNDERGROUND_ORES, List.of( - HELIOLITH_BLOB, - LEVITA_BLOB, - ORE_CHERINE, - ORE_OLVITE, - ORE_LEVITA - ), - GenerationStep.Feature.VEGETAL_DECORATION, List.of( - PATCH_BROWN_SPORECAP, - PATCH_PINK_SPORECAP, - NATURAL_SWEDROOT - ) - ); - } - - private static Biome createHighlandsPlains() { - return new Biome.Builder() - .effects(createBiomeEffects(0xC0C0FF, 0xf1ff99, 0xa9dbc5, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) - .generationSettings(createGenerationSettings( - getParadiseLostCarvers(), - - merge( - getStandardParadiseLostFeatures(), - Map.of( - GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( - PLAINS_BOULDER - ), - GenerationStep.Feature.FLUID_SPRINGS, List.of( - WATER_SPRING - ), - GenerationStep.Feature.VEGETAL_DECORATION, List.of( - FLOWERS, - GRASS, - TALL_GRASS, - PATCH_BLACKCURRANT, - SPARSE_TREES - ) - ) - ) - )) - .spawnSettings(createSpawnSettings( - merge( - Map.of( - SpawnGroup.MONSTER, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) - ), - SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) - ) - ) - ), - Map.of( - ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) - ) - )) - .precipitation(Biome.Precipitation.RAIN).temperature(0.5F).downfall(1) - // .category(Biome.Category.PLAINS) - .build(); - } - - private static Biome createHighlandsForest() { - return new Biome.Builder() - .effects(createBiomeEffects(0xC0C0FF, 0xf1ff99, 0xa2dbc2, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) - .generationSettings(createGenerationSettings( - getParadiseLostCarvers(), - - merge( - getStandardParadiseLostFeatures(), - Map.of( - GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( - ), - GenerationStep.Feature.FLUID_SPRINGS, List.of( - WATER_SPRING - ), - GenerationStep.Feature.VEGETAL_DECORATION, List.of( - FLOWERS, - TALL_GRASS, - TUNDRA_FOLIAGE, - BUSH, - PATCH_BLACKCURRANT, - SCATTERED_TREES, - ALT_FALLEN_LEAVES - ) - ) - ) - )) - .spawnSettings(createSpawnSettings( - merge( - Map.of( - SpawnGroup.MONSTER, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) - ), - SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) - ) - ) - ), - Map.of( - ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) - ) - )) - .precipitation(true).temperature(0.5F).downfall(1) - // .category(Biome.Category.FOREST) - .build(); - } - - private static Biome createTradewinds() { - return new Biome.Builder() - .effects(createBiomeEffects(0xC0C0FF, 0xf1ff99, 0x8dc9af, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) - .generationSettings(createGenerationSettings( - getParadiseLostCarvers(), +// private static BiomeEffects createBiomeEffects(int skyColor, int foliageColor, int grassColor, int fogColor, int waterColor, int waterFogColor, BiomeEffects.GrassColorModifier grassModifier) { +// return new BiomeEffects.Builder() +// .skyColor(skyColor) +// .foliageColor(foliageColor) +// .grassColor(grassColor) +// .fogColor(fogColor) +// .waterColor(waterColor) +// .waterFogColor(waterFogColor) +// .grassColorModifier(grassModifier) +// .build(); +// } +// +// private static BiomeEffects createBiomeEffects(int skyColor, int foliageColor, int grassColor, int fogColor, int waterColor, int waterFogColor) { +// return createBiomeEffects(skyColor, foliageColor, grassColor, fogColor, waterColor, waterFogColor, BiomeEffects.GrassColorModifier.NONE); +// } +// +// +// /** +// * Returns a map of common placed features in all of the Paradise Lost biomes. +// * +// * @return A map of features suitable for use with {@link #createGenerationSettings} +// */ +// private static Map>> getStandardParadiseLostFeatures() { +// return Map.of( +// GenerationStep.Feature.RAW_GENERATION, List.of( +// SURTRUM_METEORITE +// ), +// GenerationStep.Feature.UNDERGROUND_ORES, List.of( +// HELIOLITH_BLOB, +// LEVITA_BLOB, +// ORE_CHERINE, +// ORE_OLVITE, +// ORE_LEVITA +// ), +// GenerationStep.Feature.VEGETAL_DECORATION, List.of( +// PATCH_BROWN_SPORECAP, +// PATCH_PINK_SPORECAP, +// NATURAL_SWEDROOT +// ) +// ); +// } +// +// private static Biome createHighlandsPlains() { +// return new Biome.Builder() +// .effects(createBiomeEffects(0xC0C0FF, 0xf1ff99, 0xa9dbc5, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) +// .generationSettings(createGenerationSettings( +// getParadiseLostCarvers(), +// +// merge( +// getStandardParadiseLostFeatures(), +// Map.of( +// GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( +// PLAINS_BOULDER +// ), +// GenerationStep.Feature.FLUID_SPRINGS, List.of( +// WATER_SPRING +// ), +// GenerationStep.Feature.VEGETAL_DECORATION, List.of( +// FLOWERS, +// GRASS, +// TALL_GRASS, +// PATCH_BLACKCURRANT, +// SPARSE_TREES +// ) +// ) +// ) +// )) +// .spawnSettings(createSpawnSettings( +// merge( +// Map.of( +// SpawnGroup.MONSTER, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) +// ), +// SpawnGroup.CREATURE, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) +// ) +// ) +// ), +// Map.of( +// ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) +// ) +// )) +// .precipitation(Biome.Precipitation.RAIN).temperature(0.5F).downfall(1) +// // .category(Biome.Category.PLAINS) +// .build(); +// } +// +// private static Biome createHighlandsForest() { +// return new Biome.Builder() +// .effects(createBiomeEffects(0xC0C0FF, 0xf1ff99, 0xa2dbc2, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) +// .generationSettings(createGenerationSettings( +// getParadiseLostCarvers(), +// +// merge( +// getStandardParadiseLostFeatures(), +// Map.of( +// GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( +// ), +// GenerationStep.Feature.FLUID_SPRINGS, List.of( +// WATER_SPRING +// ), +// GenerationStep.Feature.VEGETAL_DECORATION, List.of( +// FLOWERS, +// TALL_GRASS, +// TUNDRA_FOLIAGE, +// BUSH, +// PATCH_BLACKCURRANT, +// SCATTERED_TREES, +// ALT_FALLEN_LEAVES +// ) +// ) +// ) +// )) +// .spawnSettings(createSpawnSettings( +// merge( +// Map.of( +// SpawnGroup.MONSTER, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) +// ), +// SpawnGroup.CREATURE, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) +// ) +// ) +// ), +// Map.of( +// ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) +// ) +// )) +// .precipitation(true).temperature(0.5F).downfall(1) +// // .category(Biome.Category.FOREST) +// .build(); +// } +// +// private static Biome createTradewinds() { +// return new Biome.Builder() +// .effects(createBiomeEffects(0xC0C0FF, 0xf1ff99, 0x8dc9af, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) +// .generationSettings(createGenerationSettings( +// getParadiseLostCarvers(), +// +// merge( +// getStandardParadiseLostFeatures(), +// Map.of( +// GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( +// ), +// GenerationStep.Feature.FLUID_SPRINGS, List.of( +// WATER_SPRING +// ), +// GenerationStep.Feature.VEGETAL_DECORATION, List.of( +// TALL_GRASS, +// BUSH, +// PATCH_BLACKCURRANT, +// PLATEAU_TREES, +// SPARSE_TREES +// ) +// ) +// ) +// )) +// .spawnSettings(createSpawnSettings( +// merge( +// Map.of( +// SpawnGroup.MONSTER, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) +// ), +// SpawnGroup.CREATURE, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) +// ) +// ) +// ), +// Map.of( +// ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) +// ) +// )) +// .precipitation(true).temperature(0.5F).downfall(1) +// // .category(Biome.Category.FOREST) +// .build(); +// } +// +// private static Biome createHighlandsThicket() { +// return new Biome.Builder() +// .effects(createBiomeEffects(0xC0C0FF, 0xedff7d, 0x739988, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) +// .generationSettings(createGenerationSettings( +// getParadiseLostCarvers(), +// +// merge( +// getStandardParadiseLostFeatures(), +// Map.of( +// GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( +// THICKET_BOULDER, +// GOLDEN_BOULDER +// ), +// GenerationStep.Feature.FLUID_SPRINGS, List.of( +// WATER_SPRING +// ), +// GenerationStep.Feature.VEGETAL_DECORATION, List.of( +// THICKET_SHAMROCK, +// THICKET_LIVERWORT_CARPET, +// GRASS, +// FALLEN_LEAVES, +// TALL_GRASS, +// DENSE_BUSH, +// THICKET_TREES, +// THICKET_MOTHER_AUREL_TREES +// ) +// ) +// ) +// )) +// .spawnSettings(createSpawnSettings( +// merge( +// Map.of( +// SpawnGroup.MONSTER, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) +// ), +// SpawnGroup.CREATURE, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) +// ) +// ) +// ), +// Map.of( +// ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) +// ) +// )) +// .precipitation(Biome.Precipitation.RAIN).temperature(0.4F).downfall(2) +// // .category(Biome.Category.FOREST) +// .build(); +// } +// +// private static Biome createHighlandsGrandGlade() { +// return new Biome.Builder() +// .effects(createBiomeEffects(0xC0C0FF, 0xedff7d, 0x739988, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) +// .generationSettings(createGenerationSettings( +// getParadiseLostCarvers(), +// +// merge( +// getStandardParadiseLostFeatures(), +// Map.of( +// GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( +// THICKET_BOULDER +// ), +// GenerationStep.Feature.FLUID_SPRINGS, List.of( +// WATER_SPRING +// ), +// GenerationStep.Feature.VEGETAL_DECORATION, List.of( +// THICKET_FALLEN_LOG, +// GRASS, +// FALLEN_LEAVES, +// PATCH_BROWN_SPORECAP_COMMON, +// TALL_GRASS, +// DENSE_BUSH, +// SPARSE_TREES +// ) +// ) +// ) +// )) +// .spawnSettings(createSpawnSettings( +// merge( +// Map.of( +// SpawnGroup.MONSTER, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) +// ), +// SpawnGroup.CREATURE, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) +// ) +// ) +// ), +// Map.of( +// ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) +// ) +// )) +// .precipitation(Biome.Precipitation.RAIN).temperature(0.4F).downfall(2) +// // .category(Biome.Category.FOREST) +// .build(); +// } +// +// private static Biome createWisteriaWoods() { +// return new Biome.Builder() +// .effects(createBiomeEffects(0xC0C0FF, 0xf1ff99, 0xa5d6c1, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) +// .generationSettings(createGenerationSettings( +// getParadiseLostCarvers(), +// +// merge( +// getStandardParadiseLostFeatures(), +// Map.of( +// GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( +// ), +// GenerationStep.Feature.VEGETAL_DECORATION, List.of( +// FLOWERS, +// GRASS, +// FALLEN_ROSE_LEAVES, +// FALLEN_LAVENDER_LEAVES, +// BUSH, +// PATCH_BLACKCURRANT, +// RAINBOW_FOREST_TREES +// ) +// ) +// ) +// )) +// .spawnSettings(createSpawnSettings( +// merge( +// Map.of( +// SpawnGroup.MONSTER, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) +// ), +// SpawnGroup.CREATURE, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) +// ) +// ) +// ), +// Map.of( +// ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) +// ) +// )) +// .precipitation(true).temperature(0.5F).downfall(1) +// // .category(Biome.Category.FOREST) +// .build(); +// } +// +// private static Biome createAutumnalTundra() { +// return new Biome.Builder() +// .effects(createBiomeEffects(0xC0C0FF, 0xffe08a, 0xcef2e2, 0xFFFFFF, 0x8CE6FF, 0xA1EAFF)) +// .generationSettings(createGenerationSettings( +// getParadiseLostCarvers(), +// +// merge( +// getStandardParadiseLostFeatures(), +// Map.of( +// GenerationStep.Feature.LAKES, List.of( +// TUNDRA_PONDS, +// TUNDRA_SNOW +// ), +// GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( +// GENERIC_BOULDER +// ), +// GenerationStep.Feature.FLUID_SPRINGS, List.of( +// WATER_SPRING +// ), +// GenerationStep.Feature.VEGETAL_DECORATION, List.of( +// TUNDRA_SPIRES, +// TUNDRA_FOLIAGE, +// MIXED_TREES +// ), +// GenerationStep.Feature.TOP_LAYER_MODIFICATION, List.of( +// MiscPlacedFeatures.FREEZE_TOP_LAYER +// ) +// ) +// ) +// )) +// .spawnSettings(createSpawnSettings( +// merge( +// Map.of( +// SpawnGroup.MONSTER, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) +// ), +// SpawnGroup.CREATURE, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) +// ) +// ) +// ), +// Map.of( +// ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) +// ) +// )) +// .precipitation(Biome.Precipitation.RAIN).temperature(0.1F).downfall(2) +// // .category(Biome.Category.TAIGA) +// .build(); +// } +// +// private static Biome createContinentalPlateau() { +// return new Biome.Builder() +// .effects(createBiomeEffects(0xC0C0FF, 0xffe08a, 0xcef2e2, 0xFFFFFF, 0x8CE6FF, 0xA1EAFF)) +// .generationSettings(createGenerationSettings( +// getParadiseLostCarvers(), +// +// merge( +// getStandardParadiseLostFeatures(), +// Map.of( +// GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( +// PLAINS_BOULDER +// ), +// GenerationStep.Feature.FLUID_SPRINGS, List.of( +// WATER_SPRING +// ), +// GenerationStep.Feature.VEGETAL_DECORATION, List.of( +// FLOWERS, +// GRASS, +// TALL_GRASS, +// PATCH_BLACKCURRANT, +// PLATEAU_FOLIAGE, +// PLATEAU_SHAMROCK, +// PLATEAU_FLOWERING_GRASS, +// PLATEAU_TREES +// ) +// ) +// ) +// )) +// .spawnSettings(createSpawnSettings( +// merge( +// Map.of( +// SpawnGroup.MONSTER, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) +// ), +// SpawnGroup.CREATURE, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) +// ) +// ) +// ), +// Map.of( +// ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) +// ) +// )) +// .precipitation(Biome.Precipitation.RAIN).temperature(0.25F).downfall(0) +// .build(); +// } +// +// private static Biome createHighlandsShield() { +// return new Biome.Builder() +// .effects(createBiomeEffects(0xC0C0FF, 0xfae05f, 0xaef5d6, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) +// .generationSettings(createGenerationSettings( +// getParadiseLostCarvers(), +// +// merge( +// getStandardParadiseLostFeatures(), +// Map.of( +// GenerationStep.Feature.LAKES, List.of( +// SHIELD_PONDS +// ), +// GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( +// GENERIC_BOULDER +// ), +// GenerationStep.Feature.FLUID_SPRINGS, List.of( +// WATER_SPRING +// ), +// GenerationStep.Feature.VEGETAL_DECORATION, List.of( +// SHIELD_STUMPS, +// SHIELD_HOLLOW_STUMPS, +// MOTTLED_FALLEN_LOG, +// MOTTLED_HOLLOW_FALLEN_LOG, +// FLOWERS, +// SHIELD_FLAX, +// SHIELD_NETTLES, +// SHIELD_FOLIAGE, +// GRASS, +// TALL_GRASS, +// WATER_SPRING, +// SHIELD_TREES, +// DENSE_SHIELD_TREES, +// SHIELD_ROCKS +// ) +// ) +// ) +// )) +// .spawnSettings(createSpawnSettings( +// merge( +// Map.of( +// SpawnGroup.MONSTER, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) +// ), +// SpawnGroup.CREATURE, List.of( +// new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) +// ) +// ) +// ), +// Map.of( +// ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) +// ) +// )) +// .precipitation(Biome.Precipitation.RAIN).temperature(0.35F).downfall(2) +// .build(); +// } +// - merge( - getStandardParadiseLostFeatures(), - Map.of( - GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( - ), - GenerationStep.Feature.FLUID_SPRINGS, List.of( - WATER_SPRING - ), - GenerationStep.Feature.VEGETAL_DECORATION, List.of( - TALL_GRASS, - BUSH, - PATCH_BLACKCURRANT, - PLATEAU_TREES, - SPARSE_TREES - ) - ) - ) - )) - .spawnSettings(createSpawnSettings( - merge( - Map.of( - SpawnGroup.MONSTER, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) - ), - SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) - ) - ) - ), - Map.of( - ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) - ) - )) - .precipitation(true).temperature(0.5F).downfall(1) - // .category(Biome.Category.FOREST) - .build(); - } - - private static Biome createHighlandsThicket() { - return new Biome.Builder() - .effects(createBiomeEffects(0xC0C0FF, 0xedff7d, 0x739988, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) - .generationSettings(createGenerationSettings( - getParadiseLostCarvers(), - - merge( - getStandardParadiseLostFeatures(), - Map.of( - GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( - THICKET_BOULDER, - GOLDEN_BOULDER - ), - GenerationStep.Feature.FLUID_SPRINGS, List.of( - WATER_SPRING - ), - GenerationStep.Feature.VEGETAL_DECORATION, List.of( - THICKET_SHAMROCK, - THICKET_LIVERWORT_CARPET, - GRASS, - FALLEN_LEAVES, - TALL_GRASS, - DENSE_BUSH, - THICKET_TREES, - THICKET_MOTHER_AUREL_TREES - ) - ) - ) - )) - .spawnSettings(createSpawnSettings( - merge( - Map.of( - SpawnGroup.MONSTER, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) - ), - SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) - ) - ) - ), - Map.of( - ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) - ) - )) - .precipitation(Biome.Precipitation.RAIN).temperature(0.4F).downfall(2) - // .category(Biome.Category.FOREST) - .build(); - } - - private static Biome createHighlandsGrandGlade() { - return new Biome.Builder() - .effects(createBiomeEffects(0xC0C0FF, 0xedff7d, 0x739988, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) - .generationSettings(createGenerationSettings( - getParadiseLostCarvers(), - - merge( - getStandardParadiseLostFeatures(), - Map.of( - GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( - THICKET_BOULDER - ), - GenerationStep.Feature.FLUID_SPRINGS, List.of( - WATER_SPRING - ), - GenerationStep.Feature.VEGETAL_DECORATION, List.of( - THICKET_FALLEN_LOG, - GRASS, - FALLEN_LEAVES, - PATCH_BROWN_SPORECAP_COMMON, - TALL_GRASS, - DENSE_BUSH, - SPARSE_TREES - ) - ) - ) - )) - .spawnSettings(createSpawnSettings( - merge( - Map.of( - SpawnGroup.MONSTER, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) - ), - SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) - ) - ) - ), - Map.of( - ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) - ) - )) - .precipitation(Biome.Precipitation.RAIN).temperature(0.4F).downfall(2) - // .category(Biome.Category.FOREST) - .build(); - } - - private static Biome createWisteriaWoods() { - return new Biome.Builder() - .effects(createBiomeEffects(0xC0C0FF, 0xf1ff99, 0xa5d6c1, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) - .generationSettings(createGenerationSettings( - getParadiseLostCarvers(), - - merge( - getStandardParadiseLostFeatures(), - Map.of( - GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( - ), - GenerationStep.Feature.VEGETAL_DECORATION, List.of( - RAINBOW_MALT_SPRIGS, - FLOWERS, - GRASS, - FALLEN_ROSE_LEAVES, - FALLEN_LAVENDER_LEAVES, - BUSH, - PATCH_BLACKCURRANT, - RAINBOW_FOREST_TREES - ) - ) - ) - )) - .spawnSettings(createSpawnSettings( - merge( - Map.of( - SpawnGroup.MONSTER, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) - ), - SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) - ) - ) - ), - Map.of( - ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) - ) - )) - .precipitation(true).temperature(0.5F).downfall(1) - // .category(Biome.Category.FOREST) - .build(); - } - - private static Biome createAutumnalTundra() { - return new Biome.Builder() - .effects(createBiomeEffects(0xC0C0FF, 0xffe08a, 0xcef2e2, 0xFFFFFF, 0x8CE6FF, 0xA1EAFF)) - .generationSettings(createGenerationSettings( - getParadiseLostCarvers(), - - merge( - getStandardParadiseLostFeatures(), - Map.of( - GenerationStep.Feature.LAKES, List.of( - TUNDRA_PONDS, - TUNDRA_SNOW - ), - GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( - GENERIC_BOULDER - ), - GenerationStep.Feature.FLUID_SPRINGS, List.of( - WATER_SPRING - ), - GenerationStep.Feature.VEGETAL_DECORATION, List.of( - TUNDRA_SPIRES, - TUNDRA_FOLIAGE, - MIXED_TREES - ), - GenerationStep.Feature.TOP_LAYER_MODIFICATION, List.of( - MiscPlacedFeatures.FREEZE_TOP_LAYER - ) - ) - ) - )) - .spawnSettings(createSpawnSettings( - merge( - Map.of( - SpawnGroup.MONSTER, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) - ), - SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) - ) - ) - ), - Map.of( - ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) - ) - )) - .precipitation(Biome.Precipitation.RAIN).temperature(0.1F).downfall(2) - // .category(Biome.Category.TAIGA) - .build(); - } - - private static Biome createContinentalPlateau() { - return new Biome.Builder() - .effects(createBiomeEffects(0xC0C0FF, 0xffe08a, 0xcef2e2, 0xFFFFFF, 0x8CE6FF, 0xA1EAFF)) - .generationSettings(createGenerationSettings( - getParadiseLostCarvers(), - - merge( - getStandardParadiseLostFeatures(), - Map.of( - GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( - PLAINS_BOULDER - ), - GenerationStep.Feature.FLUID_SPRINGS, List.of( - WATER_SPRING - ), - GenerationStep.Feature.VEGETAL_DECORATION, List.of( - FLOWERS, - GRASS, - TALL_GRASS, - PATCH_BLACKCURRANT, - PLATEAU_FOLIAGE, - PLATEAU_SHAMROCK, - PLATEAU_FLOWERING_GRASS, - PLATEAU_TREES - ) - ) - ) - )) - .spawnSettings(createSpawnSettings( - merge( - Map.of( - SpawnGroup.MONSTER, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) - ), - SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) - ) - ) - ), - Map.of( - ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) - ) - )) - .precipitation(Biome.Precipitation.RAIN).temperature(0.25F).downfall(0) - .build(); - } - - private static Biome createHighlandsShield() { - return new Biome.Builder() - .effects(createBiomeEffects(0xC0C0FF, 0xfae05f, 0xaef5d6, 0xFFFFFF, 0x58E5FF, 0x63E7FF)) - .generationSettings(createGenerationSettings( - getParadiseLostCarvers(), - - merge( - getStandardParadiseLostFeatures(), - Map.of( - GenerationStep.Feature.LAKES, List.of( - SHIELD_PONDS - ), - GenerationStep.Feature.LOCAL_MODIFICATIONS, List.of( - GENERIC_BOULDER - ), - GenerationStep.Feature.FLUID_SPRINGS, List.of( - WATER_SPRING - ), - GenerationStep.Feature.VEGETAL_DECORATION, List.of( - SHIELD_STUMPS, - SHIELD_HOLLOW_STUMPS, - MOTTLED_FALLEN_LOG, - MOTTLED_HOLLOW_FALLEN_LOG, - FLOWERS, - SHIELD_FLAX, - SHIELD_NETTLES, - SHIELD_FOLIAGE, - GRASS, - TALL_GRASS, - WATER_SPRING, - SHIELD_TREES, - DENSE_SHIELD_TREES, - SHIELD_ROCKS, - SHIELD_FALLEN_LEAVES - ) - ) - ) - )) - .spawnSettings(createSpawnSettings( - merge( - Map.of( - SpawnGroup.MONSTER, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.ENVOY, 50, 1, 3) - ), - SpawnGroup.CREATURE, List.of( - new SpawnSettings.SpawnEntry(ParadiseLostEntityTypes.MOA, 6, 5, 13) - ) - ) - ), - Map.of( - ParadiseLostEntityTypes.ENVOY, SpawnCost.of(1.0, 0.5) - ) - )) - .precipitation(Biome.Precipitation.RAIN).temperature(0.35F).downfall(2) - .build(); - } - - private record SpawnCost( - double charge, - double energyBudget - ) { - static SpawnCost of(double charge, double energyBudget) { - return new SpawnCost(charge, energyBudget); - } - } } diff --git a/src/main/java/net/id/paradiselost/world/feature/ParadiseLostFeatures.java b/src/main/java/net/id/paradiselost/world/feature/ParadiseLostFeatures.java index 35411a62d..4536fb91e 100644 --- a/src/main/java/net/id/paradiselost/world/feature/ParadiseLostFeatures.java +++ b/src/main/java/net/id/paradiselost/world/feature/ParadiseLostFeatures.java @@ -5,7 +5,6 @@ import net.id.paradiselost.world.feature.configured_features.ParadiseLostConfiguredFeatures; import net.id.paradiselost.world.feature.features.*; import net.id.paradiselost.world.feature.placed_features.ParadiseLostPlacedFeatures; -import net.id.paradiselost.world.feature.placement_modifiers.ParadiseLostPlacementModifiers; import net.id.paradiselost.world.feature.structure.ParadiseLostStructureFeatures; import net.id.paradiselost.world.feature.tree.ParadiseLostTreeHell; import net.minecraft.registry.Registries; @@ -41,7 +40,6 @@ public static void init() { ParadiseLostTreeHell.init(); ParadiseLostStructureFeatures.init(); ParadiseLostConfiguredFeatures.init(); - ParadiseLostPlacementModifiers.init(); ParadiseLostPlacedFeatures.init(); } } diff --git a/src/main/java/net/id/paradiselost/world/feature/configured_features/ParadiseLostVegetationConfiguredFeatures.java b/src/main/java/net/id/paradiselost/world/feature/configured_features/ParadiseLostVegetationConfiguredFeatures.java index d0db74995..0b0832e59 100644 --- a/src/main/java/net/id/paradiselost/world/feature/configured_features/ParadiseLostVegetationConfiguredFeatures.java +++ b/src/main/java/net/id/paradiselost/world/feature/configured_features/ParadiseLostVegetationConfiguredFeatures.java @@ -1,28 +1,7 @@ package net.id.paradiselost.world.feature.configured_features; -import net.id.paradiselost.blocks.ParadiseLostBlocks; -import net.id.paradiselost.world.feature.ParadiseLostFeatures; -import net.id.paradiselost.world.feature.configs.ProjectedOrganicCoverConfig; -import net.id.paradiselost.world.feature.placed_features.ParadiseLostPlacedFeatures; -import net.minecraft.block.BlockState; -import net.minecraft.block.CropBlock; import net.minecraft.registry.RegistryKey; -import net.minecraft.state.property.Properties; -import net.minecraft.util.collection.DataPool; -import net.minecraft.util.math.Direction; -import net.minecraft.util.math.Vec3i; -import net.minecraft.util.math.intprovider.ConstantIntProvider; -import net.minecraft.util.math.intprovider.UniformIntProvider; -import net.minecraft.util.registry.RegistryEntry; -import net.minecraft.world.gen.blockpredicate.BlockPredicate; import net.minecraft.world.gen.feature.*; -import net.minecraft.world.gen.placementmodifier.BlockFilterPlacementModifier; -import net.minecraft.world.gen.stateprovider.BlockStateProvider; -import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; - -import java.util.List; - -import static net.id.paradiselost.blocks.ParadiseLostBlocks.*; public class ParadiseLostVegetationConfiguredFeatures extends ParadiseLostConfiguredFeatures { diff --git a/src/main/java/net/id/paradiselost/world/feature/placed_features/ParadiseLostMiscPlacedFeatures.java b/src/main/java/net/id/paradiselost/world/feature/placed_features/ParadiseLostMiscPlacedFeatures.java index 80e87a021..f3ace4b3f 100644 --- a/src/main/java/net/id/paradiselost/world/feature/placed_features/ParadiseLostMiscPlacedFeatures.java +++ b/src/main/java/net/id/paradiselost/world/feature/placed_features/ParadiseLostMiscPlacedFeatures.java @@ -1,47 +1,35 @@ package net.id.paradiselost.world.feature.placed_features; -import net.id.paradiselost.world.feature.configured_features.ParadiseLostMiscConfiguredFeatures; -import net.id.paradiselost.world.feature.placement_modifiers.ChancePlacementModifier; import net.minecraft.registry.RegistryKey; -import net.minecraft.util.math.intprovider.UniformIntProvider; -import net.minecraft.world.Heightmap; -import net.minecraft.world.gen.YOffset; -import net.minecraft.world.gen.feature.ConfiguredFeature; import net.minecraft.world.gen.feature.PlacedFeature; -import net.minecraft.world.gen.feature.PlacedFeatures; -import net.minecraft.world.gen.placementmodifier.*; public class ParadiseLostMiscPlacedFeatures extends ParadiseLostPlacedFeatures { - /* - Highlands - */ + // Default - public static final RegistryEntry GENERIC_BOULDER = register("generic_boulder", ParadiseLostMiscConfiguredFeatures.GENERIC_BOULDER, ChancePlacementModifier.of(15), CountMultilayerPlacementModifier.of(1), CountPlacementModifier.of(UniformIntProvider.create(0, 1))); - public static final RegistryEntry PLAINS_BOULDER = register("plains_boulder", ParadiseLostMiscConfiguredFeatures.PLAINS_BOULDER, ChancePlacementModifier.of(8), CountMultilayerPlacementModifier.of(1)); - public static final RegistryEntry THICKET_BOULDER = register("thicket_boulder", ParadiseLostMiscConfiguredFeatures.THICKET_BOULDER, ChancePlacementModifier.of(2), CountMultilayerPlacementModifier.of(1), CountPlacementModifier.of(UniformIntProvider.create(0, 2))); - public static final RegistryEntry GOLDEN_BOULDER = register("golden_boulder", ParadiseLostMiscConfiguredFeatures.GOLDEN_BOULDER, ChancePlacementModifier.of(30), CountMultilayerPlacementModifier.of(1)); + public static final RegistryKey GENERIC_BOULDER = of("generic_boulder"); + public static final RegistryKey PLAINS_BOULDER = of("plains_boulder"); + public static final RegistryKey THICKET_BOULDER = of("thicket_boulder"); + public static final RegistryKey GOLDEN_BOULDER = of("golden_boulder"); - public static final RegistryEntry WATER_SPRING = register("water_spring", ParadiseLostMiscConfiguredFeatures.WATER_SPRING); + public static final RegistryKey WATER_SPRING = of("spring_water"); - public static final RegistryEntry HELIOLITH_BLOB = register("heliolith_blob", ParadiseLostMiscConfiguredFeatures.HELIOLITH_BLOB, CountPlacementModifier.of(3), SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.aboveBottom(320)), BiomePlacementModifier.of()); - public static final RegistryEntry LEVITA_BLOB = register("levita_blob", ParadiseLostMiscConfiguredFeatures.LEVITA_BLOB, CountPlacementModifier.of(1), SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.aboveBottom(0), YOffset.aboveBottom(320)), BiomePlacementModifier.of()); + public static final RegistryKey HELIOLITH_BLOB = of("heliolith_blob"); + public static final RegistryKey LEVITA_BLOB = of("levita_blob"); - public static final RegistryEntry ORE_CHERINE = register("ore_cherine", ParadiseLostMiscConfiguredFeatures.ORE_CHERINE, CountPlacementModifier.of(20), SquarePlacementModifier.of(), HeightRangePlacementModifier.trapezoid(YOffset.aboveBottom(0), YOffset.aboveBottom(320)), BiomePlacementModifier.of()); - public static final RegistryEntry ORE_OLVITE = register("ore_olvite", ParadiseLostMiscConfiguredFeatures.ORE_OLVITE, CountPlacementModifier.of(16), SquarePlacementModifier.of(), HeightRangePlacementModifier.trapezoid(YOffset.aboveBottom(0), YOffset.aboveBottom(384)), BiomePlacementModifier.of()); - public static final RegistryEntry ORE_LEVITA = register("ore_levita", ParadiseLostMiscConfiguredFeatures.ORE_LEVITA, CountPlacementModifier.of(6), SquarePlacementModifier.of(), HeightRangePlacementModifier.trapezoid(YOffset.aboveBottom(0), YOffset.aboveBottom(384)), BiomePlacementModifier.of()); - public static final RegistryEntry SURTRUM_METEORITE = register("surtrum_meteorite", ParadiseLostMiscConfiguredFeatures.SURTRUM_METEORITE, SquarePlacementModifier.of(), HeightRangePlacementModifier.uniform(YOffset.fixed(65), YOffset.fixed(85)), ChancePlacementModifier.of(255)); - // Plato - // Shield - public static final RegistryEntry SHIELD_ROCKS = register("shield_rocks", ParadiseLostMiscConfiguredFeatures.SHIELD_ROCKS, PlacedFeatures.BOTTOM_TO_TOP_RANGE, CountMultilayerPlacementModifier.of(1), CountPlacementModifier.of(UniformIntProvider.create(0, 2))); + public static final RegistryKey ORE_CHERINE = of("ore_cherine"); + public static final RegistryKey ORE_OLVITE = of("ore_olvite"); + public static final RegistryKey ORE_LEVITA = of("ore_levita"); + public static final RegistryKey SURTRUM_METEORITE = of("surtrum_meteorite"); - public static final RegistryEntry SHIELD_PONDS = register("shield_pond", ParadiseLostMiscConfiguredFeatures.SHIELD_PONDS, CountMultilayerPlacementModifier.of(19), HeightmapPlacementModifier.of(Heightmap.Type.WORLD_SURFACE)); + // Shield + public static final RegistryKey SHIELD_ROCKS = of("shield_rocks"); + public static final RegistryKey SHIELD_PONDS = of("shield_pond"); // Tundra - public static final RegistryEntry TUNDRA_SPIRES = register("tundra_spires", ParadiseLostMiscConfiguredFeatures.TUNDRA_SPIRES, ChancePlacementModifier.of(14), CountMultilayerPlacementModifier.of(1), CountPlacementModifier.of(UniformIntProvider.create(0, 10))); + public static final RegistryKey TUNDRA_SPIRES = of("tundra_spires"); + public static final RegistryKey TUNDRA_PONDS = of("tundra_pond"); + public static final RegistryKey TUNDRA_SNOW = of("tundra_snow"); - public static final RegistryEntry TUNDRA_PONDS = register("tundra_pond", ParadiseLostMiscConfiguredFeatures.TUNDRA_PONDS, CountMultilayerPlacementModifier.of(1), CountPlacementModifier.of(UniformIntProvider.create(0, 1))); - public static final RegistryEntry TUNDRA_SNOW = register("tundra_snow", ParadiseLostMiscConfiguredFeatures.TUNDRA_SNOW, CountMultilayerPlacementModifier.of(2), CountPlacementModifier.of(UniformIntProvider.create(0, 2))); + public static void init() {} - public static void init() { - } } diff --git a/src/main/java/net/id/paradiselost/world/gen/carver/CloudCarver.java b/src/main/java/net/id/paradiselost/world/gen/carver/CloudCarver.java index 6fdd11932..6d0a0551c 100644 --- a/src/main/java/net/id/paradiselost/world/gen/carver/CloudCarver.java +++ b/src/main/java/net/id/paradiselost/world/gen/carver/CloudCarver.java @@ -13,6 +13,7 @@ import net.minecraft.world.gen.carver.CarverContext; import net.minecraft.world.gen.carver.CarvingMask; import net.minecraft.world.gen.chunk.AquiferSampler; +import net.minecraft.world.gen.stateprovider.SimpleBlockStateProvider; import org.jetbrains.annotations.Nullable; import java.util.function.Function; @@ -165,6 +166,6 @@ public boolean shouldCarve(CloudCarverConfig config, Random random) { @Nullable @Override protected BlockState getState(CarverContext context, CloudCarverConfig config, BlockPos pos, AquiferSampler sampler) { - return config.cloudState; + return config.cloudState.get(null, pos); } } diff --git a/src/main/java/net/id/paradiselost/world/gen/carver/CloudCarverConfig.java b/src/main/java/net/id/paradiselost/world/gen/carver/CloudCarverConfig.java index 9a25f26e0..61c2f4336 100644 --- a/src/main/java/net/id/paradiselost/world/gen/carver/CloudCarverConfig.java +++ b/src/main/java/net/id/paradiselost/world/gen/carver/CloudCarverConfig.java @@ -14,6 +14,7 @@ import net.minecraft.world.gen.carver.CarverConfig; import net.minecraft.world.gen.carver.CarverDebugConfig; import net.minecraft.world.gen.heightprovider.HeightProvider; +import net.minecraft.world.gen.stateprovider.BlockStateProvider; public class CloudCarverConfig extends CarverConfig { public static final Codec CODEC = RecordCodecBuilder.create((instance) -> { @@ -23,7 +24,7 @@ public class CloudCarverConfig extends CarverConfig { return carverConfig.horizontalRadiusMultiplier; }), FloatProvider.VALUE_CODEC.fieldOf("vertical_radius_multiplier").forGetter((carverConfig) -> { return carverConfig.verticalRadiusMultiplier; - }), BlockState.CODEC.fieldOf("cloud_block").forGetter((cloudCarverConfig -> { + }), BlockStateProvider.TYPE_CODEC.fieldOf("cloud_block").forGetter((cloudCarverConfig -> { return cloudCarverConfig.cloudState; })), FloatProvider.VALUE_CODEC.fieldOf("yaw_multiplier").forGetter((carverConfig) -> { return carverConfig.yawMultiplier; @@ -48,9 +49,9 @@ public class CloudCarverConfig extends CarverConfig { public final IntProvider sizeMultiplier; public final FloatProvider maxYaw; public final IntProvider engorgementChance; - public final BlockState cloudState; + public final BlockStateProvider cloudState; - public CloudCarverConfig(float probability, HeightProvider y, FloatProvider yScale, YOffset lavaLevel, CarverDebugConfig debugConfig, RegistryEntryList.Named replaceable, FloatProvider horizontalRadiusMultiplier, FloatProvider verticalRadiusMultiplier, BlockState cloudState, FloatProvider yawMultiplier, FloatProvider yawPitchRatio, IntProvider sizeMultiplier, FloatProvider maxYaw, IntProvider engorgementChance, FloatProvider widthMultiplier) { + public CloudCarverConfig(float probability, HeightProvider y, FloatProvider yScale, YOffset lavaLevel, CarverDebugConfig debugConfig, RegistryEntryList.Named replaceable, FloatProvider horizontalRadiusMultiplier, FloatProvider verticalRadiusMultiplier, BlockStateProvider cloudState, FloatProvider yawMultiplier, FloatProvider yawPitchRatio, IntProvider sizeMultiplier, FloatProvider maxYaw, IntProvider engorgementChance, FloatProvider widthMultiplier) { super(probability, y, yScale, lavaLevel, debugConfig, replaceable); this.horizontalRadiusMultiplier = horizontalRadiusMultiplier; this.verticalRadiusMultiplier = verticalRadiusMultiplier; @@ -63,15 +64,15 @@ public CloudCarverConfig(float probability, HeightProvider y, FloatProvider ySca this.cloudState = cloudState; } - public CloudCarverConfig(float probability, HeightProvider y, FloatProvider yScale, YOffset lavaLevel, CarverDebugConfig debugConfig, FloatProvider horizontalRadiusMultiplier, FloatProvider verticalRadiusMultiplier, BlockState cloudState, FloatProvider yawMultiplier, FloatProvider yawPitchRatio, IntProvider sizeMultiplier, FloatProvider maxYaw, IntProvider engorgementChance, FloatProvider widthMultiplier) { + public CloudCarverConfig(float probability, HeightProvider y, FloatProvider yScale, YOffset lavaLevel, CarverDebugConfig debugConfig, FloatProvider horizontalRadiusMultiplier, FloatProvider verticalRadiusMultiplier, BlockStateProvider cloudState, FloatProvider yawMultiplier, FloatProvider yawPitchRatio, IntProvider sizeMultiplier, FloatProvider maxYaw, IntProvider engorgementChance, FloatProvider widthMultiplier) { this(probability, y, yScale, lavaLevel, debugConfig, Registries.BLOCK.getOrCreateEntryList(ParadiseLostBlockTags.CLOUD_CARVER_REPLACEABLES), horizontalRadiusMultiplier, verticalRadiusMultiplier, cloudState, yawMultiplier, yawPitchRatio, sizeMultiplier, maxYaw, engorgementChance, widthMultiplier); } - public CloudCarverConfig(float probability, HeightProvider y, FloatProvider yScale, YOffset lavaLevel, FloatProvider horizontalRadiusMultiplier, FloatProvider verticalRadiusMultiplier, BlockState cloudState, FloatProvider yawMultiplier, FloatProvider yawPitchRatio, IntProvider sizeMultiplier, FloatProvider maxYaw, IntProvider engorgementChance, FloatProvider widthMultiplier) { + public CloudCarverConfig(float probability, HeightProvider y, FloatProvider yScale, YOffset lavaLevel, FloatProvider horizontalRadiusMultiplier, FloatProvider verticalRadiusMultiplier, BlockStateProvider cloudState, FloatProvider yawMultiplier, FloatProvider yawPitchRatio, IntProvider sizeMultiplier, FloatProvider maxYaw, IntProvider engorgementChance, FloatProvider widthMultiplier) { this(probability, y, yScale, lavaLevel, CarverDebugConfig.DEFAULT, horizontalRadiusMultiplier, verticalRadiusMultiplier, cloudState, yawMultiplier, yawPitchRatio, sizeMultiplier, maxYaw, engorgementChance, widthMultiplier); } - public CloudCarverConfig(CarverConfig config, FloatProvider horizontalRadiusMultiplier, FloatProvider verticalRadiusMultiplier, BlockState cloudState, FloatProvider yawMultiplier, FloatProvider yawPitchRatio, IntProvider sizeMultiplier, FloatProvider maxYaw, IntProvider engorgementChance, FloatProvider widthMultiplier) { + public CloudCarverConfig(CarverConfig config, FloatProvider horizontalRadiusMultiplier, FloatProvider verticalRadiusMultiplier, BlockStateProvider cloudState, FloatProvider yawMultiplier, FloatProvider yawPitchRatio, IntProvider sizeMultiplier, FloatProvider maxYaw, IntProvider engorgementChance, FloatProvider widthMultiplier) { this(config.probability, config.y, config.yScale, config.lavaLevel, config.debugConfig, horizontalRadiusMultiplier, verticalRadiusMultiplier, cloudState, yawMultiplier, yawPitchRatio, sizeMultiplier, maxYaw, engorgementChance, widthMultiplier); } } diff --git a/src/main/java/net/id/paradiselost/world/gen/carver/ParadiseLostCarvers.java b/src/main/java/net/id/paradiselost/world/gen/carver/ParadiseLostCarvers.java index fa70ff031..2775ae9fa 100644 --- a/src/main/java/net/id/paradiselost/world/gen/carver/ParadiseLostCarvers.java +++ b/src/main/java/net/id/paradiselost/world/gen/carver/ParadiseLostCarvers.java @@ -4,44 +4,31 @@ import net.id.paradiselost.blocks.ParadiseLostBlocks; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; -import net.minecraft.registry.entry.RegistryEntry; -import net.minecraft.util.math.floatprovider.ConstantFloatProvider; -import net.minecraft.util.math.floatprovider.UniformFloatProvider; -import net.minecraft.util.math.intprovider.ConstantIntProvider; -import net.minecraft.util.math.intprovider.UniformIntProvider; -import net.minecraft.world.gen.YOffset; import net.minecraft.world.gen.carver.Carver; import net.minecraft.world.gen.carver.CarverConfig; -import net.minecraft.world.gen.carver.ConfiguredCarver; -import net.minecraft.world.gen.heightprovider.UniformHeightProvider; @SuppressWarnings("unused") public class ParadiseLostCarvers { public static final Carver CLOUD_CARVER = register("cloud_carver", new CloudCarver(CloudCarverConfig.CODEC)); - // public static final ConfiguredCarver GIANT_COLD_CLOUD_CARVER = register("cold_CLOUD_giant", CLOUD_CARVER.configure(new CloudCarverConfig(0.00105F, UniformHeightProvider.create(YOffset.aboveBottom(112), YOffset.fixed(240)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(32), UniformFloatProvider.create(1.0F, 1.75F), UniformFloatProvider.create(0.6F, 1.0F), ParadiseLostBlocks.COLD_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.0125F), UniformFloatProvider.create(0.35F, 0.65F), UniformIntProvider.create(12, 18), ConstantFloatProvider.create(1), ConstantIntProvider.create(10), ConstantFloatProvider.create(2.75F)))); - public static final RegistryEntry> LARGE_COLD_CLOUD_CARVER = register("large_cold_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.0003F, UniformHeightProvider.create(YOffset.fixed(260), YOffset.fixed(340)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(32), UniformFloatProvider.create(1.0F, 2.15F), UniformFloatProvider.create(0.6F, 1.0F), ParadiseLostBlocks.COLD_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.1F), UniformFloatProvider.create(0.285F, 0.45F), UniformIntProvider.create(8, 9), ConstantFloatProvider.create(0.3F), ConstantIntProvider.create(16), ConstantFloatProvider.create(1F)))); - public static final RegistryEntry> COLD_CLOUD_CARVER = register("cold_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.0105F, UniformHeightProvider.create(YOffset.aboveBottom(4), YOffset.fixed(112)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(0), UniformFloatProvider.create(0.3F, 0.75F), UniformFloatProvider.create(0.36F, 0.6F), ParadiseLostBlocks.COLD_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.15F), UniformFloatProvider.create(0.285F, 0.45F), UniformIntProvider.create(3, 4), ConstantFloatProvider.create(2), ConstantIntProvider.create(3), ConstantFloatProvider.create(0.25F)))); - public static final RegistryEntry> TINY_COLD_CLOUD_CARVER = register("tiny_cold_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.01F, UniformHeightProvider.create(YOffset.aboveBottom(100), YOffset.fixed(260)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(0), UniformFloatProvider.create(0.3F, 0.75F), UniformFloatProvider.create(0.36F, 0.6F), ParadiseLostBlocks.COLD_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.15F), UniformFloatProvider.create(0.785F, 1.25F), UniformIntProvider.create(1, 2), ConstantFloatProvider.create(3), ConstantIntProvider.create(1), ConstantFloatProvider.create(0.065F)))); - - public static final RegistryEntry> LARGE_BLUE_CLOUD_CARVER = register("large_blue_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.001F, UniformHeightProvider.create(YOffset.fixed(230), YOffset.fixed(310)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(32), UniformFloatProvider.create(5.48F, 6.75F), UniformFloatProvider.create(0.3F, 0.5F), ParadiseLostBlocks.BLUE_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.233F), UniformFloatProvider.create(0.285F, 0.35F), UniformIntProvider.create(6, 7), ConstantFloatProvider.create(0.6F), ConstantIntProvider.create(16), ConstantFloatProvider.create(1F)))); - public static final RegistryEntry> BLUE_CLOUD_CARVER = register("blue_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.007F, UniformHeightProvider.create(YOffset.aboveBottom(4), YOffset.fixed(32)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(0), UniformFloatProvider.create(0.5F, 1.25F), UniformFloatProvider.create(0.6F, 1.0F), ParadiseLostBlocks.BLUE_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.175F), UniformFloatProvider.create(0.15F, 0.3F), UniformIntProvider.create(3, 4), ConstantFloatProvider.create(2), ConstantIntProvider.create(3), ConstantFloatProvider.create(0.25F)))); - public static final RegistryEntry> TINY_BLUE_CLOUD_CARVER = register("tiny_blue_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.009F, UniformHeightProvider.create(YOffset.aboveBottom(100), YOffset.fixed(260)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(0), UniformFloatProvider.create(0.3F, 0.75F), UniformFloatProvider.create(0.36F, 0.6F), ParadiseLostBlocks.BLUE_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.15F), UniformFloatProvider.create(0.785F, 1.25F), UniformIntProvider.create(1, 2), ConstantFloatProvider.create(3), ConstantIntProvider.create(1), ConstantFloatProvider.create(0.065F)))); - - public static final RegistryEntry> LARGE_GOLDEN_CLOUD_CARVER = register("large_golden_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.0006F, UniformHeightProvider.create(YOffset.fixed(290), YOffset.fixed(360)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(32), UniformFloatProvider.create(1.6F, 2.0F), UniformFloatProvider.create(1.5F, 1.85F), ParadiseLostBlocks.GOLDEN_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.322F), UniformFloatProvider.create(0.585F, 0.75F), UniformIntProvider.create(7, 9), ConstantFloatProvider.create(0.4F), ConstantIntProvider.create(16), ConstantFloatProvider.create(1F)))); - public static final RegistryEntry> GOLDEN_CLOUD_CARVER = register("golden_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.0085F, UniformHeightProvider.create(YOffset.aboveBottom(14), YOffset.fixed(68)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(32), UniformFloatProvider.create(0.5F, 1.25F), UniformFloatProvider.create(0.6F, 1.0F), ParadiseLostBlocks.GOLDEN_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.225F), UniformFloatProvider.create(0.35F, 0.5F), UniformIntProvider.create(2, 5), ConstantFloatProvider.create(1.5F), ConstantIntProvider.create(3), ConstantFloatProvider.create(0.35F)))); - public static final RegistryEntry> TINY_GOLDEN_CLOUD_CARVER = register("tiny_golden_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.00875F, UniformHeightProvider.create(YOffset.aboveBottom(100), YOffset.fixed(260)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(0), UniformFloatProvider.create(0.3F, 0.75F), UniformFloatProvider.create(0.36F, 0.6F), ParadiseLostBlocks.GOLDEN_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.15F), UniformFloatProvider.create(0.785F, 1.25F), UniformIntProvider.create(1, 2), ConstantFloatProvider.create(3), ConstantIntProvider.create(1), ConstantFloatProvider.create(0.065F)))); +// public static final RegistryEntry> LARGE_COLD_CLOUD_CARVER = register("large_cold_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.0003F, UniformHeightProvider.create(YOffset.fixed(260), YOffset.fixed(340)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(32), UniformFloatProvider.create(1.0F, 2.15F), UniformFloatProvider.create(0.6F, 1.0F), ParadiseLostBlocks.COLD_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.1F), UniformFloatProvider.create(0.285F, 0.45F), UniformIntProvider.create(8, 9), ConstantFloatProvider.create(0.3F), ConstantIntProvider.create(16), ConstantFloatProvider.create(1F)))); +// public static final RegistryEntry> COLD_CLOUD_CARVER = register("cold_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.0105F, UniformHeightProvider.create(YOffset.aboveBottom(4), YOffset.fixed(112)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(0), UniformFloatProvider.create(0.3F, 0.75F), UniformFloatProvider.create(0.36F, 0.6F), ParadiseLostBlocks.COLD_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.15F), UniformFloatProvider.create(0.285F, 0.45F), UniformIntProvider.create(3, 4), ConstantFloatProvider.create(2), ConstantIntProvider.create(3), ConstantFloatProvider.create(0.25F)))); +// public static final RegistryEntry> TINY_COLD_CLOUD_CARVER = register("tiny_cold_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.01F, UniformHeightProvider.create(YOffset.aboveBottom(100), YOffset.fixed(260)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(0), UniformFloatProvider.create(0.3F, 0.75F), UniformFloatProvider.create(0.36F, 0.6F), ParadiseLostBlocks.COLD_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.15F), UniformFloatProvider.create(0.785F, 1.25F), UniformIntProvider.create(1, 2), ConstantFloatProvider.create(3), ConstantIntProvider.create(1), ConstantFloatProvider.create(0.065F)))); +// +// public static final RegistryEntry> LARGE_BLUE_CLOUD_CARVER = register("large_blue_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.001F, UniformHeightProvider.create(YOffset.fixed(230), YOffset.fixed(310)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(32), UniformFloatProvider.create(5.48F, 6.75F), UniformFloatProvider.create(0.3F, 0.5F), ParadiseLostBlocks.BLUE_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.233F), UniformFloatProvider.create(0.285F, 0.35F), UniformIntProvider.create(6, 7), ConstantFloatProvider.create(0.6F), ConstantIntProvider.create(16), ConstantFloatProvider.create(1F)))); +// public static final RegistryEntry> BLUE_CLOUD_CARVER = register("blue_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.007F, UniformHeightProvider.create(YOffset.aboveBottom(4), YOffset.fixed(32)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(0), UniformFloatProvider.create(0.5F, 1.25F), UniformFloatProvider.create(0.6F, 1.0F), ParadiseLostBlocks.BLUE_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.175F), UniformFloatProvider.create(0.15F, 0.3F), UniformIntProvider.create(3, 4), ConstantFloatProvider.create(2), ConstantIntProvider.create(3), ConstantFloatProvider.create(0.25F)))); +// public static final RegistryEntry> TINY_BLUE_CLOUD_CARVER = register("tiny_blue_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.009F, UniformHeightProvider.create(YOffset.aboveBottom(100), YOffset.fixed(260)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(0), UniformFloatProvider.create(0.3F, 0.75F), UniformFloatProvider.create(0.36F, 0.6F), ParadiseLostBlocks.BLUE_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.15F), UniformFloatProvider.create(0.785F, 1.25F), UniformIntProvider.create(1, 2), ConstantFloatProvider.create(3), ConstantIntProvider.create(1), ConstantFloatProvider.create(0.065F)))); +// +// public static final RegistryEntry> LARGE_GOLDEN_CLOUD_CARVER = register("large_golden_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.0006F, UniformHeightProvider.create(YOffset.fixed(290), YOffset.fixed(360)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(32), UniformFloatProvider.create(1.6F, 2.0F), UniformFloatProvider.create(1.5F, 1.85F), ParadiseLostBlocks.GOLDEN_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.322F), UniformFloatProvider.create(0.585F, 0.75F), UniformIntProvider.create(7, 9), ConstantFloatProvider.create(0.4F), ConstantIntProvider.create(16), ConstantFloatProvider.create(1F)))); +// public static final RegistryEntry> GOLDEN_CLOUD_CARVER = register("golden_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.0085F, UniformHeightProvider.create(YOffset.aboveBottom(14), YOffset.fixed(68)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(32), UniformFloatProvider.create(0.5F, 1.25F), UniformFloatProvider.create(0.6F, 1.0F), ParadiseLostBlocks.GOLDEN_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.225F), UniformFloatProvider.create(0.35F, 0.5F), UniformIntProvider.create(2, 5), ConstantFloatProvider.create(1.5F), ConstantIntProvider.create(3), ConstantFloatProvider.create(0.35F)))); +// public static final RegistryEntry> TINY_GOLDEN_CLOUD_CARVER = register("tiny_golden_cloud", CLOUD_CARVER.configure(new CloudCarverConfig(0.00875F, UniformHeightProvider.create(YOffset.aboveBottom(100), YOffset.fixed(260)), UniformFloatProvider.create(0.5F, 1.1F), YOffset.aboveBottom(0), UniformFloatProvider.create(0.3F, 0.75F), UniformFloatProvider.create(0.36F, 0.6F), ParadiseLostBlocks.GOLDEN_CLOUD.getDefaultState(), ConstantFloatProvider.create(0.15F), UniformFloatProvider.create(0.785F, 1.25F), UniformIntProvider.create(1, 2), ConstantFloatProvider.create(3), ConstantIntProvider.create(1), ConstantFloatProvider.create(0.065F)))); @SuppressWarnings("unchecked") public static Carver register(String name, Carver carver) { return (Carver) Registry.register(Registries.CARVER, ParadiseLost.locate(name), carver); } - public static RegistryEntry> register(String name, ConfiguredCarver carver) { - return BuiltinRegistries.add(Registries.CONFIGURED_CARVER, ParadiseLost.locate(name), carver); - } + public static void init() {} - public static void init() { - } } diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/autumnal_tundra.json b/src/main/resources/data/paradise_lost/worldgen/biome/autumnal_tundra.json new file mode 100644 index 000000000..cf7ede794 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/biome/autumnal_tundra.json @@ -0,0 +1,87 @@ +{ + "carvers": { + "air": [ + "minecraft:cave", + "paradise_lost:large_cold_cloud" + ] + }, + "downfall": 0.8, + "effects": { + "fog_color": 16777215, + "foliage_color": 16769162, + "grass_color": 13562594, + "music": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "paradise_lost:music.paradise" + }, + "sky_color": 12632319, + "water_color": 9234175, + "water_fog_color": 10611455 + }, + "features": [ + [ + "paradise_lost:surtrum_meteorite" + ], + [ + "paradise_lost:tundra_pond", + "paradise_lost:tundra_snow" + ], + [ + "paradise_lost:generic_boulder" + ], + [], + [], + [], + [ + "paradise_lost:heliolith_blob", + "paradise_lost:levita_blob", + "paradise_lost:ore_cherine", + "paradise_lost:ore_levita", + "paradise_lost:ore_olvite" + ], + [], + [ + "paradise_lost:spring_water" + ], + [ + "paradise_lost:patch_brown_sporecap", + "paradise_lost:patch_pink_sporecap", + "paradise_lost:natural_swedroot", + "paradise_lost:tundra_spires", + "paradise_lost:patch_tundra_foliage", + "paradise_lost:trees_mixed" + ], + [ + "minecraft:freeze_top_layer" + ] + ], + "has_precipitation": true, + "spawn_costs": {}, + "spawners": { + "ambient": [], + "axolotls": [], + "creature": [ + { + "type": "paradise_lost:moa", + "maxCount": 13, + "minCount": 5, + "weight": 6 + } + ], + "misc": [], + "monster": [ + { + "type": "paradise_lost:envoy", + "maxCount": 3, + "minCount": 1, + "weight": 50 + } + ], + "underground_water_creature": [], + "water_ambient": [], + "water_creature": [] + }, + "temperature": 0.1 +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/continental_plateau.json b/src/main/resources/data/paradise_lost/worldgen/biome/continental_plateau.json new file mode 100644 index 000000000..53b4459ee --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/biome/continental_plateau.json @@ -0,0 +1,89 @@ +{ + "carvers": { + "air": [ + "minecraft:cave", + "paradise_lost:large_cold_cloud" + ] + }, + "downfall": 0.8, + "effects": { + "fog_color": 16777215, + "foliage_color": 16769162, + "grass_color": 13562594, + "music": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "paradise_lost:music.paradise" + }, + "sky_color": 12632319, + "water_color": 9234175, + "water_fog_color": 10611455 + }, + "features": [ + [ + "paradise_lost:surtrum_meteorite" + ], + [], + [ + "paradise_lost:plains_boulder" + ], + [], + [], + [], + [ + "paradise_lost:heliolith_blob", + "paradise_lost:levita_blob", + "paradise_lost:ore_cherine", + "paradise_lost:ore_levita", + "paradise_lost:ore_olvite" + ], + [], + [ + "paradise_lost:spring_water" + ], + [ + "paradise_lost:patch_brown_sporecap", + "paradise_lost:patch_pink_sporecap", + "paradise_lost:natural_swedroot", + "paradise_lost:patch_flowers", + "paradise_lost:patch_grass", + "paradise_lost:patch_tall_grass", + "paradise_lost:patch_blackcurrant", + "paradise_lost:patch_plateau_foliage", + "paradise_lost:patch_plateau_shamrock", + "paradise_lost:patch_plateau_flowering_grass", + "paradise_lost:trees_plateau" + ], + [ + "minecraft:freeze_top_layer" + ] + ], + "has_precipitation": true, + "spawn_costs": {}, + "spawners": { + "ambient": [], + "axolotls": [], + "creature": [ + { + "type": "paradise_lost:moa", + "maxCount": 13, + "minCount": 5, + "weight": 6 + } + ], + "misc": [], + "monster": [ + { + "type": "paradise_lost:envoy", + "maxCount": 3, + "minCount": 1, + "weight": 50 + } + ], + "underground_water_creature": [], + "water_ambient": [], + "water_creature": [] + }, + "temperature": 0.25 +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/highlands.json b/src/main/resources/data/paradise_lost/worldgen/biome/highlands.json new file mode 100644 index 000000000..ded18d1bc --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/biome/highlands.json @@ -0,0 +1,86 @@ +{ + "carvers": { + "air": [ + "minecraft:cave", + "paradise_lost:large_cold_cloud" + ] + }, + "downfall": 0.8, + "effects": { + "fog_color": 16777215, + "foliage_color": 16769162, + "grass_color": 13562594, + "music": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "paradise_lost:music.paradise" + }, + "sky_color": 12632319, + "water_color": 9234175, + "water_fog_color": 10611455 + }, + "features": [ + [ + "paradise_lost:surtrum_meteorite" + ], + [ + "paradise_lost:plains_boulder" + ], + [], + [], + [], + [], + [ + "paradise_lost:heliolith_blob", + "paradise_lost:levita_blob", + "paradise_lost:ore_cherine", + "paradise_lost:ore_levita", + "paradise_lost:ore_olvite" + ], + [], + [ + "paradise_lost:spring_water" + ], + [ + "paradise_lost:patch_brown_sporecap", + "paradise_lost:patch_pink_sporecap", + "paradise_lost:natural_swedroot", + "paradise_lost:patch_flowers", + "paradise_lost:patch_grass", + "paradise_lost:patch_tall_grass", + "paradise_lost:patch_blackcurrant", + "paradise_lost:trees_sparse" + ], + [ + "minecraft:freeze_top_layer" + ] + ], + "has_precipitation": true, + "spawn_costs": {}, + "spawners": { + "ambient": [], + "axolotls": [], + "creature": [ + { + "type": "paradise_lost:moa", + "maxCount": 13, + "minCount": 5, + "weight": 6 + } + ], + "misc": [], + "monster": [ + { + "type": "paradise_lost:envoy", + "maxCount": 3, + "minCount": 1, + "weight": 50 + } + ], + "underground_water_creature": [], + "water_ambient": [], + "water_creature": [] + }, + "temperature": 0.5 +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_forest.json b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_forest.json new file mode 100644 index 000000000..5a1d105d9 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_forest.json @@ -0,0 +1,86 @@ +{ + "carvers": { + "air": [ + "minecraft:cave", + "paradise_lost:large_cold_cloud" + ] + }, + "downfall": 0.8, + "effects": { + "fog_color": 16777215, + "foliage_color": 16769162, + "grass_color": 13562594, + "music": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "paradise_lost:music.paradise" + }, + "sky_color": 12632319, + "water_color": 9234175, + "water_fog_color": 10611455 + }, + "features": [ + [ + "paradise_lost:surtrum_meteorite" + ], + [], + [], + [], + [], + [], + [ + "paradise_lost:heliolith_blob", + "paradise_lost:levita_blob", + "paradise_lost:ore_cherine", + "paradise_lost:ore_levita", + "paradise_lost:ore_olvite" + ], + [], + [ + "paradise_lost:spring_water" + ], + [ + "paradise_lost:patch_brown_sporecap", + "paradise_lost:patch_pink_sporecap", + "paradise_lost:natural_swedroot", + "paradise_lost:patch_flowers", + "paradise_lost:patch_tall_grass", + "paradise_lost:patch_tundra_foliage", + "paradise_lost:patch_bush", + "paradise_lost:patch_blackcurrant", + "paradise_lost:trees_scattered", + "paradise_lost:fallen_leaves" + ], + [ + "minecraft:freeze_top_layer" + ] + ], + "has_precipitation": true, + "spawn_costs": {}, + "spawners": { + "ambient": [], + "axolotls": [], + "creature": [ + { + "type": "paradise_lost:moa", + "maxCount": 13, + "minCount": 5, + "weight": 6 + } + ], + "misc": [], + "monster": [ + { + "type": "paradise_lost:envoy", + "maxCount": 3, + "minCount": 1, + "weight": 50 + } + ], + "underground_water_creature": [], + "water_ambient": [], + "water_creature": [] + }, + "temperature": 0.5 +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_grand_glade.json b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_grand_glade.json new file mode 100644 index 000000000..1c500f6c8 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_grand_glade.json @@ -0,0 +1,88 @@ +{ + "carvers": { + "air": [ + "minecraft:cave", + "paradise_lost:large_cold_cloud" + ] + }, + "downfall": 0.8, + "effects": { + "fog_color": 16777215, + "foliage_color": 16769162, + "grass_color": 13562594, + "music": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "paradise_lost:music.paradise" + }, + "sky_color": 12632319, + "water_color": 9234175, + "water_fog_color": 10611455 + }, + "features": [ + [ + "paradise_lost:surtrum_meteorite" + ], + [], + [ + "paradise_lost:thicket_boulder" + ], + [], + [], + [], + [ + "paradise_lost:heliolith_blob", + "paradise_lost:levita_blob", + "paradise_lost:ore_cherine", + "paradise_lost:ore_levita", + "paradise_lost:ore_olvite" + ], + [], + [ + "paradise_lost:spring_water" + ], + [ + "paradise_lost:patch_brown_sporecap", + "paradise_lost:patch_pink_sporecap", + "paradise_lost:natural_swedroot", + "paradise_lost:thicket_fallen_log", + "paradise_lost:patch_grass", + "paradise_lost:fallen_leaves", + "paradise_lost:patch_brown_sporecap_common", + "paradise_lost:patch_tall_grass", + "paradise_lost:patch_dense_bush", + "paradise_lost:trees_sparse" + ], + [ + "minecraft:freeze_top_layer" + ] + ], + "has_precipitation": true, + "spawn_costs": {}, + "spawners": { + "ambient": [], + "axolotls": [], + "creature": [ + { + "type": "paradise_lost:moa", + "maxCount": 13, + "minCount": 5, + "weight": 6 + } + ], + "misc": [], + "monster": [ + { + "type": "paradise_lost:envoy", + "maxCount": 3, + "minCount": 1, + "weight": 50 + } + ], + "underground_water_creature": [], + "water_ambient": [], + "water_creature": [] + }, + "temperature": 0.4 +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_shield.json b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_shield.json new file mode 100644 index 000000000..361fe934a --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_shield.json @@ -0,0 +1,97 @@ +{ + "carvers": { + "air": [ + "minecraft:cave", + "paradise_lost:large_cold_cloud" + ] + }, + "downfall": 0.8, + "effects": { + "fog_color": 16777215, + "foliage_color": 16769162, + "grass_color": 13562594, + "music": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "paradise_lost:music.paradise" + }, + "sky_color": 12632319, + "water_color": 9234175, + "water_fog_color": 10611455 + }, + "features": [ + [ + "paradise_lost:surtrum_meteorite" + ], + [ + "paradise_lost:shield_pond" + ], + [ + "paradise_lost:generic_boulder" + ], + [], + [], + [], + [ + "paradise_lost:heliolith_blob", + "paradise_lost:levita_blob", + "paradise_lost:ore_cherine", + "paradise_lost:ore_levita", + "paradise_lost:ore_olvite" + ], + [], + [ + "paradise_lost:spring_water" + ], + [ + "paradise_lost:patch_brown_sporecap", + "paradise_lost:patch_pink_sporecap", + "paradise_lost:natural_swedroot", + + "paradise_lost:shield_stumps", + "paradise_lost:shield_hollow_stumps", + "paradise_lost:mottled_fallen_log", + "paradise_lost:mottled_hollow_fallen_log", + "paradise_lost:patch_flowers", + "paradise_lost:patch_shield_flax", + "paradise_lost:patch_shield_nettles", + "paradise_lost:patch_shield_foliage", + "paradise_lost:patch_grass", + "paradise_lost:patch_tall_grass", + "paradise_lost:trees_shield", + "paradise_lost:trees_dense_shield", + "paradise_lost:shield_rocks" + ], + [ + "minecraft:freeze_top_layer" + ] + ], + "has_precipitation": true, + "spawn_costs": {}, + "spawners": { + "ambient": [], + "axolotls": [], + "creature": [ + { + "type": "paradise_lost:moa", + "maxCount": 13, + "minCount": 5, + "weight": 6 + } + ], + "misc": [], + "monster": [ + { + "type": "paradise_lost:envoy", + "maxCount": 3, + "minCount": 1, + "weight": 50 + } + ], + "underground_water_creature": [], + "water_ambient": [], + "water_creature": [] + }, + "temperature": 0.1 +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/highlands_thicket.json b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_thicket.json new file mode 100644 index 000000000..674b69f0b --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/biome/highlands_thicket.json @@ -0,0 +1,90 @@ +{ + "carvers": { + "air": [ + "minecraft:cave", + "paradise_lost:large_cold_cloud" + ] + }, + "downfall": 0.8, + "effects": { + "fog_color": 16777215, + "foliage_color": 16769162, + "grass_color": 13562594, + "music": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "paradise_lost:music.paradise" + }, + "sky_color": 12632319, + "water_color": 9234175, + "water_fog_color": 10611455 + }, + "features": [ + [ + "paradise_lost:surtrum_meteorite" + ], + [], + [ + "paradise_lost:thicket_boulder", + "paradise_lost:golden_boulder" + ], + [], + [], + [], + [ + "paradise_lost:heliolith_blob", + "paradise_lost:levita_blob", + "paradise_lost:ore_cherine", + "paradise_lost:ore_levita", + "paradise_lost:ore_olvite" + ], + [], + [ + "paradise_lost:spring_water" + ], + [ + "paradise_lost:patch_brown_sporecap", + "paradise_lost:patch_pink_sporecap", + "paradise_lost:natural_swedroot", + "paradise_lost:patch_thicket_shamrock", + "paradise_lost:patch_thicket_liverwort_carpet", + "paradise_lost:patch_grass", + "paradise_lost:fallen_leaves", + "paradise_lost:patch_tall_grass", + "paradise_lost:patch_dense_bush", + "paradise_lost:trees_thicket", + "paradise_lost:trees_thicket_mother_aurel" + ], + [ + "minecraft:freeze_top_layer" + ] + ], + "has_precipitation": true, + "spawn_costs": {}, + "spawners": { + "ambient": [], + "axolotls": [], + "creature": [ + { + "type": "paradise_lost:moa", + "maxCount": 13, + "minCount": 5, + "weight": 6 + } + ], + "misc": [], + "monster": [ + { + "type": "paradise_lost:envoy", + "maxCount": 3, + "minCount": 1, + "weight": 50 + } + ], + "underground_water_creature": [], + "water_ambient": [], + "water_creature": [] + }, + "temperature": 0.4 +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/tradewinds.json b/src/main/resources/data/paradise_lost/worldgen/biome/tradewinds.json new file mode 100644 index 000000000..85e00a636 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/biome/tradewinds.json @@ -0,0 +1,83 @@ +{ + "carvers": { + "air": [ + "minecraft:cave", + "paradise_lost:large_cold_cloud" + ] + }, + "downfall": 0.8, + "effects": { + "fog_color": 16777215, + "foliage_color": 16769162, + "grass_color": 13562594, + "music": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "paradise_lost:music.paradise" + }, + "sky_color": 12632319, + "water_color": 9234175, + "water_fog_color": 10611455 + }, + "features": [ + [ + "paradise_lost:surtrum_meteorite" + ], + [], + [], + [], + [], + [], + [ + "paradise_lost:heliolith_blob", + "paradise_lost:levita_blob", + "paradise_lost:ore_cherine", + "paradise_lost:ore_levita", + "paradise_lost:ore_olvite" + ], + [], + [ + "paradise_lost:spring_water" + ], + [ + "paradise_lost:patch_brown_sporecap", + "paradise_lost:patch_pink_sporecap", + "paradise_lost:natural_swedroot", + "paradise_lost:patch_tall_grass", + "paradise_lost:patch_bush", + "paradise_lost:trees_plateau", + "paradise_lost:trees_sparse" + ], + [ + "minecraft:freeze_top_layer" + ] + ], + "has_precipitation": true, + "spawn_costs": {}, + "spawners": { + "ambient": [], + "axolotls": [], + "creature": [ + { + "type": "paradise_lost:moa", + "maxCount": 13, + "minCount": 5, + "weight": 6 + } + ], + "misc": [], + "monster": [ + { + "type": "paradise_lost:envoy", + "maxCount": 3, + "minCount": 1, + "weight": 50 + } + ], + "underground_water_creature": [], + "water_ambient": [], + "water_creature": [] + }, + "temperature": 0.5 +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/biome/wisteria_woods.json b/src/main/resources/data/paradise_lost/worldgen/biome/wisteria_woods.json new file mode 100644 index 000000000..6c0519f20 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/biome/wisteria_woods.json @@ -0,0 +1,86 @@ +{ + "carvers": { + "air": [ + "minecraft:cave", + "paradise_lost:large_cold_cloud" + ] + }, + "downfall": 0.8, + "effects": { + "fog_color": 16777215, + "foliage_color": 16769162, + "grass_color": 13562594, + "music": { + "max_delay": 24000, + "min_delay": 12000, + "replace_current_music": false, + "sound": "paradise_lost:music.paradise" + }, + "sky_color": 12632319, + "water_color": 9234175, + "water_fog_color": 10611455 + }, + "features": [ + [ + "paradise_lost:surtrum_meteorite" + ], + [], + [], + [], + [], + [], + [ + "paradise_lost:heliolith_blob", + "paradise_lost:levita_blob", + "paradise_lost:ore_cherine", + "paradise_lost:ore_levita", + "paradise_lost:ore_olvite" + ], + [], + [ + "paradise_lost:spring_water" + ], + [ + "paradise_lost:patch_brown_sporecap", + "paradise_lost:patch_pink_sporecap", + "paradise_lost:natural_swedroot", + "paradise_lost:patch_flowers", + "paradise_lost:patch_grass", + "paradise_lost:fallen_rose_leaves", + "paradise_lost:fallen_lavender_leaves", + "paradise_lost:patch_bush", + "paradise_lost:patch_blackcurrant", + "paradise_lost:trees_rainbow_forest" + ], + [ + "minecraft:freeze_top_layer" + ] + ], + "has_precipitation": true, + "spawn_costs": {}, + "spawners": { + "ambient": [], + "axolotls": [], + "creature": [ + { + "type": "paradise_lost:moa", + "maxCount": 13, + "minCount": 5, + "weight": 6 + } + ], + "misc": [], + "monster": [ + { + "type": "paradise_lost:envoy", + "maxCount": 3, + "minCount": 1, + "weight": 50 + } + ], + "underground_water_creature": [], + "water_ambient": [], + "water_creature": [] + }, + "temperature": 0.5 +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/configured_carver/large_cold_cloud.json b/src/main/resources/data/paradise_lost/worldgen/configured_carver/large_cold_cloud.json new file mode 100644 index 000000000..b2081f849 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/configured_carver/large_cold_cloud.json @@ -0,0 +1,76 @@ +{ + "type": "paradise_lost:cloud_carver", + "config": { + "probability": 0.0003, + "y": { + "type": "minecraft:uniform", + "max_inclusive": { + "absolute": 340 + }, + "min_inclusive": { + "absolute": 260 + } + }, + "yScale": { + "type": "minecraft:uniform", + "value": { + "max_exclusive": 1.1, + "min_inclusive": 0.5 + } + }, + "lava_level": { + "above_bottom": 32 + }, + "replaceable": "#minecraft:overworld_carver_replaceables", + "horizontal_radius_multiplier": { + "type": "minecraft:uniform", + "value": { + "max_exclusive": 2.15, + "min_inclusive": 1.0 + } + }, + "vertical_radius_multiplier": { + "type": "minecraft:uniform", + "value": { + "max_exclusive": 1.0, + "min_inclusive": 0.6 + } + }, + "cloud_block": { + "type": "minecraft:simple_state_provider", + "state": { + "Name": "paradise_lost:cold_cloud" + } + }, + "yaw_multiplier": { + "type": "minecraft:constant", + "value": 0.1 + }, + "yaw_pitch_ratio": { + "type": "minecraft:uniform", + "value": { + "max_exclusive": 0.45, + "min_inclusive": 0.285 + } + }, + "size_multiplier": { + "type": "minecraft:uniform", + "value": { + "max_inclusive": 9, + "min_inclusive": 8 + } + }, + "max_yaw": { + "type": "minecraft:constant", + "value": 0.3 + }, + "engorged_chance": { + "type": "minecraft:constant", + "value": 16 + }, + "width_multiplier": { + "type": "minecraft:constant", + "value": 1.0 + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/generic_boulder.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/generic_boulder.json new file mode 100644 index 000000000..37a240202 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/generic_boulder.json @@ -0,0 +1,16 @@ +{ + "feature": "paradise_lost:generic_boulder", + "placement": [ + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:rarity_filter", + "chance": 8 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/golden_boulder.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/golden_boulder.json new file mode 100644 index 000000000..9a99960ed --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/golden_boulder.json @@ -0,0 +1,16 @@ +{ + "feature": "paradise_lost:golden_boulder", + "placement": [ + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:rarity_filter", + "chance": 15 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/heliolith_blob.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/heliolith_blob.json new file mode 100644 index 000000000..4327a5abf --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/heliolith_blob.json @@ -0,0 +1,27 @@ +{ + "feature": "paradise_lost:heliolith_blob", + "placement": [ + { + "type": "minecraft:count", + "count": 3 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:uniform", + "max_inclusive": { + "absolute": 320 + }, + "min_inclusive": { + "absolute": 0 + } + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/levita_blob.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/levita_blob.json new file mode 100644 index 000000000..e025b30ba --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/levita_blob.json @@ -0,0 +1,27 @@ +{ + "feature": "paradise_lost:levita_blob", + "placement": [ + { + "type": "minecraft:count", + "count": 1 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:uniform", + "max_inclusive": { + "absolute": 320 + }, + "min_inclusive": { + "absolute": 0 + } + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/natural_swedroot.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/natural_swedroot.json index b6d393ec9..b6cf3b3f6 100644 --- a/src/main/resources/data/paradise_lost/worldgen/placed_feature/natural_swedroot.json +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/natural_swedroot.json @@ -13,7 +13,7 @@ "height": { "type": "minecraft:uniform", "max_inclusive": { - "above_top": 0 + "below_top": 0 }, "min_inclusive": { "absolute": 80 diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_cherine.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_cherine.json new file mode 100644 index 000000000..669abe75b --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_cherine.json @@ -0,0 +1,27 @@ +{ + "feature": "paradise_lost:ore_cherine", + "placement": [ + { + "type": "minecraft:count", + "count": 20 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:trapezoid", + "max_inclusive": { + "absolute": 320 + }, + "min_inclusive": { + "absolute": 0 + } + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_levita.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_levita.json new file mode 100644 index 000000000..db6125490 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_levita.json @@ -0,0 +1,27 @@ +{ + "feature": "paradise_lost:ore_levita", + "placement": [ + { + "type": "minecraft:count", + "count": 6 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:trapezoid", + "max_inclusive": { + "absolute": 384 + }, + "min_inclusive": { + "absolute": 0 + } + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_olvite.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_olvite.json new file mode 100644 index 000000000..c36fafdee --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/ore_olvite.json @@ -0,0 +1,27 @@ +{ + "feature": "paradise_lost:ore_olvite", + "placement": [ + { + "type": "minecraft:count", + "count": 16 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:trapezoid", + "max_inclusive": { + "absolute": 384 + }, + "min_inclusive": { + "absolute": 0 + } + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/plains_boulder.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/plains_boulder.json new file mode 100644 index 000000000..d64763f32 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/plains_boulder.json @@ -0,0 +1,16 @@ +{ + "feature": "paradise_lost:plains_boulder", + "placement": [ + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:rarity_filter", + "chance": 4 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/shield_pond.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/shield_pond.json new file mode 100644 index 000000000..3cf412181 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/shield_pond.json @@ -0,0 +1,12 @@ +{ + "feature": "paradise_lost:shield_pond", + "placement": [ + { + "type": "minecraft:count_on_every_layer", + "count": 19 + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/shield_rocks.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/shield_rocks.json new file mode 100644 index 000000000..0ced92eb2 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/shield_rocks.json @@ -0,0 +1,28 @@ +{ + "feature": "paradise_lost:shield_rocks", + "placement": [ + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:uniform", + "max_inclusive": { + "below_top": 0 + }, + "min_inclusive": { + "above_bottom": 32 + } + } + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "WORLD_SURFACE_WG" + }, + { + "type": "minecraft:count", + "count": 1 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/spring_water.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/spring_water.json new file mode 100644 index 000000000..2fcb571b7 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/spring_water.json @@ -0,0 +1,27 @@ +{ + "feature": "paradise_lost:spring_water", + "placement": [ + { + "type": "minecraft:count", + "count": 12 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:uniform", + "max_inclusive": { + "absolute": 256 + }, + "min_inclusive": { + "above_bottom": 0 + } + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/surtrum_meteorite.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/surtrum_meteorite.json new file mode 100644 index 000000000..f90b6a53a --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/surtrum_meteorite.json @@ -0,0 +1,27 @@ +{ + "feature": "paradise_lost:surtrum_meteorite", + "placement": [ + { + "type": "minecraft:rarity_filter", + "chance": 255 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:uniform", + "max_inclusive": { + "absolute": 85 + }, + "min_inclusive": { + "absolute": 65 + } + } + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/thicket_boulder.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/thicket_boulder.json new file mode 100644 index 000000000..177c0a6af --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/thicket_boulder.json @@ -0,0 +1,16 @@ +{ + "feature": "paradise_lost:thicket_boulder", + "placement": [ + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "MOTION_BLOCKING" + }, + { + "type": "minecraft:rarity_filter", + "chance": 1 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_pond.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_pond.json new file mode 100644 index 000000000..45c9de8e5 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_pond.json @@ -0,0 +1,12 @@ +{ + "feature": "paradise_lost:tundra_pond", + "placement": [ + { + "type": "minecraft:count_on_every_layer", + "count": 19 + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_snow.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_snow.json new file mode 100644 index 000000000..fcaf335ca --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_snow.json @@ -0,0 +1,12 @@ +{ + "feature": "paradise_lost:tundra_snow", + "placement": [ + { + "type": "minecraft:count_on_every_layer", + "count": 4 + }, + { + "type": "minecraft:biome" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_spires.json b/src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_spires.json new file mode 100644 index 000000000..b35329807 --- /dev/null +++ b/src/main/resources/data/paradise_lost/worldgen/placed_feature/tundra_spires.json @@ -0,0 +1,28 @@ +{ + "feature": "paradise_lost:tundra_spires", + "placement": [ + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:uniform", + "max_inclusive": { + "below_top": 0 + }, + "min_inclusive": { + "above_bottom": 32 + } + } + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:heightmap", + "heightmap": "WORLD_SURFACE_WG" + }, + { + "type": "minecraft:count", + "count": 5 + } + ] +} \ No newline at end of file diff --git a/src/main/resources/paradise_lost.mixins.json b/src/main/resources/paradise_lost.mixins.json index 3fe1634e8..bfbff9d60 100644 --- a/src/main/resources/paradise_lost.mixins.json +++ b/src/main/resources/paradise_lost.mixins.json @@ -36,7 +36,6 @@ "server.ServerPlayNetworkHandlerMixin", "world.gen.structure.JigsawStructureMixin", "world.ExplosionMixin", - "util.DefaultedRegistryMixin", "util.NbtCompoundAccessor", "util.SlotAccessor", "brain.MemoryModuleTypeInvoker",