[Change] Re-Enabled Patchouli (#233)

This commit is contained in:
Frank 2023-06-18 18:08:57 +02:00
parent b029b3ec48
commit 65858c7867
10 changed files with 31 additions and 30 deletions

View file

@ -7,6 +7,7 @@ import org.betterx.betterend.api.BetterEndPlugin;
import org.betterx.betterend.commands.CommandRegistry; import org.betterx.betterend.commands.CommandRegistry;
import org.betterx.betterend.config.Configs; import org.betterx.betterend.config.Configs;
import org.betterx.betterend.effects.EndPotions; import org.betterx.betterend.effects.EndPotions;
import org.betterx.betterend.integration.Integrations;
import org.betterx.betterend.recipe.builders.InfusionRecipe; import org.betterx.betterend.recipe.builders.InfusionRecipe;
import org.betterx.betterend.registry.*; import org.betterx.betterend.registry.*;
import org.betterx.betterend.tab.CreativeTabs; import org.betterx.betterend.tab.CreativeTabs;
@ -58,7 +59,7 @@ public class BetterEnd implements ModInitializer {
FabricLoader.getInstance() FabricLoader.getInstance()
.getEntrypoints("betterend", BetterEndPlugin.class) .getEntrypoints("betterend", BetterEndPlugin.class)
.forEach(BetterEndPlugin::register); .forEach(BetterEndPlugin::register);
//Integrations.init(); Integrations.init();
Configs.saveConfigs(); Configs.saveConfigs();
CreativeTabs.ensureStaticallyLoaded(); CreativeTabs.ensureStaticallyLoaded();

View file

@ -5,7 +5,6 @@ import org.betterx.bclib.integration.ModIntegration;
import org.betterx.bclib.recipes.BCLRecipeBuilder; import org.betterx.bclib.recipes.BCLRecipeBuilder;
import org.betterx.betterend.BetterEnd; import org.betterx.betterend.BetterEnd;
import org.betterx.betterend.events.PlayerAdvancementsCallback; import org.betterx.betterend.events.PlayerAdvancementsCallback;
import org.betterx.betterend.integration.byg.BYGIntegration;
import org.betterx.betterend.item.GuideBookItem; import org.betterx.betterend.item.GuideBookItem;
import org.betterx.betterend.registry.EndItems; import org.betterx.betterend.registry.EndItems;
@ -16,7 +15,6 @@ import net.minecraft.world.item.Items;
import net.fabricmc.loader.api.FabricLoader; import net.fabricmc.loader.api.FabricLoader;
public class Integrations { public class Integrations {
public static final ModIntegration BYG = ModIntegrationAPI.register(new BYGIntegration());
public static final ModIntegration NOURISH = ModIntegrationAPI.register(new NourishIntegration()); public static final ModIntegration NOURISH = ModIntegrationAPI.register(new NourishIntegration());
public static final ModIntegration FLAMBOYANT_REFABRICATED = ModIntegrationAPI.register(new FlamboyantRefabricatedIntegration()); public static final ModIntegration FLAMBOYANT_REFABRICATED = ModIntegrationAPI.register(new FlamboyantRefabricatedIntegration());

View file

@ -1,8 +1,8 @@
package org.betterx.betterend.integration.byg; package org.betterx.betterend.integration.byg;
import org.betterx.bclib.api.v2.ModIntegrationAPI;
import org.betterx.bclib.integration.ModIntegration; import org.betterx.bclib.integration.ModIntegration;
import org.betterx.betterend.integration.EndBiomeIntegration; import org.betterx.betterend.integration.EndBiomeIntegration;
import org.betterx.betterend.integration.Integrations;
import org.betterx.betterend.integration.byg.biomes.BYGBiomes; import org.betterx.betterend.integration.byg.biomes.BYGBiomes;
import org.betterx.betterend.integration.byg.features.BYGFeatures; import org.betterx.betterend.integration.byg.features.BYGFeatures;
import org.betterx.worlds.together.tag.v3.CommonBlockTags; import org.betterx.worlds.together.tag.v3.CommonBlockTags;
@ -11,13 +11,15 @@ import org.betterx.worlds.together.tag.v3.TagManager;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
public class BYGIntegration extends ModIntegration implements EndBiomeIntegration { public class BYGIntegration extends ModIntegration implements EndBiomeIntegration {
public static final ModIntegration BYG = ModIntegrationAPI.register(new BYGIntegration());
public BYGIntegration() { public BYGIntegration() {
super("byg"); super("byg");
} }
@Override @Override
public void init() { public void init() {
Block block = Integrations.BYG.getBlock("ivis_phylium"); Block block = BYG.getBlock("ivis_phylium");
if (block != null) { if (block != null) {
TagManager.BLOCKS.add(block, CommonBlockTags.END_STONES, CommonBlockTags.GEN_END_STONES); TagManager.BLOCKS.add(block, CommonBlockTags.END_STONES, CommonBlockTags.GEN_END_STONES);
} }

View file

@ -1,7 +1,7 @@
package org.betterx.betterend.integration.byg.biomes; package org.betterx.betterend.integration.byg.biomes;
import org.betterx.betterend.BetterEnd; import org.betterx.betterend.BetterEnd;
import org.betterx.betterend.integration.Integrations; import org.betterx.betterend.integration.byg.BYGIntegration;
import org.betterx.betterend.registry.EndBiomes; import org.betterx.betterend.registry.EndBiomes;
import org.betterx.betterend.world.biome.EndBiome; import org.betterx.betterend.world.biome.EndBiome;
@ -19,8 +19,8 @@ public class BYGBiomes {
} }
public static void addBiomes() { public static void addBiomes() {
EndBiomes.addSubBiomeIntegration(OLD_BULBIS_GARDENS, Integrations.BYG.getID("bulbis_gardens")); EndBiomes.addSubBiomeIntegration(OLD_BULBIS_GARDENS, BYGIntegration.BYG.getID("bulbis_gardens"));
EndBiomes.addSubBiomeIntegration(NIGHTSHADE_REDWOODS, Integrations.BYG.getID("nightshade_forest")); EndBiomes.addSubBiomeIntegration(NIGHTSHADE_REDWOODS, BYGIntegration.BYG.getID("nightshade_forest"));
//EndBiomes.addSubBiomeIntegration(ETHERIAL_GROVE, Integrations.BYG.getID("ethereal_islands")); //EndBiomes.addSubBiomeIntegration(ETHERIAL_GROVE, Integrations.BYG.getID("ethereal_islands"));
} }
} }

View file

@ -4,7 +4,7 @@ import org.betterx.bclib.BCLib;
import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder; import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
import org.betterx.bclib.api.v2.levelgen.surface.SurfaceRuleBuilder; import org.betterx.bclib.api.v2.levelgen.surface.SurfaceRuleBuilder;
import org.betterx.bclib.interfaces.SurfaceMaterialProvider; import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
import org.betterx.betterend.integration.Integrations; import org.betterx.betterend.integration.byg.BYGIntegration;
import org.betterx.betterend.integration.byg.features.BYGFeatures; import org.betterx.betterend.integration.byg.features.BYGFeatures;
import org.betterx.betterend.registry.EndFeatures; import org.betterx.betterend.registry.EndFeatures;
import org.betterx.betterend.world.biome.EndBiome; import org.betterx.betterend.world.biome.EndBiome;
@ -31,7 +31,7 @@ public class NightshadeRedwoods extends EndBiome.Config {
@Override @Override
protected void addCustomBuildData(BCLBiomeBuilder builder) { protected void addCustomBuildData(BCLBiomeBuilder builder) {
Holder<Biome> biome = Integrations.BYG.getBiome("nightshade_forest"); Holder<Biome> biome = BYGIntegration.BYG.getBiome("nightshade_forest");
BiomeSpecialEffects effects = biome.value().getSpecialEffects(); BiomeSpecialEffects effects = biome.value().getSpecialEffects();
builder.fogColor(140, 108, 47) builder.fogColor(140, 108, 47)
@ -90,7 +90,7 @@ public class NightshadeRedwoods extends EndBiome.Config {
return new EndBiome.DefaultSurfaceMaterialProvider() { return new EndBiome.DefaultSurfaceMaterialProvider() {
@Override @Override
public BlockState getTopMaterial() { public BlockState getTopMaterial() {
return Integrations.BYG.getBlock("nightshade_phylium").defaultBlockState(); return BYGIntegration.BYG.getBlock("nightshade_phylium").defaultBlockState();
} }
@Override @Override

View file

@ -5,7 +5,7 @@ import org.betterx.bclib.api.v2.levelgen.biomes.BCLBiomeBuilder;
import org.betterx.bclib.api.v2.levelgen.surface.SurfaceRuleBuilder; import org.betterx.bclib.api.v2.levelgen.surface.SurfaceRuleBuilder;
import org.betterx.bclib.api.v2.levelgen.surface.rules.RoughNoiseCondition; import org.betterx.bclib.api.v2.levelgen.surface.rules.RoughNoiseCondition;
import org.betterx.bclib.interfaces.SurfaceMaterialProvider; import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
import org.betterx.betterend.integration.Integrations; import org.betterx.betterend.integration.byg.BYGIntegration;
import org.betterx.betterend.integration.byg.features.BYGFeatures; import org.betterx.betterend.integration.byg.features.BYGFeatures;
import org.betterx.betterend.registry.EndFeatures; import org.betterx.betterend.registry.EndFeatures;
import org.betterx.betterend.world.biome.EndBiome; import org.betterx.betterend.world.biome.EndBiome;
@ -36,7 +36,7 @@ public class OldBulbisGardens extends EndBiome.Config {
@Override @Override
protected void addCustomBuildData(BCLBiomeBuilder builder) { protected void addCustomBuildData(BCLBiomeBuilder builder) {
Holder<Biome> biome = Integrations.BYG.getBiome("bulbis_gardens"); Holder<Biome> biome = BYGIntegration.BYG.getBiome("bulbis_gardens");
BiomeSpecialEffects effects = biome.value().getSpecialEffects(); BiomeSpecialEffects effects = biome.value().getSpecialEffects();
builder.fogColor(215, 132, 207) builder.fogColor(215, 132, 207)
@ -119,12 +119,12 @@ public class OldBulbisGardens extends EndBiome.Config {
return new EndBiome.DefaultSurfaceMaterialProvider() { return new EndBiome.DefaultSurfaceMaterialProvider() {
@Override @Override
public BlockState getTopMaterial() { public BlockState getTopMaterial() {
return Integrations.BYG.getBlock("ivis_phylium").defaultBlockState(); return BYGIntegration.BYG.getBlock("ivis_phylium").defaultBlockState();
} }
@Override @Override
public BlockState getAltTopMaterial() { public BlockState getAltTopMaterial() {
return Integrations.BYG.getBlock("bulbis_phycelium").defaultBlockState(); return BYGIntegration.BYG.getBlock("bulbis_phycelium").defaultBlockState();
} }
@Override @Override

View file

@ -3,8 +3,8 @@ package org.betterx.betterend.integration.byg.features;
import org.betterx.bclib.api.v3.levelgen.features.BCLFeature; import org.betterx.bclib.api.v3.levelgen.features.BCLFeature;
import org.betterx.bclib.api.v3.levelgen.features.BCLFeatureBuilder; import org.betterx.bclib.api.v3.levelgen.features.BCLFeatureBuilder;
import org.betterx.betterend.BetterEnd; import org.betterx.betterend.BetterEnd;
import org.betterx.betterend.integration.Integrations;
import org.betterx.betterend.integration.byg.BYGBlocks; import org.betterx.betterend.integration.byg.BYGBlocks;
import org.betterx.betterend.integration.byg.BYGIntegration;
import org.betterx.betterend.registry.EndFeatures; import org.betterx.betterend.registry.EndFeatures;
import org.betterx.betterend.world.features.*; import org.betterx.betterend.world.features.*;
@ -22,7 +22,7 @@ public class BYGFeatures {
public static final BCLFeature<SinglePlantFeature, SinglePlantFeatureConfig> IVIS_SPROUT = registerVegetation( public static final BCLFeature<SinglePlantFeature, SinglePlantFeatureConfig> IVIS_SPROUT = registerVegetation(
"ivis_sprout", "ivis_sprout",
EndFeatures.SINGLE_PLANT_FEATURE, EndFeatures.SINGLE_PLANT_FEATURE,
new SinglePlantFeatureConfig(Integrations.BYG.getBlock("ivis_sprout"), 6, 2), new SinglePlantFeatureConfig(BYGIntegration.BYG.getBlock("ivis_sprout"), 6, 2),
6 6
); );
public static final BCLFeature<VineFeature, VineFeatureConfig> IVIS_VINE = registerVegetation( public static final BCLFeature<VineFeature, VineFeatureConfig> IVIS_VINE = registerVegetation(

View file

@ -4,7 +4,7 @@ import org.betterx.bclib.api.v2.levelgen.features.features.DefaultFeature;
import org.betterx.bclib.sdf.SDF; import org.betterx.bclib.sdf.SDF;
import org.betterx.bclib.util.MHelper; import org.betterx.bclib.util.MHelper;
import org.betterx.bclib.util.SplineHelper; import org.betterx.bclib.util.SplineHelper;
import org.betterx.betterend.integration.Integrations; import org.betterx.betterend.integration.byg.BYGIntegration;
import org.betterx.worlds.together.tag.v3.CommonBlockTags; import org.betterx.worlds.together.tag.v3.CommonBlockTags;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -28,8 +28,8 @@ public class BigEtherTreeFeature extends DefaultFeature {
final WorldGenLevel world = featureConfig.level(); final WorldGenLevel world = featureConfig.level();
if (!world.getBlockState(pos.below()).is(CommonBlockTags.END_STONES)) return false; if (!world.getBlockState(pos.below()).is(CommonBlockTags.END_STONES)) return false;
BlockState log = Integrations.BYG.getDefaultState("ether_log"); BlockState log = BYGIntegration.BYG.getDefaultState("ether_log");
BlockState wood = Integrations.BYG.getDefaultState("ether_wood"); BlockState wood = BYGIntegration.BYG.getDefaultState("ether_wood");
Function<BlockPos, BlockState> splinePlacer = (bpos) -> { Function<BlockPos, BlockState> splinePlacer = (bpos) -> {
return log; return log;
}; };

View file

@ -11,7 +11,7 @@ import org.betterx.bclib.sdf.primitive.SDFSphere;
import org.betterx.bclib.util.BlocksHelper; import org.betterx.bclib.util.BlocksHelper;
import org.betterx.bclib.util.MHelper; import org.betterx.bclib.util.MHelper;
import org.betterx.bclib.util.SplineHelper; import org.betterx.bclib.util.SplineHelper;
import org.betterx.betterend.integration.Integrations; import org.betterx.betterend.integration.byg.BYGIntegration;
import org.betterx.worlds.together.tag.v3.CommonBlockTags; import org.betterx.worlds.together.tag.v3.CommonBlockTags;
import net.minecraft.core.BlockPos; import net.minecraft.core.BlockPos;
@ -42,10 +42,10 @@ public class NightshadeRedwoodTreeFeature extends DefaultFeature {
final WorldGenLevel world = featureConfig.level(); final WorldGenLevel world = featureConfig.level();
if (!world.getBlockState(pos.below()).is(CommonBlockTags.END_STONES)) return false; if (!world.getBlockState(pos.below()).is(CommonBlockTags.END_STONES)) return false;
BlockState log = Integrations.BYG.getDefaultState("nightshade_log"); BlockState log = BYGIntegration.BYG.getDefaultState("nightshade_log");
BlockState wood = Integrations.BYG.getDefaultState("nightshade_wood"); BlockState wood = BYGIntegration.BYG.getDefaultState("nightshade_wood");
BlockState leaves = Integrations.BYG.getDefaultState("nightshade_leaves"); BlockState leaves = BYGIntegration.BYG.getDefaultState("nightshade_leaves");
BlockState leaves_flower = Integrations.BYG.getDefaultState("flowering_nightshade_leaves"); BlockState leaves_flower = BYGIntegration.BYG.getDefaultState("flowering_nightshade_leaves");
Function<BlockPos, BlockState> splinePlacer = (bpos) -> log; Function<BlockPos, BlockState> splinePlacer = (bpos) -> log;
Function<BlockState, Boolean> replace = (state) -> state.is(CommonBlockTags.END_STONES) || state.getMaterial() Function<BlockState, Boolean> replace = (state) -> state.is(CommonBlockTags.END_STONES) || state.getMaterial()

View file

@ -9,7 +9,7 @@ import org.betterx.bclib.sdf.operator.SDFUnion;
import org.betterx.bclib.sdf.primitive.SDFSphere; import org.betterx.bclib.sdf.primitive.SDFSphere;
import org.betterx.bclib.util.MHelper; import org.betterx.bclib.util.MHelper;
import org.betterx.bclib.util.SplineHelper; import org.betterx.bclib.util.SplineHelper;
import org.betterx.betterend.integration.Integrations; import org.betterx.betterend.integration.byg.BYGIntegration;
import org.betterx.betterend.noise.OpenSimplexNoise; import org.betterx.betterend.noise.OpenSimplexNoise;
import org.betterx.worlds.together.tag.v3.CommonBlockTags; import org.betterx.worlds.together.tag.v3.CommonBlockTags;
@ -44,12 +44,12 @@ public class OldBulbisTreeFeature extends DefaultFeature {
if (!world.getBlockState(pos.below()).is(CommonBlockTags.END_STONES)) return false; if (!world.getBlockState(pos.below()).is(CommonBlockTags.END_STONES)) return false;
if (!world.getBlockState(pos.below(4)).is(CommonBlockTags.GEN_END_STONES)) return false; if (!world.getBlockState(pos.below(4)).is(CommonBlockTags.GEN_END_STONES)) return false;
BlockState stem = Integrations.BYG.getDefaultState("bulbis_stem"); BlockState stem = BYGIntegration.BYG.getDefaultState("bulbis_stem");
BlockState wood = Integrations.BYG.getDefaultState("bulbis_wood"); BlockState wood = BYGIntegration.BYG.getDefaultState("bulbis_wood");
BlockState cap = Integrations.BYG.getDefaultState(random.nextBoolean() BlockState cap = BYGIntegration.BYG.getDefaultState(random.nextBoolean()
? "bulbis_shell" ? "bulbis_shell"
: "purple_bulbis_shell"); : "purple_bulbis_shell");
BlockState glow = Integrations.BYG.getDefaultState("purple_shroomlight"); BlockState glow = BYGIntegration.BYG.getDefaultState("purple_shroomlight");
Function<BlockState, Boolean> replacement = (state) -> { Function<BlockState, Boolean> replacement = (state) -> {
if (state.equals(stem) || state.equals(wood) || state.is(CommonBlockTags.END_STONES) || state.getMaterial() if (state.equals(stem) || state.equals(wood) || state.is(CommonBlockTags.END_STONES) || state.getMaterial()