diff --git a/gradle.properties b/gradle.properties index 78250aa..40d445a 100755 --- a/gradle.properties +++ b/gradle.properties @@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx2G # Fabric Properties # check these on https://fabricmc.net/use - minecraft_version=1.18-pre5 - yarn_mappings=1.18-pre5+build.2 - loader_version=0.12.5 + minecraft_version=1.18.2 + yarn_mappings=1.18.2+build.2 + loader_version=0.13.3 # Mod Properties - mod_version = 1.5.2 + mod_version = 1.6.0 maven_group = eu.midnightdust.motschen archives_base_name = rocks # Dependencies # currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api - fabric_version=0.42.8+1.18 - midnightlib_version=0.3.1 + fabric_version=0.48.0+1.18.2 + midnightlib_version=0.4.0 diff --git a/src/main/java/eu/midnightdust/motschen/rocks/RocksClient.java b/src/main/java/eu/midnightdust/motschen/rocks/RocksClient.java index 451b796..aa527c1 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/RocksClient.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/RocksClient.java @@ -1,14 +1,14 @@ package eu.midnightdust.motschen.rocks; import net.fabricmc.api.ClientModInitializer; -import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry; +import net.minecraft.client.item.ModelPredicateProviderRegistry; import net.minecraft.util.Identifier; public class RocksClient implements ClientModInitializer { @Override public void onInitializeClient() { - FabricModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("red"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("red")) ? 1 : 0); - FabricModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("pink"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("pink")) ? 1 : 0); - FabricModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("orange"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("orange")) ? 1 : 0); + ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("red"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("red")) ? 1 : 0); + ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("pink"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("pink")) ? 1 : 0); + ModelPredicateProviderRegistry.register(RocksMain.Starfish.asItem(), new Identifier("orange"), (stack, world, entity, seed) -> (stack.getNbt() != null && stack.getNbt().getString("variation").equals("orange")) ? 1 : 0); } } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/block/Starfish.java b/src/main/java/eu/midnightdust/motschen/rocks/block/Starfish.java index 95cc264..574921f 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/block/Starfish.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/block/Starfish.java @@ -9,9 +9,6 @@ import net.minecraft.fluid.FluidState; import net.minecraft.fluid.Fluids; import net.minecraft.item.ItemPlacementContext; import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NbtCompound; -import net.minecraft.nbt.NbtElement; -import net.minecraft.nbt.NbtString; import net.minecraft.sound.BlockSoundGroup; import net.minecraft.state.StateManager; import net.minecraft.state.property.BooleanProperty; @@ -62,7 +59,6 @@ public class Starfish extends Block implements Waterloggable { public ItemStack getPickStack(BlockView world, BlockPos pos, BlockState state) { ItemStack stack = new ItemStack(this); stack.getOrCreateNbt().putString("variation", state.get(STARFISH_VARIATION).asString()); - LOGGER.info(state.get(STARFISH_VARIATION).asString()); return stack; } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/OverworldGeyserBlockEntity.java b/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/OverworldGeyserBlockEntity.java index ba45cc2..d0ead7c 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/OverworldGeyserBlockEntity.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/block/blockentity/OverworldGeyserBlockEntity.java @@ -24,7 +24,7 @@ public class OverworldGeyserBlockEntity extends BlockEntity { PlayerEntity player = world.getClosestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 3, true); PlayerEntity player2 = world.getClosestPlayer(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 8, true); - if (player2 != null && player2.getY() >= pos.getY() && (pos.getX() <= player2.getX() && pos.getX() + 1 >= player2.getX()) && (pos.getZ() <= player2.getZ() && pos.getZ() + 1 >= player2.getZ())) { + if (player2 != null && player2.getY() >= pos.getY() && player2.getY() <= pos.getY() + 5 && (pos.getX() <= player2.getX() && pos.getX() + 1 >= player2.getX()) && (pos.getZ() <= player2.getZ() && pos.getZ() + 1 >= player2.getZ())) { player2.addStatusEffect(new StatusEffectInstance(StatusEffects.LEVITATION, 2, 10, true, false, false)); } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/config/RocksConfig.java b/src/main/java/eu/midnightdust/motschen/rocks/config/RocksConfig.java index 7b18083..1445fb9 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/config/RocksConfig.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/config/RocksConfig.java @@ -6,33 +6,33 @@ public class RocksConfig extends MidnightConfig { @Comment public static Comment needs_restart; @Comment public static Comment rocks; - @Entry(name = "block.rocks.rock") public static boolean rock = true; - @Entry(name = "block.rocks.granite_rock") public static boolean granite_rock = true; - @Entry(name = "block.rocks.diorite_rock") public static boolean diorite_rock = true; - @Entry(name = "block.rocks.andesite_rock") public static boolean andesite_rock = true; - @Entry(name = "block.rocks.sand_rock") public static boolean sand_rock = true; - @Entry(name = "block.rocks.red_sand_rock") public static boolean red_sand_rock = true; - @Entry(name = "block.rocks.gravel_rock") public static boolean gravel_rock = true; - @Entry(name = "block.rocks.end_stone_rock") public static boolean end_stone_rock = true; - @Entry(name = "block.rocks.netherrack_rock") public static boolean netherrack_rock = true; - @Entry(name = "block.rocks.soul_soil_rock") public static boolean soul_soil_rock = true; + @Entry(name = "block.rocks.rock") public static int rock_count = 3; + @Entry(name = "block.rocks.granite_rock") public static int granite_rock_count = 3; + @Entry(name = "block.rocks.diorite_rock") public static int diorite_rock_count = 3; + @Entry(name = "block.rocks.andesite_rock") public static int andesite_rock_count = 3; + @Entry(name = "block.rocks.sand_rock") public static int sand_rock_count = 3; + @Entry(name = "block.rocks.red_sand_rock") public static int red_sand_rock_count = 3; + @Entry(name = "block.rocks.gravel_rock") public static int gravel_rock_count = 3; + @Entry(name = "block.rocks.end_stone_rock") public static int end_stone_rock_count = 3; + @Entry(name = "block.rocks.netherrack_rock") public static int netherrack_rock_count = 90; + @Entry(name = "block.rocks.soul_soil_rock") public static int soul_soil_rock_count = 3; @Comment public static Comment sticks; - @Entry(name = "block.rocks.oak_stick") public static boolean oak_stick = true; - @Entry(name = "block.rocks.spruce_stick") public static boolean spruce_stick = true; - @Entry(name = "block.rocks.birch_stick") public static boolean birch_stick = true; - @Entry(name = "block.rocks.acacia_stick") public static boolean acacia_stick = true; - @Entry(name = "block.rocks.jungle_stick") public static boolean jungle_stick = true; - @Entry(name = "block.rocks.dark_oak_stick") public static boolean dark_oak_stick = true; - @Entry(name = "block.rocks.crimson_stick") public static boolean crimson_stick = true; - @Entry(name = "block.rocks.warped_stick") public static boolean warped_stick = true; + @Entry(name = "block.rocks.oak_stick") public static int oak_stick_count = 3; + @Entry(name = "block.rocks.spruce_stick") public static int spruce_stick_count = 3; + @Entry(name = "block.rocks.birch_stick") public static int birch_stick_count = 3; + @Entry(name = "block.rocks.acacia_stick") public static int acacia_stick_count = 3; + @Entry(name = "block.rocks.jungle_stick") public static int jungle_stick_count = 3; + @Entry(name = "block.rocks.dark_oak_stick") public static int dark_oak_stick_count = 3; + @Entry(name = "block.rocks.crimson_stick") public static int crimson_stick_count = 90; + @Entry(name = "block.rocks.warped_stick") public static int warped_stick_count = 90; @Comment public static Comment misc; - @Entry(name = "block.rocks.pinecone") public static boolean pinecone = true; - @Entry(name = "block.rocks.geyser") public static boolean geyser = true; - @Entry(name = "block.rocks.nether_geyser") public static boolean nether_geyser = true; - @Entry(name = "block.rocks.seashell") public static boolean seashell = true; - @Entry(name = "block.rocks.starfish") public static boolean starfish = true; - @Entry public static boolean underwater_seashell = true; - @Entry public static boolean underwater_starfish = true; + @Entry(name = "block.rocks.pinecone") public static int pinecone_count = 3; + @Entry(name = "block.rocks.geyser") public static int geyser_count = 3; + @Entry(name = "block.rocks.nether_geyser") public static int nether_geyser_count = 30; + @Entry(name = "block.rocks.seashell") public static int seashell_count = 1; + @Entry(name = "block.rocks.starfish") public static int starfish_count = 1; + @Entry public static int underwater_seashell_count = 3; + @Entry public static int underwater_starfish_count = 3; } diff --git a/src/main/java/eu/midnightdust/motschen/rocks/item/StarfishItem.java b/src/main/java/eu/midnightdust/motschen/rocks/item/StarfishItem.java deleted file mode 100755 index f0ff848..0000000 --- a/src/main/java/eu/midnightdust/motschen/rocks/item/StarfishItem.java +++ /dev/null @@ -1,13 +0,0 @@ -package eu.midnightdust.motschen.rocks.item; - -import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation; -import net.minecraft.item.Item; - -public class StarfishItem extends Item { - public final StarfishVariation variation; - - public StarfishItem(Settings settings, StarfishVariation variation) { - super(settings); - this.variation = variation; - } -} diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/FeatureInjector.java b/src/main/java/eu/midnightdust/motschen/rocks/world/FeatureInjector.java index ed1da7e..e560569 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/FeatureInjector.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/FeatureInjector.java @@ -1,14 +1,13 @@ package eu.midnightdust.motschen.rocks.world; -import eu.midnightdust.motschen.rocks.config.RocksConfig; import eu.midnightdust.motschen.rocks.world.configured_feature.MiscFeatures; import eu.midnightdust.motschen.rocks.world.configured_feature.NetherFeatures; import eu.midnightdust.motschen.rocks.world.configured_feature.RockFeatures; import eu.midnightdust.motschen.rocks.world.configured_feature.StickFeatures; import net.fabricmc.fabric.api.biome.v1.BiomeModifications; import net.fabricmc.fabric.api.biome.v1.BiomeSelectionContext; +import net.minecraft.tag.BiomeTags; import net.minecraft.util.registry.BuiltinRegistries; -import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.GenerationStep; import java.util.function.Predicate; @@ -17,80 +16,71 @@ public class FeatureInjector { public static void init() { // Rocks - Predicate rocks = (ctx -> { - Biome.Category cat = ctx.getBiome().getCategory(); - return cat != Biome.Category.NETHER && cat != Biome.Category.THEEND && cat!= Biome.Category.BEACH && cat != Biome.Category.DESERT - && cat != Biome.Category.MESA && cat != Biome.Category.ICY && cat != Biome.Category.OCEAN ;}); - if (RocksConfig.rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.ROCK_PLACED_FEATURE).get()); - if (RocksConfig.granite_rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.GRANITE_ROCK_PLACED_FEATURE).get()); - if (RocksConfig.diorite_rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.DIORITE_ROCK_PLACED_FEATURE).get()); - if (RocksConfig.andesite_rock) BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.ANDESITE_ROCK_PLACED_FEATURE).get()); + Predicate rocks = (ctx -> + !ctx.hasTag(BiomeTags.IS_NETHER) && !ctx.hasTag(BiomeTags.END_CITY_HAS_STRUCTURE) && !ctx.hasTag(BiomeTags.IS_BEACH) && !ctx.hasTag(BiomeTags.DESERT_PYRAMID_HAS_STRUCTURE) + && !ctx.hasTag(BiomeTags.IS_BADLANDS) && !ctx.hasTag(BiomeTags.IGLOO_HAS_STRUCTURE) && !ctx.hasTag(BiomeTags.IS_OCEAN)); + BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.ROCK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.GRANITE_ROCK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.DIORITE_ROCK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.ANDESITE_ROCK_PLACED_FEATURE).get()); - Predicate sand_rocks = (ctx -> { - Biome.Category cat = ctx.getBiome().getCategory(); - return cat == Biome.Category.BEACH || cat == Biome.Category.DESERT || cat == Biome.Category.MESA || ctx.getBiomeKey().getValue().toString().contains("terrestria:lush_desert"); - }); - if (RocksConfig.sand_rock) BiomeModifications.addFeature(sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.SAND_ROCK_PLACED_FEATURE).get()); + Predicate sand_rocks = (ctx -> ctx.hasTag(BiomeTags.IS_BEACH) || ctx.hasTag(BiomeTags.DESERT_PYRAMID_HAS_STRUCTURE) || ctx.hasTag(BiomeTags.IS_BADLANDS) || ctx.getBiomeKey().getValue().toString().contains("terrestria:lush_desert")); + BiomeModifications.addFeature(sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.SAND_ROCK_PLACED_FEATURE).get()); - Predicate red_sand_rocks = (ctx -> { - Biome.Category cat = ctx.getBiome().getCategory(); - return cat == Biome.Category.MESA || cat == Biome.Category.DESERT || ctx.getBiomeKey().getValue().toString().contains("terrestria:lush_desert"); - }); - if (RocksConfig.red_sand_rock) BiomeModifications.addFeature(red_sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.RED_SAND_ROCK_PLACED_FEATURE).get()); + Predicate red_sand_rocks = (ctx -> ctx.hasTag(BiomeTags.IS_BADLANDS) || ctx.hasTag(BiomeTags.DESERT_PYRAMID_HAS_STRUCTURE) || ctx.getBiomeKey().getValue().toString().contains("terrestria:lush_desert")); - if (RocksConfig.end_stone_rock) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.THEEND, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.END_STONE_ROCK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(red_sand_rocks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.RED_SAND_ROCK_PLACED_FEATURE).get()); + + BiomeModifications.addFeature(ctx -> ctx.getBiomeKey().getValue().toString().contains("the_end"), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.END_STONE_ROCK_PLACED_FEATURE).get()); // Sticks Predicate oak_sticks = (ctx -> { String name = ctx.getBiomeKey().getValue().toString(); - Biome.Category cat = ctx.getBiome().getCategory(); return name.contains("minecraft:forest") || name.contains("minecraft:wooded_hills") || name.contains("oak") || name.contains("minecraft:wooded_mountains") || name.contains("minecraft:plains") || name.contains("minecraft:flower_forest") || name.contains("minecraft:wooded_badlands_plateau") || - name.contains("minecraft:modified_wooded_badlands_plateau") || cat == Biome.Category.SWAMP;}); - if (RocksConfig.oak_stick) BiomeModifications.addFeature(oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.OAK_STICK_PLACED_FEATURE).get()); + name.contains("minecraft:modified_wooded_badlands_plateau") || ctx.hasTag(BiomeTags.SWAMP_HUT_HAS_STRUCTURE);}); + BiomeModifications.addFeature(oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.OAK_STICK_PLACED_FEATURE).get()); Predicate birch_sticks = (ctx -> { String name = ctx.getBiomeKey().getValue().toString(); return name.contains("minecraft:forest") || name.contains("birch") || name.contains("minecraft:flower_forest");}); - if (RocksConfig.birch_stick) BiomeModifications.addFeature(birch_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.BIRCH_STICK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(birch_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.BIRCH_STICK_PLACED_FEATURE).get()); Predicate spruce_sticks = (ctx -> { String name = ctx.getBiomeKey().getValue().toString(); - Biome.Category cat = ctx.getBiome().getCategory(); - return name.contains("minecraft:wooded_mountains") || cat == Biome.Category.TAIGA;}); - if (RocksConfig.spruce_stick) BiomeModifications.addFeature(spruce_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.SPRUCE_STICK_PLACED_FEATURE).get()); + return name.contains("minecraft:wooded_mountains") || ctx.hasTag(BiomeTags.IS_TAIGA);}); + BiomeModifications.addFeature(spruce_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.SPRUCE_STICK_PLACED_FEATURE).get()); - if (RocksConfig.acacia_stick) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.SAVANNA, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.ACACIA_STICK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.VILLAGE_SAVANNA_HAS_STRUCTURE), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.ACACIA_STICK_PLACED_FEATURE).get()); - if (RocksConfig.jungle_stick) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.JUNGLE, GenerationStep.Feature.UNDERGROUND_DECORATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.JUNGLE_STICK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_JUNGLE), GenerationStep.Feature.UNDERGROUND_DECORATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.JUNGLE_STICK_PLACED_FEATURE).get()); Predicate dark_oak_sticks = (ctx -> { String name = ctx.getBiomeKey().getValue().toString(); return name.contains("minecraft:dark_forest") || name.contains("minecraft:dark_forest_hills") || name.contains("minecraft:dark_forest_mountains");}); - if (RocksConfig.dark_oak_stick) BiomeModifications.addFeature(dark_oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.DARK_OAK_STICK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(dark_oak_sticks, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(StickFeatures.DARK_OAK_STICK_PLACED_FEATURE).get()); // Misc Predicate beach = (ctx -> { String name = ctx.getBiomeKey().getValue().toString(); - Biome.Category cat = ctx.getBiome().getCategory(); - return cat == Biome.Category.BEACH && !name.contains("snow");}); - if (RocksConfig.seashell) BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.SEASHELL_PLACED_FEATURE).get()); - if (RocksConfig.starfish) BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.STARFISH_PLACED_FEATURE).get()); + return ctx.hasTag(BiomeTags.IS_BEACH) && !name.contains("snow");}); + BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.SEASHELL_PLACED_FEATURE).get()); + BiomeModifications.addFeature(beach, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.STARFISH_PLACED_FEATURE).get()); - if (RocksConfig.underwater_starfish) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.OCEAN, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.UNDERWATER_STARFISH_PLACED_FEATURE).get()); - if (RocksConfig.underwater_seashell) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.OCEAN, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.UNDERWATER_SEASHELL_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_OCEAN), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.UNDERWATER_STARFISH_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_OCEAN), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.UNDERWATER_SEASHELL_PLACED_FEATURE).get()); - if (RocksConfig.netherrack_rock) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHERRACK_ROCK_PLACED_FEATURE).get()); - if (RocksConfig.soul_soil_rock) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.SOUL_SOIL_ROCK_PLACED_FEATURE).get()); - if (RocksConfig.gravel_rock) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHER_GRAVEL_ROCK_PLACED_FEATURE).get()); - if (RocksConfig.nether_geyser) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHER_GEYSER_PLACED_FEATURE).get()); - if (RocksConfig.warped_stick) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.WARPED_STICK_PLACED_FEATURE).get()); - if (RocksConfig.crimson_stick) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.CRIMSON_STICK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHERRACK_ROCK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.SOUL_SOIL_ROCK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHER_GRAVEL_ROCK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.NETHER_GEYSER_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.WARPED_STICK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(NetherFeatures.CRIMSON_STICK_PLACED_FEATURE).get()); - if (RocksConfig.gravel_rock) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() != Biome.Category.NETHER, GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.GRAVEL_ROCK_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> !ctx.hasTag(BiomeTags.IS_NETHER), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(RockFeatures.GRAVEL_ROCK_PLACED_FEATURE).get()); - if (RocksConfig.geyser) BiomeModifications.addFeature(ctx -> ctx.getBiome().getCategory() == Biome.Category.ICY || ctx.getBiomeKey().toString().contains("snowy"), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.SNOWY_GEYSER_PLACED_FEATURE).get()); + BiomeModifications.addFeature(ctx -> ctx.hasTag(BiomeTags.IGLOO_HAS_STRUCTURE) || ctx.getBiomeKey().toString().contains("snowy"), GenerationStep.Feature.TOP_LAYER_MODIFICATION, BuiltinRegistries.PLACED_FEATURE.getKey(MiscFeatures.SNOWY_GEYSER_PLACED_FEATURE).get()); } } \ No newline at end of file diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/RocksDecorators.java b/src/main/java/eu/midnightdust/motschen/rocks/world/RocksDecorators.java deleted file mode 100755 index b1ac5f3..0000000 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/RocksDecorators.java +++ /dev/null @@ -1,10 +0,0 @@ -package eu.midnightdust.motschen.rocks.world; - -import net.minecraft.world.gen.YOffset; -import net.minecraft.world.gen.decorator.RangeDecoratorConfig; -import net.minecraft.world.gen.heightprovider.UniformHeightProvider; - -public class RocksDecorators { - //public static final RangeDecoratorConfig BOTTOM_TO_TOP_OFFSET_4 = new RangeDecoratorConfig(UniformHeightProvider.create(YOffset.aboveBottom(4), YOffset.belowTop(4))); - //public static final ConfiguredDecorator ROCK = (ConfiguredDecorator)((ConfiguredDecorator)Decorator.RANGE.configure(BOTTOM_TO_TOP_OFFSET_4).spreadHorizontally()).repeatRandomly(5); -} diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/MiscFeatures.java b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/MiscFeatures.java index f4d3f74..79029a2 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/MiscFeatures.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/MiscFeatures.java @@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableList; import eu.midnightdust.motschen.rocks.RocksMain; import eu.midnightdust.motschen.rocks.blockstates.SeashellVariation; import eu.midnightdust.motschen.rocks.blockstates.StarfishVariation; +import eu.midnightdust.motschen.rocks.config.RocksConfig; import eu.midnightdust.motschen.rocks.world.FeatureRegistry; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; @@ -12,41 +13,41 @@ import net.minecraft.util.collection.DataPool; import net.minecraft.util.math.BlockPos; import net.minecraft.util.registry.BuiltinRegistries; import net.minecraft.util.registry.Registry; +import net.minecraft.util.registry.RegistryEntry; import net.minecraft.world.gen.ProbabilityConfig; import net.minecraft.world.gen.blockpredicate.BlockPredicate; -import net.minecraft.world.gen.decorator.*; import net.minecraft.world.gen.feature.*; +import net.minecraft.world.gen.placementmodifier.*; import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; import java.util.List; public class MiscFeatures { - public static List placementModifiers = List.of(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); + public static List placementModifiers = List.of(RarityFilterPlacementModifier.of(1), + SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static ConfiguredFeature SEASHELL_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(96, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + private static final ConfiguredFeature SEASHELL_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.Seashell.getDefaultState().with(RocksMain.SEASHELL_VARIATION,SeashellVariation.YELLOW), 7) .add(RocksMain.Seashell.getDefaultState().with(RocksMain.SEASHELL_VARIATION,SeashellVariation.PINK), 2) - .add(RocksMain.Seashell.getDefaultState().with(RocksMain.SEASHELL_VARIATION,SeashellVariation.WHITE), 6).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE), new BlockPos(0, -1, 0))) + .add(RocksMain.Seashell.getDefaultState().with(RocksMain.SEASHELL_VARIATION,SeashellVariation.WHITE), 6).build() ))); - public static ConfiguredFeature STARFISH_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(96, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + public static ConfiguredFeature STARFISH_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.Starfish.getDefaultState().with(RocksMain.STARFISH_VARIATION,StarfishVariation.RED), 2) .add(RocksMain.Starfish.getDefaultState().with(RocksMain.STARFISH_VARIATION,StarfishVariation.PINK), 6) - .add(RocksMain.Starfish.getDefaultState().with(RocksMain.STARFISH_VARIATION,StarfishVariation.ORANGE), 7).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE), new BlockPos(0, -1, 0))) - ))); + .add(RocksMain.Starfish.getDefaultState().with(RocksMain.STARFISH_VARIATION,StarfishVariation.ORANGE), 7).build())) + ); - public static ConfiguredFeature UNDERWATER_STARFISH_FEATURE = FeatureRegistry.UNDERWATER_STARFISH_FEATURE.configure(new ProbabilityConfig(1)); - public static ConfiguredFeature UNDERWATER_SEASHELL_FEATURE = FeatureRegistry.UNDERWATER_SEASHELL_FEATURE.configure(new ProbabilityConfig(1)); - public static ConfiguredFeature SNOWY_GEYSER_FEATURE = FeatureRegistry.SNOWY_GEYSER_FEATURE.configure(new ProbabilityConfig(1)); + public static ConfiguredFeature UNDERWATER_STARFISH_FEATURE = new ConfiguredFeature<>(FeatureRegistry.UNDERWATER_STARFISH_FEATURE, new ProbabilityConfig(1)); + public static ConfiguredFeature UNDERWATER_SEASHELL_FEATURE = new ConfiguredFeature<>(FeatureRegistry.UNDERWATER_SEASHELL_FEATURE, new ProbabilityConfig(1)); + public static ConfiguredFeature SNOWY_GEYSER_FEATURE = new ConfiguredFeature<>(FeatureRegistry.SNOWY_GEYSER_FEATURE, new ProbabilityConfig(1)); - public static PlacedFeature SEASHELL_PLACED_FEATURE = SEASHELL_FEATURE.withPlacement(placementModifiers); - public static PlacedFeature STARFISH_PLACED_FEATURE = STARFISH_FEATURE.withPlacement(placementModifiers); - public static PlacedFeature UNDERWATER_SEASHELL_PLACED_FEATURE = UNDERWATER_SEASHELL_FEATURE.withPlacement(placementModifiers); - public static PlacedFeature UNDERWATER_STARFISH_PLACED_FEATURE = UNDERWATER_STARFISH_FEATURE.withPlacement(placementModifiers); - public static PlacedFeature SNOWY_GEYSER_PLACED_FEATURE = SNOWY_GEYSER_FEATURE.withPlacement(placementModifiers); + public static PlacedFeature SEASHELL_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SEASHELL_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.seashell_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE), new BlockPos(0, -1, 0)))))); + public static PlacedFeature STARFISH_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(STARFISH_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.starfish_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE, Blocks.RED_SAND, Blocks.RED_SANDSTONE), new BlockPos(0, -1, 0)))))); + public static PlacedFeature UNDERWATER_SEASHELL_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(UNDERWATER_SEASHELL_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.underwater_seashell_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of())); + public static PlacedFeature UNDERWATER_STARFISH_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(UNDERWATER_STARFISH_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.underwater_starfish_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of())); + public static PlacedFeature SNOWY_GEYSER_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SNOWY_GEYSER_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.geyser_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of())); public static void init() { Registry> registry = BuiltinRegistries.CONFIGURED_FEATURE; diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/NetherFeatures.java b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/NetherFeatures.java index 599bd26..6537a9e 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/NetherFeatures.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/NetherFeatures.java @@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableList; import eu.midnightdust.motschen.rocks.RocksMain; import eu.midnightdust.motschen.rocks.blockstates.RockVariation; import eu.midnightdust.motschen.rocks.blockstates.StickVariation; +import eu.midnightdust.motschen.rocks.config.RocksConfig; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.util.Identifier; @@ -11,59 +12,59 @@ import net.minecraft.util.collection.DataPool; import net.minecraft.util.math.BlockPos; import net.minecraft.util.registry.BuiltinRegistries; import net.minecraft.util.registry.Registry; +import net.minecraft.util.registry.RegistryEntry; import net.minecraft.world.gen.blockpredicate.BlockPredicate; -import net.minecraft.world.gen.decorator.BiomePlacementModifier; -import net.minecraft.world.gen.decorator.RarityFilterPlacementModifier; -import net.minecraft.world.gen.decorator.SquarePlacementModifier; import net.minecraft.world.gen.feature.*; +import net.minecraft.world.gen.placementmodifier.*; import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; +import java.util.List; + public class NetherFeatures { - public static ConfiguredFeature NETHERRACK_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(1024, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + public static ConfiguredFeature NETHERRACK_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.NetherrackRock.getDefaultState().with(RocksMain.ROCK_VARIATION, RockVariation.TINY), 10) .add(RocksMain.NetherrackRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7) .add(RocksMain.NetherrackRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5) - .add(RocksMain.NetherrackRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.NETHERRACK,Blocks.WARPED_NYLIUM,Blocks.CRIMSON_NYLIUM), new BlockPos(0, -1, 0)))))); - public static ConfiguredFeature SOUL_SOIL_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(1024, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.NetherrackRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature SOUL_SOIL_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.SoulSoilRock.getDefaultState().with(RocksMain.ROCK_VARIATION, RockVariation.TINY), 10) .add(RocksMain.SoulSoilRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7) .add(RocksMain.SoulSoilRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5) - .add(RocksMain.SoulSoilRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SOUL_SOIL,Blocks.SOUL_SAND), new BlockPos(0, -1, 0)))))); - public static ConfiguredFeature NETHER_GRAVEL_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(1024, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.SoulSoilRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature NETHER_GRAVEL_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION, RockVariation.TINY), 10) .add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7) .add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5) - .add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRAVEL), new BlockPos(0, -1, 0)))))); - public static ConfiguredFeature NETHER_GEYSER_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(1024, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( - new WeightedBlockStateProvider(DataPool.builder().add(RocksMain.NetherGeyser.getDefaultState(), 1)))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.NETHERRACK), new BlockPos(0, -1, 0)))))); - - public static ConfiguredFeature WARPED_STICK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(1024, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature NETHER_GEYSER_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( + new WeightedBlockStateProvider(DataPool.builder().add(RocksMain.NetherGeyser.getDefaultState(), 1))) + ); + public static ConfiguredFeature WARPED_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK,new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.WarpedStick.getDefaultState().with(RocksMain.STICK_VARIATION, StickVariation.SMALL), 7) .add(RocksMain.WarpedStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5) - .add(RocksMain.WarpedStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.WARPED_NYLIUM), new BlockPos(0, -1, 0)))))); - public static ConfiguredFeature CRIMSON_STICK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(1024, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.WarpedStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature CRIMSON_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.CrimsonStick.getDefaultState().with(RocksMain.STICK_VARIATION, StickVariation.SMALL), 7) .add(RocksMain.CrimsonStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5) - .add(RocksMain.CrimsonStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.CRIMSON_NYLIUM), new BlockPos(0, -1, 0)))))); + .add(RocksMain.CrimsonStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build())) + ); - public static PlacedFeature NETHERRACK_ROCK_PLACED_FEATURE = NETHERRACK_ROCK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_120_RANGE, BiomePlacementModifier.of()); - public static PlacedFeature SOUL_SOIL_ROCK_PLACED_FEATURE = SOUL_SOIL_ROCK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_120_RANGE, BiomePlacementModifier.of()); - public static PlacedFeature NETHER_GRAVEL_ROCK_PLACED_FEATURE = NETHER_GRAVEL_ROCK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_120_RANGE, BiomePlacementModifier.of()); - public static PlacedFeature NETHER_GEYSER_PLACED_FEATURE = NETHER_GEYSER_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_120_RANGE, BiomePlacementModifier.of()); - public static PlacedFeature WARPED_STICK_PLACED_FEATURE = WARPED_STICK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_120_RANGE, BiomePlacementModifier.of()); - public static PlacedFeature CRIMSON_STICK_PLACED_FEATURE = CRIMSON_STICK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_120_RANGE, BiomePlacementModifier.of()); + public static PlacedFeature NETHERRACK_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHERRACK_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.netherrack_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate .bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.NETHERRACK,Blocks.WARPED_NYLIUM,Blocks.CRIMSON_NYLIUM), new BlockPos(0, -1, 0)))))); + public static PlacedFeature SOUL_SOIL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SOUL_SOIL_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.soul_soil_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SOUL_SOIL,Blocks.SOUL_SAND), new BlockPos(0, -1, 0)))))); + public static PlacedFeature NETHER_GRAVEL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHER_GRAVEL_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.gravel_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRAVEL), new BlockPos(0, -1, 0)))))); + public static PlacedFeature NETHER_GEYSER_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(NETHER_GEYSER_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.nether_geyser_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.NETHERRACK), new BlockPos(0, -1, 0)))))); + public static PlacedFeature WARPED_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(WARPED_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.warped_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.WARPED_NYLIUM), new BlockPos(0, -1, 0)))))); + public static PlacedFeature CRIMSON_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(CRIMSON_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.crimson_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.BOTTOM_TO_TOP_RANGE, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.CRIMSON_NYLIUM), new BlockPos(0, -1, 0)))))); public static void init() { Registry> registry = BuiltinRegistries.CONFIGURED_FEATURE; diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/RockFeatures.java b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/RockFeatures.java index 036c744..5eef377 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/RockFeatures.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/RockFeatures.java @@ -1,10 +1,9 @@ package eu.midnightdust.motschen.rocks.world.configured_feature; import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableSet; import eu.midnightdust.motschen.rocks.RocksMain; import eu.midnightdust.motschen.rocks.blockstates.RockVariation; -import eu.midnightdust.motschen.rocks.world.RocksDecorators; +import eu.midnightdust.motschen.rocks.config.RocksConfig; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.util.Identifier; @@ -12,79 +11,80 @@ import net.minecraft.util.collection.DataPool; import net.minecraft.util.math.BlockPos; import net.minecraft.util.registry.BuiltinRegistries; import net.minecraft.util.registry.Registry; +import net.minecraft.util.registry.RegistryEntry; import net.minecraft.world.gen.blockpredicate.BlockPredicate; -import net.minecraft.world.gen.decorator.BiomePlacementModifier; -import net.minecraft.world.gen.decorator.RarityFilterPlacementModifier; -import net.minecraft.world.gen.decorator.SquarePlacementModifier; import net.minecraft.world.gen.feature.*; +import net.minecraft.world.gen.placementmodifier.*; import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; +import java.util.List; + public class RockFeatures { - public static ConfiguredFeature ROCK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + public static ConfiguredFeature ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.Rock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10) .add(RocksMain.Rock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7) .add(RocksMain.Rock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5) - .add(RocksMain.Rock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.not(BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.ICE,Blocks.SAND,Blocks.RED_SAND), new BlockPos(0, -1, 0))))))); - public static ConfiguredFeature GRANITE_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.Rock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature GRANITE_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.GraniteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10) .add(RocksMain.GraniteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7) .add(RocksMain.GraniteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5) - .add(RocksMain.GraniteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRANITE), new BlockPos(0, -1, 0)))))); - public static ConfiguredFeature DIORITE_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.GraniteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature DIORITE_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.DioriteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10) .add(RocksMain.DioriteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7) .add(RocksMain.DioriteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5) - .add(RocksMain.DioriteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.DIORITE), new BlockPos(0, -1, 0)))))); - public static ConfiguredFeature ANDESITE_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.DioriteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature ANDESITE_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.AndesiteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10) .add(RocksMain.AndesiteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7) .add(RocksMain.AndesiteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5) - .add(RocksMain.AndesiteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.ANDESITE), new BlockPos(0, -1, 0)))))); - public static ConfiguredFeature SAND_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.AndesiteRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature SAND_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.SandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10) .add(RocksMain.SandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7) .add(RocksMain.SandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5) - .add(RocksMain.SandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE), new BlockPos(0, -1, 0)))))); - public static ConfiguredFeature RED_SAND_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.SandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature RED_SAND_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK,new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.RedSandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10) .add(RocksMain.RedSandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7) .add(RocksMain.RedSandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5) - .add(RocksMain.RedSandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.RED_SAND, Blocks.RED_SANDSTONE), new BlockPos(0, -1, 0)))))); - public static ConfiguredFeature END_STONE_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.RedSandRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature END_STONE_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.EndstoneRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10) .add(RocksMain.EndstoneRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7) .add(RocksMain.EndstoneRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5) .add(RocksMain.EndstoneRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()) - )).withPlacement())); - public static ConfiguredFeature GRAVEL_ROCK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + )); + public static ConfiguredFeature GRAVEL_ROCK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.TINY), 10) .add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.SMALL), 7) .add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.MEDIUM), 5) - .add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRAVEL), new BlockPos(0, -1, 0)))))); + .add(RocksMain.GravelRock.getDefaultState().with(RocksMain.ROCK_VARIATION,RockVariation.LARGE), 1).build())) + ); - public static PlacedFeature ROCK_PLACED_FEATURE = ROCK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature GRANITE_ROCK_PLACED_FEATURE = GRANITE_ROCK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature DIORITE_ROCK_PLACED_FEATURE = DIORITE_ROCK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature ANDESITE_ROCK_PLACED_FEATURE = ANDESITE_ROCK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature SAND_ROCK_PLACED_FEATURE = SAND_ROCK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature RED_SAND_ROCK_PLACED_FEATURE = RED_SAND_ROCK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature END_STONE_ROCK_PLACED_FEATURE = END_STONE_ROCK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature GRAVEL_ROCK_PLACED_FEATURE = GRAVEL_ROCK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); + public static PlacedFeature ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.not(BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.ICE,Blocks.SAND,Blocks.RED_SAND,Blocks.END_STONE), new BlockPos(0, -1, 0))))))); + public static PlacedFeature GRANITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(GRANITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.granite_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRANITE), new BlockPos(0, -1, 0)))))); + public static PlacedFeature DIORITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(DIORITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.diorite_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.DIORITE), new BlockPos(0, -1, 0)))))); + public static PlacedFeature ANDESITE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ANDESITE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.andesite_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.ANDESITE), new BlockPos(0, -1, 0)))))); + public static PlacedFeature SAND_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SAND_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.sand_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.SAND, Blocks.SANDSTONE), new BlockPos(0, -1, 0)))))); + public static PlacedFeature RED_SAND_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(RED_SAND_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.red_sand_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.RED_SAND, Blocks.RED_SANDSTONE), new BlockPos(0, -1, 0)))))); + public static PlacedFeature END_STONE_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(END_STONE_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.end_stone_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.END_STONE), new BlockPos(0, -1, 0)))))); + public static PlacedFeature GRAVEL_ROCK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(GRAVEL_ROCK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.gravel_rock_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRAVEL), new BlockPos(0, -1, 0)))))); public static void init() { Registry> registry = BuiltinRegistries.CONFIGURED_FEATURE; diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/StickFeatures.java b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/StickFeatures.java index 963436f..110b0d0 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/StickFeatures.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/configured_feature/StickFeatures.java @@ -3,6 +3,7 @@ package eu.midnightdust.motschen.rocks.world.configured_feature; import com.google.common.collect.ImmutableList; import eu.midnightdust.motschen.rocks.RocksMain; import eu.midnightdust.motschen.rocks.blockstates.StickVariation; +import eu.midnightdust.motschen.rocks.config.RocksConfig; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.util.Identifier; @@ -10,58 +11,59 @@ import net.minecraft.util.collection.DataPool; import net.minecraft.util.math.BlockPos; import net.minecraft.util.registry.BuiltinRegistries; import net.minecraft.util.registry.Registry; +import net.minecraft.util.registry.RegistryEntry; import net.minecraft.world.gen.blockpredicate.BlockPredicate; -import net.minecraft.world.gen.decorator.BiomePlacementModifier; -import net.minecraft.world.gen.decorator.RarityFilterPlacementModifier; -import net.minecraft.world.gen.decorator.SquarePlacementModifier; import net.minecraft.world.gen.feature.*; +import net.minecraft.world.gen.placementmodifier.*; import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; +import java.util.List; + public class StickFeatures { - public static ConfiguredFeature OAK_STICK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + public static ConfiguredFeature OAK_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.OakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7) .add(RocksMain.OakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5) - .add(RocksMain.OakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))) - .withBlockPredicateFilter(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0)))))); - public static ConfiguredFeature SPRUCE_STICK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.OakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature SPRUCE_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.SpruceStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7) .add(RocksMain.SpruceStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5) .add(RocksMain.SpruceStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1) - .add(RocksMain.Pinecone.getDefaultState(), 1).build()))).withPlacement() - )); - public static ConfiguredFeature BIRCH_STICK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.Pinecone.getDefaultState(), 1).build())) + ); + public static ConfiguredFeature BIRCH_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.BirchStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7) .add(RocksMain.BirchStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5) - .add(RocksMain.BirchStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))).withPlacement() - )); - public static ConfiguredFeature ACACIA_STICK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.BirchStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature ACACIA_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.AcaciaStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7) .add(RocksMain.AcaciaStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5) - .add(RocksMain.AcaciaStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))).withPlacement() - )); - public static ConfiguredFeature JUNGLE_STICK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.AcaciaStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature JUNGLE_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.JungleStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7) .add(RocksMain.JungleStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5) - .add(RocksMain.JungleStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))).withPlacement() - )); - public static ConfiguredFeature DARK_OAK_STICK_FEATURE = Feature.RANDOM_PATCH.configure(new RandomPatchFeatureConfig(128, 0, 0,() -> Feature.SIMPLE_BLOCK.configure(new SimpleBlockFeatureConfig( + .add(RocksMain.JungleStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build())) + ); + public static ConfiguredFeature DARK_OAK_STICK_FEATURE = new ConfiguredFeature<>(Feature.SIMPLE_BLOCK, new SimpleBlockFeatureConfig( new WeightedBlockStateProvider(DataPool.builder() .add(RocksMain.DarkOakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.SMALL), 7) .add(RocksMain.DarkOakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.MEDIUM), 5) - .add(RocksMain.DarkOakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build()))).withPlacement() - )); + .add(RocksMain.DarkOakStick.getDefaultState().with(RocksMain.STICK_VARIATION,StickVariation.LARGE), 1).build())) + ); - public static PlacedFeature OAK_STICK_PLACED_FEATURE = OAK_STICK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature SPRUCE_STICK_PLACED_FEATURE = SPRUCE_STICK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature BIRCH_STICK_PLACED_FEATURE = BIRCH_STICK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature ACACIA_STICK_PLACED_FEATURE = ACACIA_STICK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature JUNGLE_STICK_PLACED_FEATURE = JUNGLE_STICK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); - public static PlacedFeature DARK_OAK_STICK_PLACED_FEATURE = DARK_OAK_STICK_FEATURE.withPlacement(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of()); + public static PlacedFeature OAK_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(OAK_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.oak_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0)))))); + public static PlacedFeature SPRUCE_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(SPRUCE_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.spruce_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0)))))); + public static PlacedFeature BIRCH_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(BIRCH_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.birch_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0)))))); + public static PlacedFeature ACACIA_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(ACACIA_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.acacia_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0)))))); + public static PlacedFeature JUNGLE_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(JUNGLE_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.jungle_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0)))))); + public static PlacedFeature DARK_OAK_STICK_PLACED_FEATURE = new PlacedFeature(RegistryEntry.of(DARK_OAK_STICK_FEATURE), List.of(CountPlacementModifier.of(RocksConfig.dark_oak_stick_count), RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), PlacedFeatures.WORLD_SURFACE_WG_HEIGHTMAP, BiomePlacementModifier.of(), BlockFilterPlacementModifier.of(BlockPredicate.bothOf(BlockPredicate.IS_AIR, BlockPredicate.matchingBlocks(ImmutableList.of(Blocks.GRASS_BLOCK), new BlockPos(0, -1, 0)))))); public static void init() { Registry> registry = BuiltinRegistries.CONFIGURED_FEATURE; diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/feature/SnowFeature.java b/src/main/java/eu/midnightdust/motschen/rocks/world/feature/SnowFeature.java index 4535a87..3d289c4 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/feature/SnowFeature.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/feature/SnowFeature.java @@ -8,7 +8,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.Heightmap; import net.minecraft.world.StructureWorldAccess; import net.minecraft.world.gen.ProbabilityConfig; -import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.feature.util.FeatureContext; import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; diff --git a/src/main/java/eu/midnightdust/motschen/rocks/world/feature/UnderwaterFeature.java b/src/main/java/eu/midnightdust/motschen/rocks/world/feature/UnderwaterFeature.java index 872c5bd..ab2f348 100755 --- a/src/main/java/eu/midnightdust/motschen/rocks/world/feature/UnderwaterFeature.java +++ b/src/main/java/eu/midnightdust/motschen/rocks/world/feature/UnderwaterFeature.java @@ -7,7 +7,6 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.world.Heightmap; import net.minecraft.world.StructureWorldAccess; import net.minecraft.world.gen.ProbabilityConfig; -import net.minecraft.world.gen.chunk.ChunkGenerator; import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.feature.util.FeatureContext; import net.minecraft.world.gen.stateprovider.WeightedBlockStateProvider; diff --git a/src/main/resources/assets/rocks/lang/de_de.json b/src/main/resources/assets/rocks/lang/de_de.json index 9883967..4bec629 100755 --- a/src/main/resources/assets/rocks/lang/de_de.json +++ b/src/main/resources/assets/rocks/lang/de_de.json @@ -39,10 +39,10 @@ "item.rocks.soul_soil_splitter":"Seelenerdesplitter", "rocks.midnightconfig.title": "This Rocks! Konfiguration", - "rocks.midnightconfig.needs_restart": "§c Starte das Spiel neu, nachdem du Änderungen vorgenommen hast!", + "rocks.midnightconfig.needs_restart": "§cStarte das Spiel neu, nachdem du Änderungen vorgenommen hast!", "rocks.midnightconfig.rocks": "§aBrocken", "rocks.midnightconfig.sticks": "§aStöcke", "rocks.midnightconfig.misc": "§aWeiteres", - "rocks.midnightconfig.underwater_seashell": "Unterwassermuschel", - "rocks.midnightconfig.underwater_starfish": "Unterwasserseestern" + "rocks.midnightconfig.underwater_seashell_count": "Unterwassermuschel", + "rocks.midnightconfig.underwater_starfish_count": "Unterwasserseestern" } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/lang/en_us.json b/src/main/resources/assets/rocks/lang/en_us.json index 983157b..488b92e 100755 --- a/src/main/resources/assets/rocks/lang/en_us.json +++ b/src/main/resources/assets/rocks/lang/en_us.json @@ -39,10 +39,10 @@ "item.rocks.soul_soil_splitter":"Soul Soil Splitter", "rocks.midnightconfig.title":"This Rocks! Config", - "rocks.midnightconfig.needs_restart":"§c Restart game after changing config!", - "rocks.midnightconfig.rocks":"§aRocks", - "rocks.midnightconfig.sticks":"§aSticks", - "rocks.midnightconfig.misc":"§aMiscellaneous", - "rocks.midnightconfig.underwater_seashell":"Underwater Seashell", - "rocks.midnightconfig.underwater_starfish":"Underwater Starfish" + "rocks.midnightconfig.needs_restart":"§cRestart game after changing config!", + "rocks.midnightconfig.rocks":"§aRock Spawn Count", + "rocks.midnightconfig.sticks":"§aStick Spawn Count", + "rocks.midnightconfig.misc":"§aMiscellaneous Spawn Count", + "rocks.midnightconfig.underwater_seashell_count":"Underwater Seashell", + "rocks.midnightconfig.underwater_starfish_count":"Underwater Starfish" } \ No newline at end of file diff --git a/src/main/resources/assets/rocks/lang/ru_ru.json b/src/main/resources/assets/rocks/lang/ru_ru.json index 01b78a3..e548f30 100755 --- a/src/main/resources/assets/rocks/lang/ru_ru.json +++ b/src/main/resources/assets/rocks/lang/ru_ru.json @@ -1,6 +1,6 @@ { "itemGroup.rocks.rocks":"This Rocks!", - + "block.rocks.rock":"Камушек из булыжника", "block.rocks.granite_rock":"Камушек из гранита", "block.rocks.diorite_rock":"Камушек из диорита", @@ -11,21 +11,23 @@ "block.rocks.end_stone_rock":"Камушек из эндерняка", "block.rocks.netherrack_rock":"Камушек из адского камня", "block.rocks.soul_soil_rock":"Камушек из почвы душ", - - "block.rocks.oak_stick":"Дубовая палка", - "block.rocks.birch_stick":"Берёзовая палка", + + "block.rocks.oak_stick":"Дубовая палочка", + "block.rocks.birch_stick":"Берёзовая палочка", "block.rocks.spruce_stick":"Еловая палочка", - "block.rocks.jungle_stick":"Палка из тропического дерева", - "block.rocks.acacia_stick":"Палка из акации", - "block.rocks.dark_oak_stick":"Палка из тёмного дуба", - + "block.rocks.jungle_stick":"Палочка из тропического дерева", + "block.rocks.acacia_stick":"Палочка из акации", + "block.rocks.dark_oak_stick":"Палочка из тёмного дуба", + "block.rocks.crimson_stick":"Багровая палочка", + "block.rocks.warped_stick":"Искажённая палочка", + "block.rocks.geyser":"Гейзер", "block.rocks.nether_geyser":"Магмовый гейзер", - + "block.rocks.pinecone":"Шишка", "block.rocks.seashell":"Морская ракушка", "block.rocks.starfish":"Морская звезда", - + "item.rocks.cobblestone_splitter":"Кусочек булыжника", "item.rocks.granite_splitter":"Кусочек гранита", "item.rocks.diorite_splitter":"Кусочек диорита", @@ -34,5 +36,13 @@ "item.rocks.red_sandstone_splitter":"Кусочек красного песчаника", "item.rocks.end_stone_splitter":"Кусочек эндерняка", "item.rocks.netherrack_splitter":"Кусочек адского камня", - "item.rocks.soul_soil_splitter":"Кусочек почвы душ" -} + "item.rocks.soul_soil_splitter":"Кусочек почвы душ", + + "rocks.midnightconfig.title":"This Rocks! Настройки", + "rocks.midnightconfig.needs_restart":"§c Перезапустить игру после изменения конфигурации!", + "rocks.midnightconfig.rocks":"§aГорные породы", + "rocks.midnightconfig.sticks":"§aПалочки", + "rocks.midnightconfig.misc":"§aРазнообразие", + "rocks.midnightconfig.underwater_seashell_count":"Подводная морская раковина", + "rocks.midnightconfig.underwater_starfish_count":"Подводная морская звезда" +} \ No newline at end of file diff --git a/src/main/resources/data/rocks/loot_tables/blocks/acacia_stick.json b/src/main/resources/data/rocks/loot_tables/blocks/acacia_stick.json index bbd852e..4577f1f 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/acacia_stick.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/acacia_stick.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stick" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:acacia_stick" + }, + { + "type": "minecraft:item", + "name": "minecraft:stick" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/andesite_rock.json b/src/main/resources/data/rocks/loot_tables/blocks/andesite_rock.json index 4afd541..9530ff6 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/andesite_rock.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/andesite_rock.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "rocks:andesite_splitter" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:andesite_rock" + }, + { + "type": "minecraft:item", + "name": "rocks:andesite_splitter" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/birch_stick.json b/src/main/resources/data/rocks/loot_tables/blocks/birch_stick.json index bbd852e..9a4abdf 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/birch_stick.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/birch_stick.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stick" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:birch_stick" + }, + { + "type": "minecraft:item", + "name": "minecraft:stick" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/crimson_stick.json b/src/main/resources/data/rocks/loot_tables/blocks/crimson_stick.json index bbd852e..6649202 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/crimson_stick.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/crimson_stick.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stick" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:crimson_stick" + }, + { + "type": "minecraft:item", + "name": "minecraft:stick" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/dark_oak_stick.json b/src/main/resources/data/rocks/loot_tables/blocks/dark_oak_stick.json index bbd852e..1947779 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/dark_oak_stick.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/dark_oak_stick.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stick" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:dark_oak_stick" + }, + { + "type": "minecraft:item", + "name": "minecraft:stick" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/diorite_rock.json b/src/main/resources/data/rocks/loot_tables/blocks/diorite_rock.json index 9a3521c..dcc309d 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/diorite_rock.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/diorite_rock.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "rocks:diorite_splitter" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:diorite_rock" + }, + { + "type": "minecraft:item", + "name": "rocks:diorite_splitter" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/end_stone_rock.json b/src/main/resources/data/rocks/loot_tables/blocks/end_stone_rock.json index d243b8a..e922d20 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/end_stone_rock.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/end_stone_rock.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "rocks:end_stone_splitter" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:end_stone_rock" + }, + { + "type": "minecraft:item", + "name": "rocks:end_stone_splitter" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/granite_rock.json b/src/main/resources/data/rocks/loot_tables/blocks/granite_rock.json index 8453470..4c1b983 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/granite_rock.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/granite_rock.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "rocks:granite_splitter" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:granite_rock" + }, + { + "type": "minecraft:item", + "name": "rocks:granite_splitter" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/gravel_rock.json b/src/main/resources/data/rocks/loot_tables/blocks/gravel_rock.json index 91002db..adb3696 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/gravel_rock.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/gravel_rock.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:flint" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:gravel_rock" + }, + { + "type": "minecraft:item", + "name": "minecraft:flint" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/jungle_stick.json b/src/main/resources/data/rocks/loot_tables/blocks/jungle_stick.json index bbd852e..2795ed7 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/jungle_stick.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/jungle_stick.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stick" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:jungle_stick" + }, + { + "type": "minecraft:item", + "name": "minecraft:stick" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/netherrack_rock.json b/src/main/resources/data/rocks/loot_tables/blocks/netherrack_rock.json index 3125b98..c40b19f 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/netherrack_rock.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/netherrack_rock.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "rocks:netherrack_splitter" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:netherrack_rock" + }, + { + "type": "minecraft:item", + "name": "rocks:netherrack_splitter" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/oak_stick.json b/src/main/resources/data/rocks/loot_tables/blocks/oak_stick.json index bbd852e..c98b2b7 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/oak_stick.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/oak_stick.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stick" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:oak_stick" + }, + { + "type": "minecraft:item", + "name": "minecraft:stick" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/pinecone.json b/src/main/resources/data/rocks/loot_tables/blocks/pinecone.json index 08aab54..83c3cf1 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/pinecone.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/pinecone.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:spruce_sapling" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:pinecone" + }, + { + "type": "minecraft:item", + "name": "minecraft:spruce_sapling" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/red_sand_rock.json b/src/main/resources/data/rocks/loot_tables/blocks/red_sand_rock.json index dbc9459..719b011 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/red_sand_rock.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/red_sand_rock.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "rocks:red_sandstone_splitter" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:red_sand_rock" + }, + { + "type": "minecraft:item", + "name": "rocks:red_sandstone_splitter" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/rock.json b/src/main/resources/data/rocks/loot_tables/blocks/rock.json index aab7714..7e15e16 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/rock.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/rock.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "rocks:cobblestone_splitter" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:rock" + }, + { + "type": "minecraft:item", + "name": "rocks:cobblestone_splitter" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/sand_rock.json b/src/main/resources/data/rocks/loot_tables/blocks/sand_rock.json index 0d0a4fd..225a205 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/sand_rock.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/sand_rock.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "rocks:sandstone_splitter" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:sand_rock" + }, + { + "type": "minecraft:item", + "name": "rocks:sandstone_splitter" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/seashell.json b/src/main/resources/data/rocks/loot_tables/blocks/seashell.json index 4352bb4..9bea4c9 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/seashell.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/seashell.json @@ -29,4 +29,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/soul_soil_rock.json b/src/main/resources/data/rocks/loot_tables/blocks/soul_soil_rock.json index c12d83e..e3e2b63 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/soul_soil_rock.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/soul_soil_rock.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "rocks:soul_soil_splitter" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:soul_soil_rock" + }, + { + "type": "minecraft:item", + "name": "rocks:soul_soil_splitter" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/spruce_stick.json b/src/main/resources/data/rocks/loot_tables/blocks/spruce_stick.json index bbd852e..9dcfea6 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/spruce_stick.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/spruce_stick.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stick" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:spruce_stick" + }, + { + "type": "minecraft:item", + "name": "minecraft:stick" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +} diff --git a/src/main/resources/data/rocks/loot_tables/blocks/warped_stick.json b/src/main/resources/data/rocks/loot_tables/blocks/warped_stick.json index bbd852e..65d70b4 100755 --- a/src/main/resources/data/rocks/loot_tables/blocks/warped_stick.json +++ b/src/main/resources/data/rocks/loot_tables/blocks/warped_stick.json @@ -4,16 +4,40 @@ { "rolls": 1, "entries": [ - { - "type": "minecraft:item", - "name": "minecraft:stick" - } - ], - "conditions": [ + { + "type": "minecraft:alternatives", + "children": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "enchantments": [ + { + "enchantment": "minecraft:silk_touch", + "levels": { + "min": 1 + } + } + ] + } + } + ], + "name": "rocks:warped_stick" + }, + { + "type": "minecraft:item", + "name": "minecraft:stick" + } + ], + "conditions": [ { "condition": "minecraft:survives_explosion" } ] } - ] -} \ No newline at end of file + ] + } + ] +}