From 1cf6cb38805572a4925d1f22e7d4edb98656aa42 Mon Sep 17 00:00:00 2001 From: paulevsGitch Date: Mon, 22 Nov 2021 17:22:07 +0300 Subject: [PATCH] Enderscape ore tags --- gradle.properties | 2 +- .../integration/EnderscapeIntegration.java | 17 +++++++++++++++++ src/main/resources/fabric.mod.json | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index e2414b8a..f4a65c1e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,6 +15,6 @@ archives_base_name=better-end patchouli_version = 55-FABRIC-SNAPSHOT fabric_version = 0.42.1+1.17 -bclib_version = 0.5.2 +bclib_version = 0.5.3 rei_version = 6.0.264-alpha canvas_version = 1.0.+ diff --git a/src/main/java/ru/betterend/integration/EnderscapeIntegration.java b/src/main/java/ru/betterend/integration/EnderscapeIntegration.java index 92748088..decc5f1c 100644 --- a/src/main/java/ru/betterend/integration/EnderscapeIntegration.java +++ b/src/main/java/ru/betterend/integration/EnderscapeIntegration.java @@ -3,8 +3,12 @@ package ru.betterend.integration; import net.minecraft.core.MappedRegistry; import net.minecraft.resources.ResourceKey; import net.minecraft.world.level.biome.Biome; +import net.minecraft.world.level.levelgen.GenerationStep.Decoration; import ru.bclib.api.BiomeAPI; +import ru.bclib.api.TagAPI; import ru.bclib.integration.ModIntegration; +import ru.bclib.world.features.BCLFeature; +import ru.betterend.registry.EndTags; public class EnderscapeIntegration extends ModIntegration { public EnderscapeIntegration() { @@ -26,5 +30,18 @@ public class EnderscapeIntegration extends ModIntegration { BiomeAPI.registerEndLandBiome(biome); } }); + + BCLFeature scatteredShadowQuartzOre = getFeature("scattered_shadow_quartz_ore", Decoration.UNDERGROUND_DECORATION); + BCLFeature voidNebuliteOre = getFeature("void_nebulite_ore", Decoration.UNDERGROUND_DECORATION); + BCLFeature nebuliteOre = getFeature("nebulite_ore", Decoration.UNDERGROUND_DECORATION); + + BiomeAPI.registerEndBiomeModification((biomeID, biome) -> { + if (!biomeID.getNamespace().equals("enderscape")) { + BiomeAPI.addBiomeFeatures(biome, scatteredShadowQuartzOre, voidNebuliteOre, nebuliteOre); + } + }); + + TagAPI.addTag(TagAPI.BLOCK_GEN_TERRAIN, getBlock("nebulite_ore")); + TagAPI.addTag(TagAPI.BLOCK_GEN_TERRAIN, getBlock("shadow_quartz_ore")); } } diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index a36978e6..edc5817e 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -45,7 +45,7 @@ "fabricloader": ">=0.11.6", "fabric": ">=0.41.0", "minecraft": ">=1.17", - "bclib": ">=0.5.2" + "bclib": ">=0.5.3" }, "suggests": { "byg": ">=1.1.3",