[Change] Restored BYG Integration Biomes
This commit is contained in:
parent
de7b6afb5d
commit
6c60f422c8
5 changed files with 98 additions and 25 deletions
|
@ -3,6 +3,7 @@ package org.betterx.betterend.integration.byg;
|
||||||
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.Integrations;
|
||||||
|
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;
|
||||||
import org.betterx.worlds.together.tag.v3.TagManager;
|
import org.betterx.worlds.together.tag.v3.TagManager;
|
||||||
|
@ -22,11 +23,11 @@ public class BYGIntegration extends ModIntegration implements EndBiomeIntegratio
|
||||||
}
|
}
|
||||||
BYGBlocks.register();
|
BYGBlocks.register();
|
||||||
BYGFeatures.register();
|
BYGFeatures.register();
|
||||||
//BYGBiomes.register();
|
BYGBiomes.register();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addBiomes() {
|
public void addBiomes() {
|
||||||
//BYGBiomes.addBiomes();
|
BYGBiomes.addBiomes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,10 @@ import org.betterx.betterend.integration.Integrations;
|
||||||
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;
|
||||||
|
|
||||||
|
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||||
|
|
||||||
public class BYGBiomes {
|
public class BYGBiomes {
|
||||||
|
public static final SurfaceRules.ConditionSource BYG_WATER_CHECK = SurfaceRules.waterBlockCheck(-1, 0);
|
||||||
// New Biomes
|
// New Biomes
|
||||||
public static final EndBiome OLD_BULBIS_GARDENS = EndBiomes.registerSubBiomeIntegration(new OldBulbisGardens());
|
public static final EndBiome OLD_BULBIS_GARDENS = EndBiomes.registerSubBiomeIntegration(new OldBulbisGardens());
|
||||||
public static final EndBiome NIGHTSHADE_REDWOODS = EndBiomes.registerSubBiomeIntegration(new NightshadeRedwoods());
|
public static final EndBiome NIGHTSHADE_REDWOODS = EndBiomes.registerSubBiomeIntegration(new NightshadeRedwoods());
|
||||||
|
|
|
@ -2,6 +2,8 @@ package org.betterx.betterend.integration.byg.biomes;
|
||||||
|
|
||||||
import org.betterx.bclib.BCLib;
|
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.interfaces.SurfaceMaterialProvider;
|
||||||
import org.betterx.betterend.integration.Integrations;
|
import org.betterx.betterend.integration.Integrations;
|
||||||
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;
|
||||||
|
@ -16,7 +18,9 @@ import net.minecraft.world.entity.MobCategory;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
import net.minecraft.world.level.biome.BiomeSpecialEffects;
|
import net.minecraft.world.level.biome.BiomeSpecialEffects;
|
||||||
import net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData;
|
import net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
||||||
|
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -38,10 +42,6 @@ public class NightshadeRedwoods extends EndBiome.Config {
|
||||||
ParticleTypes.REVERSE_PORTAL,
|
ParticleTypes.REVERSE_PORTAL,
|
||||||
0.002F
|
0.002F
|
||||||
)
|
)
|
||||||
//TODO: 1.18 surface rules
|
|
||||||
// .setSurface(biome.getGenerationSettings()
|
|
||||||
// .getSurfaceBuilder()
|
|
||||||
// .get())
|
|
||||||
.grassColor(48, 13, 89)
|
.grassColor(48, 13, 89)
|
||||||
.plantsColor(200, 125, 9)
|
.plantsColor(200, 125, 9)
|
||||||
.feature(EndFeatures.END_LAKE_RARE)
|
.feature(EndFeatures.END_LAKE_RARE)
|
||||||
|
@ -84,4 +84,29 @@ public class NightshadeRedwoods extends EndBiome.Config {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected SurfaceMaterialProvider surfaceMaterial() {
|
||||||
|
return new EndBiome.DefaultSurfaceMaterialProvider() {
|
||||||
|
@Override
|
||||||
|
public BlockState getTopMaterial() {
|
||||||
|
return Integrations.BYG.getBlock("nightshade_phylium").defaultBlockState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SurfaceRuleBuilder surface() {
|
||||||
|
return SurfaceRuleBuilder
|
||||||
|
.start()
|
||||||
|
.rule(4, SurfaceRules.sequence(SurfaceRules.ifTrue(
|
||||||
|
BYGBiomes.BYG_WATER_CHECK,
|
||||||
|
SurfaceRules.ifTrue(
|
||||||
|
SurfaceRules.ON_FLOOR,
|
||||||
|
SurfaceRules.state(getTopMaterial())
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,9 @@ package org.betterx.betterend.integration.byg.biomes;
|
||||||
|
|
||||||
import org.betterx.bclib.BCLib;
|
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.rules.RoughNoiseCondition;
|
||||||
|
import org.betterx.bclib.interfaces.SurfaceMaterialProvider;
|
||||||
import org.betterx.betterend.integration.Integrations;
|
import org.betterx.betterend.integration.Integrations;
|
||||||
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;
|
||||||
|
@ -17,12 +20,13 @@ import net.minecraft.world.entity.MobCategory;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
import net.minecraft.world.level.biome.BiomeSpecialEffects;
|
import net.minecraft.world.level.biome.BiomeSpecialEffects;
|
||||||
import net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData;
|
import net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
||||||
|
import net.minecraft.world.level.levelgen.Noises;
|
||||||
|
import net.minecraft.world.level.levelgen.SurfaceRules;
|
||||||
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
|
|
||||||
public class OldBulbisGardens extends EndBiome.Config {
|
public class OldBulbisGardens extends EndBiome.Config {
|
||||||
|
@ -35,12 +39,6 @@ public class OldBulbisGardens extends EndBiome.Config {
|
||||||
Holder<Biome> biome = Integrations.BYG.getBiome("bulbis_gardens");
|
Holder<Biome> biome = Integrations.BYG.getBiome("bulbis_gardens");
|
||||||
BiomeSpecialEffects effects = biome.value().getSpecialEffects();
|
BiomeSpecialEffects effects = biome.value().getSpecialEffects();
|
||||||
|
|
||||||
Block ivis = Integrations.BYG.getBlock("ivis_phylium");
|
|
||||||
// Block origin = biome.value()
|
|
||||||
// .getGenerationSettings()
|
|
||||||
// .getSurfaceBuilderConfig()
|
|
||||||
// .getTopMaterial()
|
|
||||||
// .getBlock();
|
|
||||||
builder.fogColor(215, 132, 207)
|
builder.fogColor(215, 132, 207)
|
||||||
.fogDensity(1.8F)
|
.fogDensity(1.8F)
|
||||||
.waterAndFogColor(40, 0, 56)
|
.waterAndFogColor(40, 0, 56)
|
||||||
|
@ -49,8 +47,6 @@ public class OldBulbisGardens extends EndBiome.Config {
|
||||||
ParticleTypes.REVERSE_PORTAL,
|
ParticleTypes.REVERSE_PORTAL,
|
||||||
0.002F
|
0.002F
|
||||||
)
|
)
|
||||||
//TODO: 1.18 surface rules
|
|
||||||
//.surface(ivis, origin)
|
|
||||||
.feature(EndFeatures.END_LAKE_RARE)
|
.feature(EndFeatures.END_LAKE_RARE)
|
||||||
.feature(BYGFeatures.OLD_BULBIS_TREE);
|
.feature(BYGFeatures.OLD_BULBIS_TREE);
|
||||||
|
|
||||||
|
@ -85,11 +81,10 @@ public class OldBulbisGardens extends EndBiome.Config {
|
||||||
List<HolderSet<PlacedFeature>> features = biome.value().getGenerationSettings()
|
List<HolderSet<PlacedFeature>> features = biome.value().getGenerationSettings()
|
||||||
.features();
|
.features();
|
||||||
HolderSet<PlacedFeature> vegetal = features.get(Decoration.VEGETAL_DECORATION.ordinal());
|
HolderSet<PlacedFeature> vegetal = features.get(Decoration.VEGETAL_DECORATION.ordinal());
|
||||||
if (vegetal.size() > 2) {
|
// if (vegetal.size() > 2) {
|
||||||
Supplier<PlacedFeature> getter;
|
// Supplier<PlacedFeature> getter;
|
||||||
//TODO: 1.18.2 BRING BACK FEATURE COPY CODE
|
for (var feature : vegetal) {
|
||||||
for (var placed : vegetal) {
|
builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
||||||
System.out.print(placed);
|
|
||||||
}
|
}
|
||||||
// // Trees (first two features)
|
// // Trees (first two features)
|
||||||
// // I couldn't process them with conditions, so that's why they are hardcoded (paulevs)
|
// // I couldn't process them with conditions, so that's why they are hardcoded (paulevs)
|
||||||
|
@ -110,7 +105,7 @@ public class OldBulbisGardens extends EndBiome.Config {
|
||||||
// Holder<PlacedFeature> feature = getter.get();
|
// Holder<PlacedFeature> feature = getter.get();
|
||||||
// builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
// builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
||||||
// }
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
builder.feature(EndFeatures.PURPLE_POLYPORE)
|
builder.feature(EndFeatures.PURPLE_POLYPORE)
|
||||||
.feature(BYGFeatures.IVIS_MOSS_WOOD)
|
.feature(BYGFeatures.IVIS_MOSS_WOOD)
|
||||||
|
@ -118,4 +113,41 @@ public class OldBulbisGardens extends EndBiome.Config {
|
||||||
.feature(BYGFeatures.IVIS_VINE)
|
.feature(BYGFeatures.IVIS_VINE)
|
||||||
.feature(BYGFeatures.IVIS_SPROUT);
|
.feature(BYGFeatures.IVIS_SPROUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected SurfaceMaterialProvider surfaceMaterial() {
|
||||||
|
return new EndBiome.DefaultSurfaceMaterialProvider() {
|
||||||
|
@Override
|
||||||
|
public BlockState getTopMaterial() {
|
||||||
|
return Integrations.BYG.getBlock("ivis_phylium").defaultBlockState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getAltTopMaterial() {
|
||||||
|
return Integrations.BYG.getBlock("bulbis_phycelium").defaultBlockState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SurfaceRuleBuilder surface() {
|
||||||
|
return SurfaceRuleBuilder
|
||||||
|
.start()
|
||||||
|
.rule(4, SurfaceRules.sequence(SurfaceRules.ifTrue(
|
||||||
|
BYGBiomes.BYG_WATER_CHECK,
|
||||||
|
SurfaceRules.ifTrue(
|
||||||
|
SurfaceRules.ON_FLOOR,
|
||||||
|
SurfaceRules.sequence(
|
||||||
|
SurfaceRules.ifTrue(
|
||||||
|
new RoughNoiseCondition(Noises.NETHERRACK, 0.19),
|
||||||
|
SurfaceRules.state(getTopMaterial())
|
||||||
|
),
|
||||||
|
SurfaceRules.state(getAltTopMaterial())
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,14 +56,26 @@ public class BYGFeatures {
|
||||||
8
|
8
|
||||||
);
|
);
|
||||||
|
|
||||||
|
public static final NightshadeRedwoodTreeFeature NIGHTSHADE_REDWOOD_TREE_FEATURE =
|
||||||
|
EndFeatures.inlineBuild(
|
||||||
|
"nightshade_redwood_tree",
|
||||||
|
new NightshadeRedwoodTreeFeature()
|
||||||
|
);
|
||||||
|
|
||||||
public static final BCLFeature<NightshadeRedwoodTreeFeature, NoneFeatureConfiguration> NIGHTSHADE_REDWOOD_TREE = redisterVegetation(
|
public static final BCLFeature<NightshadeRedwoodTreeFeature, NoneFeatureConfiguration> NIGHTSHADE_REDWOOD_TREE = redisterVegetation(
|
||||||
"nightshade_redwood_tree",
|
"nightshade_redwood_tree",
|
||||||
new NightshadeRedwoodTreeFeature(),
|
NIGHTSHADE_REDWOOD_TREE_FEATURE,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
public static final BigEtherTreeFeature BIG_ETHER_TREE_FEATURE =
|
||||||
|
EndFeatures.inlineBuild(
|
||||||
|
"big_ether_tree",
|
||||||
|
new BigEtherTreeFeature()
|
||||||
|
);
|
||||||
|
|
||||||
public static final BCLFeature<BigEtherTreeFeature, NoneFeatureConfiguration> BIG_ETHER_TREE = redisterVegetation(
|
public static final BCLFeature<BigEtherTreeFeature, NoneFeatureConfiguration> BIG_ETHER_TREE = redisterVegetation(
|
||||||
"big_ether_tree",
|
"big_ether_tree",
|
||||||
new BigEtherTreeFeature(),
|
BIG_ETHER_TREE_FEATURE,
|
||||||
1
|
1
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue