Biome, Structure and Feature fixes
This commit is contained in:
parent
bcde62209b
commit
1cdbcacd7b
45 changed files with 112 additions and 99 deletions
|
@ -1,5 +1,6 @@
|
||||||
package ru.betterend.integration;
|
package ru.betterend.integration;
|
||||||
|
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.MappedRegistry;
|
import net.minecraft.core.MappedRegistry;
|
||||||
import net.minecraft.resources.ResourceKey;
|
import net.minecraft.resources.ResourceKey;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
|
@ -22,7 +23,7 @@ public class EnderscapeIntegration extends ModIntegration {
|
||||||
MappedRegistry<?> biomes = getStaticFieldValue(enderscape, "ENDERSCAPE_BIOME");
|
MappedRegistry<?> biomes = getStaticFieldValue(enderscape, "ENDERSCAPE_BIOME");
|
||||||
biomes.entrySet().forEach(entry -> {
|
biomes.entrySet().forEach(entry -> {
|
||||||
ResourceKey key = entry.getKey();
|
ResourceKey key = entry.getKey();
|
||||||
Biome biome = getBiome(key.location().getPath());
|
Holder<Biome> biome = getBiome(key.location().getPath());
|
||||||
if (enderscapeIslandsBiome.isInstance(entry.getValue())) {
|
if (enderscapeIslandsBiome.isInstance(entry.getValue())) {
|
||||||
BiomeAPI.registerEndVoidBiome(biome);
|
BiomeAPI.registerEndVoidBiome(biome);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package ru.betterend.integration.byg.biomes;
|
package ru.betterend.integration.byg.biomes;
|
||||||
|
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.particles.ParticleTypes;
|
import net.minecraft.core.particles.ParticleTypes;
|
||||||
import net.minecraft.sounds.SoundEvent;
|
import net.minecraft.sounds.SoundEvent;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
|
@ -25,8 +26,8 @@ public class NightshadeRedwoods extends EndBiome.Config {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||||
Biome biome = Integrations.BYG.getBiome("nightshade_forest");
|
Holder<Biome> biome = Integrations.BYG.getBiome("nightshade_forest");
|
||||||
BiomeSpecialEffects effects = biome.getSpecialEffects();
|
BiomeSpecialEffects effects = biome.value().getSpecialEffects();
|
||||||
|
|
||||||
builder.fogColor(140, 108, 47)
|
builder.fogColor(140, 108, 47)
|
||||||
.fogDensity(1.5F)
|
.fogDensity(1.5F)
|
||||||
|
@ -64,16 +65,17 @@ public class NightshadeRedwoods extends EndBiome.Config {
|
||||||
.additions(additions)
|
.additions(additions)
|
||||||
.mood(mood);
|
.mood(mood);
|
||||||
}
|
}
|
||||||
biome.getGenerationSettings()
|
biome.value().getGenerationSettings()
|
||||||
.features()
|
.features()
|
||||||
.forEach((list) -> {
|
.forEach((list) -> {
|
||||||
list.forEach((feature) -> {
|
list.forEach((feature) -> {
|
||||||
builder.feature(Decoration.VEGETAL_DECORATION, feature.get());
|
builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
for (MobCategory group : MobCategory.values()) {
|
for (MobCategory group : MobCategory.values()) {
|
||||||
List<SpawnerData> list = biome.getMobSettings()
|
List<SpawnerData> list = biome.value()
|
||||||
|
.getMobSettings()
|
||||||
.getMobs(group)
|
.getMobs(group)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
list.forEach((entry) -> {
|
list.forEach((entry) -> {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package ru.betterend.integration.byg.biomes;
|
package ru.betterend.integration.byg.biomes;
|
||||||
|
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
|
import net.minecraft.core.HolderSet;
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.core.particles.ParticleTypes;
|
import net.minecraft.core.particles.ParticleTypes;
|
||||||
import net.minecraft.data.BuiltinRegistries;
|
import net.minecraft.data.BuiltinRegistries;
|
||||||
|
@ -33,8 +35,8 @@ public class OldBulbisGardens extends EndBiome.Config {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||||
Biome biome = Integrations.BYG.getBiome("bulbis_gardens");
|
Holder<Biome> biome = Integrations.BYG.getBiome("bulbis_gardens");
|
||||||
BiomeSpecialEffects effects = biome.getSpecialEffects();
|
BiomeSpecialEffects effects = biome.value().getSpecialEffects();
|
||||||
|
|
||||||
Block ivis = Integrations.BYG.getBlock("ivis_phylium");
|
Block ivis = Integrations.BYG.getBlock("ivis_phylium");
|
||||||
// Block origin = biome.getGenerationSettings()
|
// Block origin = biome.getGenerationSettings()
|
||||||
|
@ -81,29 +83,28 @@ public class OldBulbisGardens extends EndBiome.Config {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
List<List<Supplier<PlacedFeature>>> features = biome.getGenerationSettings()
|
List<HolderSet<PlacedFeature>> features = biome.getGenerationSettings()
|
||||||
.features();
|
.features();
|
||||||
List<Supplier<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;
|
||||||
// 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)
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
getter = vegetal.get(i);
|
getter = vegetal.get(i);
|
||||||
PlacedFeature feature = getter.get();
|
Holder<PlacedFeature> feature = getter.get();
|
||||||
ResourceLocation id = BetterEnd.makeID("obg_feature_" + i);
|
ResourceLocation id = BetterEnd.makeID("obg_feature_" + i);
|
||||||
feature = Registry.register(
|
feature = Registry.register(
|
||||||
BuiltinRegistries.PLACED_FEATURE,
|
BuiltinRegistries.PLACED_FEATURE,
|
||||||
id,
|
id,
|
||||||
//TODO: 1.18 Check if this is correct
|
feature
|
||||||
feature//.decorated(FeaturesAccesor.shadowHEIGHTMAP_SQUARE).countRandom(1)
|
|
||||||
);
|
);
|
||||||
builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
||||||
}
|
}
|
||||||
// Grasses and other features
|
// Grasses and other features
|
||||||
for (int i = 2; i < vegetal.size(); i++) {
|
for (int i = 2; i < vegetal.size(); i++) {
|
||||||
getter = vegetal.get(i);
|
getter = vegetal.get(i);
|
||||||
PlacedFeature feature = getter.get();
|
Holder<PlacedFeature> feature = getter.get();
|
||||||
builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
builder.feature(Decoration.VEGETAL_DECORATION, feature);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package ru.betterend.integration.byg.features;
|
||||||
|
|
||||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
||||||
|
import ru.bclib.api.features.BCLCommonFeatures;
|
||||||
import ru.bclib.world.features.BCLFeature;
|
import ru.bclib.world.features.BCLFeature;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.integration.Integrations;
|
import ru.betterend.integration.Integrations;
|
||||||
|
@ -59,6 +60,6 @@ public class BYGFeatures {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BCLFeature redisterVegetation(String name, Feature<NoneFeatureConfiguration> feature, int density) {
|
private static BCLFeature redisterVegetation(String name, Feature<NoneFeatureConfiguration> feature, int density) {
|
||||||
return BCLFeature.makeVegetationFeature(BetterEnd.makeID(name), feature, density);
|
return BCLCommonFeatures.makeVegetationFeature(BetterEnd.makeID(name), feature, density);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
package ru.betterend.interfaces;
|
|
||||||
|
|
||||||
import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature;
|
|
||||||
import net.minecraft.world.level.levelgen.feature.StructureFeature;
|
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
|
||||||
|
|
||||||
public interface StructureFeaturesAccessor {
|
|
||||||
ConfiguredStructureFeature<NoneFeatureConfiguration, ? extends StructureFeature<NoneFeatureConfiguration>> getEndCity();
|
|
||||||
}
|
|
|
@ -86,7 +86,7 @@ public abstract class MusicTrackerMixin {
|
||||||
if (minecraft.level == null) {
|
if (minecraft.level == null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return BiomeAPI.getRenderBiome(minecraft.level.getBiome(minecraft.player.blockPosition())) instanceof EndBiome;
|
return BiomeAPI.getRenderBiome(minecraft.level.getBiome(minecraft.player.blockPosition()).value()) instanceof EndBiome;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean be_shouldChangeSound(Music musicSound) {
|
private boolean be_shouldChangeSound(Music musicSound) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ import net.minecraft.world.level.block.state.pattern.BlockPattern;
|
||||||
import net.minecraft.world.level.dimension.end.DragonRespawnAnimation;
|
import net.minecraft.world.level.dimension.end.DragonRespawnAnimation;
|
||||||
import net.minecraft.world.level.dimension.end.EndDragonFight;
|
import net.minecraft.world.level.dimension.end.EndDragonFight;
|
||||||
import net.minecraft.world.phys.AABB;
|
import net.minecraft.world.phys.AABB;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
@ -30,9 +30,7 @@ public class EndDragonFightMixin {
|
||||||
private boolean dragonKilled;
|
private boolean dragonKilled;
|
||||||
@Shadow
|
@Shadow
|
||||||
private BlockPos portalLocation;
|
private BlockPos portalLocation;
|
||||||
@Final
|
@Shadow @Final private static Logger LOGGER;
|
||||||
@Shadow
|
|
||||||
private static Logger LOGGER;
|
|
||||||
@Final
|
@Final
|
||||||
@Shadow
|
@Shadow
|
||||||
private ServerLevel level;
|
private ServerLevel level;
|
||||||
|
|
|
@ -2,6 +2,7 @@ package ru.betterend.mixin.common;
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket;
|
import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket;
|
||||||
import net.minecraft.network.protocol.game.ClientboundLevelEventPacket;
|
import net.minecraft.network.protocol.game.ClientboundLevelEventPacket;
|
||||||
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket;
|
import net.minecraft.network.protocol.game.ClientboundPlayerAbilitiesPacket;
|
||||||
|
@ -89,7 +90,7 @@ public abstract class ServerPlayerMixin extends Player implements TeleportingEnt
|
||||||
LevelData worldProperties = destination.getLevelData();
|
LevelData worldProperties = destination.getLevelData();
|
||||||
ServerPlayer player = ServerPlayer.class.cast(this);
|
ServerPlayer player = ServerPlayer.class.cast(this);
|
||||||
connection.send(new ClientboundRespawnPacket(
|
connection.send(new ClientboundRespawnPacket(
|
||||||
destination.dimensionType(),
|
new Holder.Direct(destination.dimensionType()),
|
||||||
destination.dimension(),
|
destination.dimension(),
|
||||||
BiomeManager.obfuscateSeed(destination.getSeed()),
|
BiomeManager.obfuscateSeed(destination.getSeed()),
|
||||||
gameMode.getGameModeForPlayer(),
|
gameMode.getGameModeForPlayer(),
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
package ru.betterend.mixin.common;
|
|
||||||
|
|
||||||
import net.minecraft.data.worldgen.StructureFeatures;
|
|
||||||
import net.minecraft.world.level.levelgen.feature.ConfiguredStructureFeature;
|
|
||||||
import net.minecraft.world.level.levelgen.feature.StructureFeature;
|
|
||||||
import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
|
|
||||||
import org.spongepowered.asm.mixin.Final;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
|
||||||
import ru.betterend.interfaces.StructureFeaturesAccessor;
|
|
||||||
|
|
||||||
@Mixin(StructureFeatures.class)
|
|
||||||
public class StructureFeaturesMixin implements StructureFeaturesAccessor {
|
|
||||||
@Shadow @Final private static ConfiguredStructureFeature<NoneFeatureConfiguration, ? extends StructureFeature<NoneFeatureConfiguration>> END_CITY;
|
|
||||||
|
|
||||||
public ConfiguredStructureFeature<NoneFeatureConfiguration, ? extends StructureFeature<NoneFeatureConfiguration>> getEndCity(){
|
|
||||||
return END_CITY;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -3,6 +3,7 @@ package ru.betterend.registry;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.data.BuiltinRegistries;
|
import net.minecraft.data.BuiltinRegistries;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
@ -304,15 +305,21 @@ public class EndFeatures {
|
||||||
|
|
||||||
private static BCLFeature registerLayer(String name, Block block, float radius, int minY, int maxY, int count) {
|
private static BCLFeature registerLayer(String name, Block block, float radius, int minY, int maxY, int count) {
|
||||||
OreLayerFeature layer = new OreLayerFeature(block.defaultBlockState(), radius, minY, maxY);
|
OreLayerFeature layer = new OreLayerFeature(block.defaultBlockState(), radius, minY, maxY);
|
||||||
PlacedFeature configured = layer.configured(FeatureConfiguration.NONE).placed(new PlacementModifier[]{CountPlacement.of(count)});
|
//PlacedFeature configured = layer.configured(FeatureConfiguration.NONE).placed(new PlacementModifier[]{CountPlacement.of(count)});
|
||||||
return new BCLFeature(BetterEnd.makeID(name), layer, GenerationStep.Decoration.UNDERGROUND_ORES, configured);
|
// return new BCLFeature(BetterEnd.makeID(name), layer, GenerationStep.Decoration.UNDERGROUND_ORES, configured);
|
||||||
|
|
||||||
|
return BCLFeatureBuilder
|
||||||
|
.start(BetterEnd.makeID(name), layer)
|
||||||
|
.decoration( GenerationStep.Decoration.UNDERGROUND_ORES)
|
||||||
|
.modifier(CountPlacement.of(count))
|
||||||
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static BCLFeature registerLayer(String name, StoneMaterial material, float radius, int minY, int maxY, int count) {
|
private static BCLFeature registerLayer(String name, StoneMaterial material, float radius, int minY, int maxY, int count) {
|
||||||
return registerLayer(name, material.stone, radius, minY, maxY, count);
|
return registerLayer(name, material.stone, radius, minY, maxY, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addBiomeFeatures(ResourceLocation id, Biome biome) {
|
public static void addBiomeFeatures(ResourceLocation id, Holder<Biome> biome) {
|
||||||
BiomeAPI.addBiomeFeature(biome, FLAVOLITE_LAYER);
|
BiomeAPI.addBiomeFeature(biome, FLAVOLITE_LAYER);
|
||||||
BiomeAPI.addBiomeFeature(biome, THALLASIUM_ORE);
|
BiomeAPI.addBiomeFeature(biome, THALLASIUM_ORE);
|
||||||
BiomeAPI.addBiomeFeature(biome, ENDER_ORE);
|
BiomeAPI.addBiomeFeature(biome, ENDER_ORE);
|
||||||
|
@ -345,7 +352,12 @@ public class EndFeatures {
|
||||||
if (BuiltinRegistries.PLACED_FEATURE.containsKey(id)) {
|
if (BuiltinRegistries.PLACED_FEATURE.containsKey(id)) {
|
||||||
PlacedFeature placed = BuiltinRegistries.PLACED_FEATURE.get(id);
|
PlacedFeature placed = BuiltinRegistries.PLACED_FEATURE.get(id);
|
||||||
Feature<?> feature = Registry.FEATURE.get(id);
|
Feature<?> feature = Registry.FEATURE.get(id);
|
||||||
return new BCLFeature(id, feature, Decoration.SURFACE_STRUCTURES, placed);
|
//return new BCLFeature(id, feature, Decoration.SURFACE_STRUCTURES, placed);
|
||||||
|
return BCLFeatureBuilder
|
||||||
|
.start(id, feature)
|
||||||
|
.decoration(Decoration.SURFACE_STRUCTURES)
|
||||||
|
.modifier(placed.placement())
|
||||||
|
.build(placed.feature().value().config());
|
||||||
}
|
}
|
||||||
|
|
||||||
String path = "/data/" + ns + "/structures/biome/" + nm + "/";
|
String path = "/data/" + ns + "/structures/biome/" + nm + "/";
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
package ru.betterend.registry;
|
package ru.betterend.registry;
|
||||||
|
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.Registry;
|
import net.minecraft.core.Registry;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
||||||
import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceType;
|
import net.minecraft.world.level.levelgen.structure.pieces.StructurePieceType;
|
||||||
import ru.bclib.api.biomes.BiomeAPI;
|
import ru.bclib.api.biomes.BiomeAPI;
|
||||||
|
import ru.bclib.api.tag.TagAPI;
|
||||||
import ru.bclib.world.structures.BCLStructureFeature;
|
import ru.bclib.world.structures.BCLStructureFeature;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.world.structures.features.EternalPortalStructure;
|
import ru.betterend.world.structures.features.EternalPortalStructure;
|
||||||
|
@ -86,9 +88,9 @@ public class EndStructures {
|
||||||
return Registry.register(Registry.STRUCTURE_PIECE, BetterEnd.makeID(id), pieceType);
|
return Registry.register(Registry.STRUCTURE_PIECE, BetterEnd.makeID(id), pieceType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addBiomeStructures(ResourceLocation biomeID, Biome biome) {
|
public static void addBiomeStructures(ResourceLocation biomeID, Holder<Biome> biome) {
|
||||||
if (!biomeID.getPath().contains("mountain") && !biomeID.getPath().contains("lake")) {
|
if (!biomeID.getPath().contains("mountain") && !biomeID.getPath().contains("lake")) {
|
||||||
BiomeAPI.addBiomeStructure(BiomeAPI.getBiomeKey(biome), ETERNAL_PORTAL);
|
TagAPI.addBiomeTag(ETERNAL_PORTAL.biomeTag, biome.value());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,7 @@ public class EndTags {
|
||||||
ITEM_HAMMERS.add(item);
|
ITEM_HAMMERS.add(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ToolManagerImpl.tag(CommonItemTags.HAMMERS).register(new ModdedToolsVanillaBlocksToolHandler(ITEM_HAMMERS));
|
ToolManagerImpl.tag(CommonItemTags.HAMMERS).register(new ModdedToolsVanillaBlocksToolHandler(ITEM_HAMMERS));
|
||||||
|
|
||||||
TagAPI.addBlockTag(
|
TagAPI.addBlockTag(
|
||||||
|
@ -128,9 +129,9 @@ public class EndTags {
|
||||||
);
|
);
|
||||||
TagAPI.addItemTag(NamedCommonItemTags.IRON_INGOTS, EndBlocks.THALLASIUM.ingot);
|
TagAPI.addItemTag(NamedCommonItemTags.IRON_INGOTS, EndBlocks.THALLASIUM.ingot);
|
||||||
|
|
||||||
TagAPI.addItemTag(ALLOYING_IRON.getName(), Items.IRON_ORE, Items.DEEPSLATE_IRON_ORE, Items.RAW_IRON);
|
TagAPI.addItemTag(ALLOYING_IRON, Items.IRON_ORE, Items.DEEPSLATE_IRON_ORE, Items.RAW_IRON);
|
||||||
TagAPI.addItemTag(ALLOYING_GOLD.getName(), Items.GOLD_ORE, Items.DEEPSLATE_GOLD_ORE, Items.RAW_GOLD);
|
TagAPI.addItemTag(ALLOYING_GOLD, Items.GOLD_ORE, Items.DEEPSLATE_GOLD_ORE, Items.RAW_GOLD);
|
||||||
TagAPI.addItemTag(ALLOYING_COPPER.getName(), Items.COPPER_ORE, Items.DEEPSLATE_COPPER_ORE, Items.RAW_COPPER);
|
TagAPI.addItemTag(ALLOYING_COPPER, Items.COPPER_ORE, Items.DEEPSLATE_COPPER_ORE, Items.RAW_COPPER);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void addEndGround(Block bl){
|
public static void addEndGround(Block bl){
|
||||||
|
|
|
@ -441,7 +441,7 @@ public class EternalRitual {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (targetWorld.dimension() == Level.END) {
|
if (targetWorld.dimension() == Level.END) {
|
||||||
net.minecraft.data.worldgen.features.EndFeatures.END_ISLAND.place(
|
net.minecraft.data.worldgen.features.EndFeatures.END_ISLAND.value().place(
|
||||||
targetWorld,
|
targetWorld,
|
||||||
targetWorld.getChunkSource().getGenerator(),
|
targetWorld.getChunkSource().getGenerator(),
|
||||||
new Random(basePos.asLong()),
|
new Random(basePos.asLong()),
|
||||||
|
@ -453,6 +453,7 @@ public class EternalRitual {
|
||||||
}
|
}
|
||||||
EndFeatures.BIOME_ISLAND
|
EndFeatures.BIOME_ISLAND
|
||||||
.getPlacedFeature()
|
.getPlacedFeature()
|
||||||
|
.value()
|
||||||
.place(targetWorld,
|
.place(targetWorld,
|
||||||
targetWorld.getChunkSource().getGenerator(),
|
targetWorld.getChunkSource().getGenerator(),
|
||||||
new Random(basePos.asLong()),
|
new Random(basePos.asLong()),
|
||||||
|
|
|
@ -3,6 +3,7 @@ package ru.betterend.util;
|
||||||
import net.fabricmc.fabric.api.loot.v1.FabricLootPoolBuilder;
|
import net.fabricmc.fabric.api.loot.v1.FabricLootPoolBuilder;
|
||||||
import net.fabricmc.fabric.api.loot.v1.FabricLootSupplierBuilder;
|
import net.fabricmc.fabric.api.loot.v1.FabricLootSupplierBuilder;
|
||||||
import net.fabricmc.fabric.api.loot.v1.event.LootTableLoadingCallback;
|
import net.fabricmc.fabric.api.loot.v1.event.LootTableLoadingCallback;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.item.Items;
|
import net.minecraft.world.item.Items;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
|
@ -92,8 +93,8 @@ public class LootTableUtil {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ResourceLocation getTable(Biome biome) {
|
public static ResourceLocation getTable(Holder<Biome> biome) {
|
||||||
BCLBiome bclBiome = BiomeAPI.getBiome(biome);
|
BCLBiome bclBiome = BiomeAPI.getBiome(biome.value());
|
||||||
if (bclBiome == EndBiomes.FOGGY_MUSHROOMLAND) {
|
if (bclBiome == EndBiomes.FOGGY_MUSHROOMLAND) {
|
||||||
return FOGGY_MUSHROOMLAND;
|
return FOGGY_MUSHROOMLAND;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package ru.betterend.world.biome;
|
package ru.betterend.world.biome;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.data.worldgen.StructureFeatures;
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.sounds.SoundEvents;
|
import net.minecraft.sounds.SoundEvents;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
|
@ -17,7 +16,6 @@ import ru.bclib.interfaces.SurfaceMaterialProvider;
|
||||||
import ru.bclib.world.biomes.BCLBiome;
|
import ru.bclib.world.biomes.BCLBiome;
|
||||||
import ru.bclib.world.biomes.BCLBiomeSettings;
|
import ru.bclib.world.biomes.BCLBiomeSettings;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.interfaces.StructureFeaturesAccessor;
|
|
||||||
import ru.betterend.registry.EndBlocks;
|
import ru.betterend.registry.EndBlocks;
|
||||||
import ru.betterend.registry.EndFeatures;
|
import ru.betterend.registry.EndFeatures;
|
||||||
import ru.betterend.registry.EndSounds;
|
import ru.betterend.registry.EndSounds;
|
||||||
|
@ -64,7 +62,6 @@ public class EndBiome extends BCLBiome implements SurfaceMaterialProvider {
|
||||||
public abstract static class Config {
|
public abstract static class Config {
|
||||||
public static final SurfaceMaterialProvider DEFAULT_MATERIAL = new DefaultSurfaceMaterialProvider();
|
public static final SurfaceMaterialProvider DEFAULT_MATERIAL = new DefaultSurfaceMaterialProvider();
|
||||||
|
|
||||||
protected static final StructureFeaturesAccessor VANILLA_FEATURES = (StructureFeaturesAccessor)new StructureFeatures();
|
|
||||||
protected static final SurfaceRules.RuleSource END_STONE = SurfaceRules.state(DefaultSurfaceMaterialProvider.END_STONE);
|
protected static final SurfaceRules.RuleSource END_STONE = SurfaceRules.state(DefaultSurfaceMaterialProvider.END_STONE);
|
||||||
protected static final SurfaceRules.RuleSource END_MOSS = SurfaceRules.state(EndBlocks.END_MOSS.defaultBlockState());
|
protected static final SurfaceRules.RuleSource END_MOSS = SurfaceRules.state(EndBlocks.END_MOSS.defaultBlockState());
|
||||||
protected static final SurfaceRules.RuleSource ENDSTONE_DUST = SurfaceRules.state(EndBlocks.ENDSTONE_DUST.defaultBlockState());
|
protected static final SurfaceRules.RuleSource ENDSTONE_DUST = SurfaceRules.state(EndBlocks.ENDSTONE_DUST.defaultBlockState());
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class BiomeIceStarfield extends EndBiome.Config {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||||
builder.structure(EndStructures.GIANT_ICE_STAR.getFeatureConfigured())
|
builder.structure(EndStructures.GIANT_ICE_STAR)
|
||||||
.fogColor(224, 245, 254)
|
.fogColor(224, 245, 254)
|
||||||
.temperature(0F)
|
.temperature(0F)
|
||||||
.fogDensity(2.2F)
|
.fogDensity(2.2F)
|
||||||
|
|
|
@ -10,6 +10,8 @@ import net.minecraft.world.level.levelgen.feature.Feature;
|
||||||
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
||||||
import ru.bclib.api.biomes.BCLBiomeBuilder.BiomeSupplier;
|
import ru.bclib.api.biomes.BCLBiomeBuilder.BiomeSupplier;
|
||||||
import ru.bclib.api.biomes.BiomeAPI;
|
import ru.bclib.api.biomes.BiomeAPI;
|
||||||
|
import ru.bclib.api.features.BCLCommonFeatures;
|
||||||
|
import ru.bclib.api.features.BCLFeatureBuilder;
|
||||||
import ru.bclib.util.WeightedList;
|
import ru.bclib.util.WeightedList;
|
||||||
import ru.bclib.world.biomes.BCLBiomeSettings;
|
import ru.bclib.world.biomes.BCLBiomeSettings;
|
||||||
import ru.bclib.world.features.BCLFeature;
|
import ru.bclib.world.features.BCLFeature;
|
||||||
|
@ -28,7 +30,7 @@ public class EndCaveBiome extends EndBiome {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||||
BCLFeature feature = BCLFeature.makeChunkFeature(
|
BCLFeature feature = BCLCommonFeatures.makeChunkFeature(
|
||||||
BetterEnd.makeID(ID.getPath() + "_cave_populator"),
|
BetterEnd.makeID(ID.getPath() + "_cave_populator"),
|
||||||
GenerationStep.Decoration.RAW_GENERATION,
|
GenerationStep.Decoration.RAW_GENERATION,
|
||||||
new CaveChunkPopulatorFeature(() -> (EndCaveBiome) BiomeAPI.getBiome(ID))
|
new CaveChunkPopulatorFeature(() -> (EndCaveBiome) BiomeAPI.getBiome(ID))
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package ru.betterend.world.biome.land;
|
package ru.betterend.world.biome.land;
|
||||||
|
|
||||||
|
import net.minecraft.tags.BiomeTags;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
||||||
|
@ -37,7 +38,7 @@ public class AmberLandBiome extends EndBiome.Config {
|
||||||
.feature(EndFeatures.BULB_MOSS_WOOD)
|
.feature(EndFeatures.BULB_MOSS_WOOD)
|
||||||
.feature(EndFeatures.CHARNIA_ORANGE)
|
.feature(EndFeatures.CHARNIA_ORANGE)
|
||||||
.feature(EndFeatures.CHARNIA_RED)
|
.feature(EndFeatures.CHARNIA_RED)
|
||||||
.structure(VANILLA_FEATURES.getEndCity())
|
.structure(BiomeTags.HAS_END_CITY)
|
||||||
.spawn(EntityType.ENDERMAN, 50, 1, 4)
|
.spawn(EntityType.ENDERMAN, 50, 1, 4)
|
||||||
.spawn(EndEntities.END_SLIME, 30, 1, 2);
|
.spawn(EndEntities.END_SLIME, 30, 1, 2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@ package ru.betterend.world.biome.land;
|
||||||
|
|
||||||
import net.minecraft.core.particles.ParticleTypes;
|
import net.minecraft.core.particles.ParticleTypes;
|
||||||
import net.minecraft.data.worldgen.placement.EndPlacements;
|
import net.minecraft.data.worldgen.placement.EndPlacements;
|
||||||
|
import net.minecraft.tags.BiomeTags;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
import net.minecraft.world.level.levelgen.GenerationStep.Decoration;
|
||||||
|
@ -40,7 +41,7 @@ public class ChorusForestBiome extends EndBiome.Config {
|
||||||
.feature(EndFeatures.TAIL_MOSS_WOOD)
|
.feature(EndFeatures.TAIL_MOSS_WOOD)
|
||||||
.feature(EndFeatures.CHARNIA_PURPLE)
|
.feature(EndFeatures.CHARNIA_PURPLE)
|
||||||
.feature(EndFeatures.CHARNIA_RED_RARE)
|
.feature(EndFeatures.CHARNIA_RED_RARE)
|
||||||
.structure(VANILLA_FEATURES.getEndCity())
|
.structure(BiomeTags.HAS_END_CITY)
|
||||||
.spawn(EndEntities.END_SLIME, 5, 1, 2)
|
.spawn(EndEntities.END_SLIME, 5, 1, 2)
|
||||||
.spawn(EntityType.ENDERMAN, 50, 1, 4);
|
.spawn(EntityType.ENDERMAN, 50, 1, 4);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class CrystalMountainsBiome extends EndBiome.Config {
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||||
builder
|
builder
|
||||||
.structure(EndStructures.MOUNTAIN.getFeatureConfigured())
|
.structure(EndStructures.MOUNTAIN)
|
||||||
.plantsColor(255, 133, 211)
|
.plantsColor(255, 133, 211)
|
||||||
.music(EndSounds.MUSIC_OPENSPACE)
|
.music(EndSounds.MUSIC_OPENSPACE)
|
||||||
.feature(EndFeatures.CRYSTAL_GRASS)
|
.feature(EndFeatures.CRYSTAL_GRASS)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package ru.betterend.world.biome.land;
|
package ru.betterend.world.biome.land;
|
||||||
|
|
||||||
|
import net.minecraft.tags.BiomeTags;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
||||||
|
@ -27,7 +28,7 @@ public class DryShrublandBiome extends EndBiome.Config {
|
||||||
.feature(EndFeatures.AERIDIUM)
|
.feature(EndFeatures.AERIDIUM)
|
||||||
.feature(EndFeatures.LUTEBUS)
|
.feature(EndFeatures.LUTEBUS)
|
||||||
.feature(EndFeatures.LAMELLARIUM)
|
.feature(EndFeatures.LAMELLARIUM)
|
||||||
.structure(VANILLA_FEATURES.getEndCity())
|
.structure(BiomeTags.HAS_END_CITY)
|
||||||
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package ru.betterend.world.biome.land;
|
package ru.betterend.world.biome.land;
|
||||||
|
|
||||||
import net.minecraft.core.particles.ParticleTypes;
|
import net.minecraft.core.particles.ParticleTypes;
|
||||||
|
import net.minecraft.tags.BiomeTags;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
@ -28,7 +29,7 @@ public class DustWastelandsBiome extends EndBiome.Config {
|
||||||
.particles(ParticleTypes.WHITE_ASH, 0.01F)
|
.particles(ParticleTypes.WHITE_ASH, 0.01F)
|
||||||
.loop(EndSounds.AMBIENT_DUST_WASTELANDS)
|
.loop(EndSounds.AMBIENT_DUST_WASTELANDS)
|
||||||
.music(EndSounds.MUSIC_OPENSPACE)
|
.music(EndSounds.MUSIC_OPENSPACE)
|
||||||
.structure(VANILLA_FEATURES.getEndCity())
|
.structure(BiomeTags.HAS_END_CITY)
|
||||||
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +46,7 @@ public class DustWastelandsBiome extends EndBiome.Config {
|
||||||
return super
|
return super
|
||||||
.surface()
|
.surface()
|
||||||
.ceil(Blocks.END_STONE.defaultBlockState())
|
.ceil(Blocks.END_STONE.defaultBlockState())
|
||||||
.rule(4, SurfaceRules.ifTrue(SurfaceRules.stoneDepthCheck(5, false, false, CaveSurface.FLOOR),
|
.rule(4, SurfaceRules.ifTrue(SurfaceRules.stoneDepthCheck(5, false, CaveSurface.FLOOR),
|
||||||
SurfaceRules.state(EndBlocks.ENDSTONE_DUST.defaultBlockState())
|
SurfaceRules.state(EndBlocks.ENDSTONE_DUST.defaultBlockState())
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package ru.betterend.world.biome.land;
|
package ru.betterend.world.biome.land;
|
||||||
|
|
||||||
|
import net.minecraft.tags.BiomeTags;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
||||||
|
@ -20,7 +21,7 @@ public class FoggyMushroomlandBiome extends EndBiome.Config {
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||||
builder
|
builder
|
||||||
.structure(EndStructures.GIANT_MOSSY_GLOWSHROOM.getFeatureConfigured())
|
.structure(EndStructures.GIANT_MOSSY_GLOWSHROOM)
|
||||||
.plantsColor(73, 210, 209)
|
.plantsColor(73, 210, 209)
|
||||||
.fogColor(41, 122, 173)
|
.fogColor(41, 122, 173)
|
||||||
.fogDensity(3)
|
.fogDensity(3)
|
||||||
|
@ -42,7 +43,7 @@ public class FoggyMushroomlandBiome extends EndBiome.Config {
|
||||||
.feature(EndFeatures.CHARNIA_CYAN)
|
.feature(EndFeatures.CHARNIA_CYAN)
|
||||||
.feature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
.feature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
||||||
.feature(EndFeatures.CHARNIA_RED_RARE)
|
.feature(EndFeatures.CHARNIA_RED_RARE)
|
||||||
.structure(VANILLA_FEATURES.getEndCity())
|
.structure(BiomeTags.HAS_END_CITY)
|
||||||
.spawn(EndEntities.DRAGONFLY, 80, 2, 5)
|
.spawn(EndEntities.DRAGONFLY, 80, 2, 5)
|
||||||
.spawn(EndEntities.END_FISH, 20, 2, 5)
|
.spawn(EndEntities.END_FISH, 20, 2, 5)
|
||||||
.spawn(EndEntities.CUBOZOA, 10, 3, 8)
|
.spawn(EndEntities.CUBOZOA, 10, 3, 8)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package ru.betterend.world.biome.land;
|
package ru.betterend.world.biome.land;
|
||||||
|
|
||||||
|
import net.minecraft.tags.BiomeTags;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
||||||
|
@ -38,7 +39,7 @@ public class GlowingGrasslandsBiome extends EndBiome.Config {
|
||||||
.feature(EndFeatures.CHARNIA_GREEN)
|
.feature(EndFeatures.CHARNIA_GREEN)
|
||||||
.feature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
.feature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
||||||
.feature(EndFeatures.CHARNIA_RED_RARE)
|
.feature(EndFeatures.CHARNIA_RED_RARE)
|
||||||
.structure(VANILLA_FEATURES.getEndCity())
|
.structure(BiomeTags.HAS_END_CITY)
|
||||||
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package ru.betterend.world.biome.land;
|
package ru.betterend.world.biome.land;
|
||||||
|
|
||||||
|
import net.minecraft.tags.BiomeTags;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
||||||
|
@ -38,7 +39,7 @@ public class LanternWoodsBiome extends EndBiome.Config {
|
||||||
.feature(EndFeatures.CHARNIA_RED)
|
.feature(EndFeatures.CHARNIA_RED)
|
||||||
.feature(EndFeatures.RUSCUS)
|
.feature(EndFeatures.RUSCUS)
|
||||||
.feature(EndFeatures.RUSCUS_WOOD)
|
.feature(EndFeatures.RUSCUS_WOOD)
|
||||||
.structure(VANILLA_FEATURES.getEndCity())
|
.structure(BiomeTags.HAS_END_CITY)
|
||||||
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ public class MegalakeBiome extends EndBiome.Config {
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||||
builder
|
builder
|
||||||
.structure(EndStructures.MEGALAKE.getFeatureConfigured())
|
.structure(EndStructures.MEGALAKE)
|
||||||
.plantsColor(73, 210, 209)
|
.plantsColor(73, 210, 209)
|
||||||
.fogColor(178, 209, 248)
|
.fogColor(178, 209, 248)
|
||||||
.waterAndFogColor(96, 163, 255)
|
.waterAndFogColor(96, 163, 255)
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class MegalakeGroveBiome extends EndBiome.Config {
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||||
builder
|
builder
|
||||||
.structure(EndStructures.MEGALAKE_SMALL.getFeatureConfigured())
|
.structure(EndStructures.MEGALAKE_SMALL)
|
||||||
.plantsColor(73, 210, 209)
|
.plantsColor(73, 210, 209)
|
||||||
.fogColor(178, 209, 248)
|
.fogColor(178, 209, 248)
|
||||||
.waterAndFogColor(96, 163, 255)
|
.waterAndFogColor(96, 163, 255)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package ru.betterend.world.biome.land;
|
package ru.betterend.world.biome.land;
|
||||||
|
|
||||||
import net.minecraft.core.particles.ParticleTypes;
|
import net.minecraft.core.particles.ParticleTypes;
|
||||||
|
import net.minecraft.tags.BiomeTags;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
@ -41,7 +42,7 @@ public class NeonOasisBiome extends EndBiome.Config {
|
||||||
.feature(EndFeatures.CHARNIA_GREEN)
|
.feature(EndFeatures.CHARNIA_GREEN)
|
||||||
.feature(EndFeatures.CHARNIA_CYAN)
|
.feature(EndFeatures.CHARNIA_CYAN)
|
||||||
.feature(EndFeatures.CHARNIA_RED)
|
.feature(EndFeatures.CHARNIA_RED)
|
||||||
.structure(VANILLA_FEATURES.getEndCity())
|
.structure(BiomeTags.HAS_END_CITY)
|
||||||
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,7 +72,7 @@ public class NeonOasisBiome extends EndBiome.Config {
|
||||||
.surface()
|
.surface()
|
||||||
.ceil(Blocks.END_STONE.defaultBlockState())
|
.ceil(Blocks.END_STONE.defaultBlockState())
|
||||||
.rule(1, SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, surfaceBlockRule))
|
.rule(1, SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, surfaceBlockRule))
|
||||||
.rule(4, SurfaceRules.ifTrue(SurfaceRules.stoneDepthCheck(5, false, false, CaveSurface.FLOOR),
|
.rule(4, SurfaceRules.ifTrue(SurfaceRules.stoneDepthCheck(5, false, CaveSurface.FLOOR),
|
||||||
SurfaceRules.state(EndBlocks.ENDSTONE_DUST.defaultBlockState())
|
SurfaceRules.state(EndBlocks.ENDSTONE_DUST.defaultBlockState())
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ public class PaintedMountainsBiome extends EndBiome.Config {
|
||||||
@Override
|
@Override
|
||||||
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
protected void addCustomBuildData(BCLBiomeBuilder builder) {
|
||||||
builder
|
builder
|
||||||
.structure(EndStructures.PAINTED_MOUNTAIN.getFeatureConfigured())
|
.structure(EndStructures.PAINTED_MOUNTAIN)
|
||||||
.fogColor(226, 239, 168)
|
.fogColor(226, 239, 168)
|
||||||
.fogDensity(2)
|
.fogDensity(2)
|
||||||
.waterAndFogColor(192, 180, 131)
|
.waterAndFogColor(192, 180, 131)
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package ru.betterend.world.biome.land;
|
package ru.betterend.world.biome.land;
|
||||||
|
|
||||||
import net.minecraft.core.particles.ParticleTypes;
|
import net.minecraft.core.particles.ParticleTypes;
|
||||||
|
import net.minecraft.tags.BiomeTags;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
||||||
|
@ -40,7 +41,7 @@ public class ShadowForestBiome extends EndBiome.Config {
|
||||||
.feature(EndFeatures.TAIL_MOSS_WOOD)
|
.feature(EndFeatures.TAIL_MOSS_WOOD)
|
||||||
.feature(EndFeatures.CHARNIA_PURPLE)
|
.feature(EndFeatures.CHARNIA_PURPLE)
|
||||||
.feature(EndFeatures.CHARNIA_RED_RARE)
|
.feature(EndFeatures.CHARNIA_RED_RARE)
|
||||||
.structure(VANILLA_FEATURES.getEndCity())
|
.structure(BiomeTags.HAS_END_CITY)
|
||||||
.spawn(EndEntities.SHADOW_WALKER, 80, 2, 4)
|
.spawn(EndEntities.SHADOW_WALKER, 80, 2, 4)
|
||||||
.spawn(EntityType.ENDERMAN, 40, 1, 4)
|
.spawn(EntityType.ENDERMAN, 40, 1, 4)
|
||||||
.spawn(EntityType.PHANTOM, 1, 1, 2);
|
.spawn(EntityType.PHANTOM, 1, 1, 2);
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class SulphurSpringsBiome extends EndBiome.Config {
|
||||||
return super
|
return super
|
||||||
.surface()
|
.surface()
|
||||||
.rule(2, SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, surfaceBlockRule))
|
.rule(2, SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, surfaceBlockRule))
|
||||||
.rule(2, SurfaceRules.ifTrue(SurfaceRules.stoneDepthCheck(5, false, false, CaveSurface.FLOOR), surfaceBlockRule));
|
.rule(2, SurfaceRules.ifTrue(SurfaceRules.stoneDepthCheck(5, false, CaveSurface.FLOOR), surfaceBlockRule));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package ru.betterend.world.biome.land;
|
package ru.betterend.world.biome.land;
|
||||||
|
|
||||||
|
import net.minecraft.tags.BiomeTags;
|
||||||
import net.minecraft.world.entity.EntityType;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
import ru.bclib.api.biomes.BCLBiomeBuilder;
|
||||||
|
@ -42,7 +43,7 @@ public class UmbrellaJungleBiome extends EndBiome.Config {
|
||||||
.feature(EndFeatures.CHARNIA_GREEN)
|
.feature(EndFeatures.CHARNIA_GREEN)
|
||||||
.feature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
.feature(EndFeatures.CHARNIA_LIGHT_BLUE)
|
||||||
.feature(EndFeatures.CHARNIA_RED_RARE)
|
.feature(EndFeatures.CHARNIA_RED_RARE)
|
||||||
.structure(VANILLA_FEATURES.getEndCity())
|
.structure(BiomeTags.HAS_END_CITY)
|
||||||
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
.spawn(EntityType.ENDERMAN, 50, 1, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ package ru.betterend.world.features;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
import net.minecraft.world.level.block.Blocks;
|
||||||
|
@ -29,7 +30,7 @@ public class BiomeIslandFeature extends DefaultFeature {
|
||||||
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
public boolean place(FeaturePlaceContext<NoneFeatureConfiguration> featureConfig) {
|
||||||
final BlockPos pos = featureConfig.origin();
|
final BlockPos pos = featureConfig.origin();
|
||||||
final WorldGenLevel world = featureConfig.level();
|
final WorldGenLevel world = featureConfig.level();
|
||||||
Biome biome = world.getBiome(pos);
|
//Holder<Biome> biome = world.getBiome(pos);
|
||||||
int dist = BlocksHelper.downRay(world, pos, 10) + 1;
|
int dist = BlocksHelper.downRay(world, pos, 10) + 1;
|
||||||
BlockPos surfacePos = new BlockPos(pos.getX(), pos.getY()-dist, pos.getZ());
|
BlockPos surfacePos = new BlockPos(pos.getX(), pos.getY()-dist, pos.getZ());
|
||||||
BlockState topMaterial = EndBiome.findTopMaterial(world, surfacePos);;
|
BlockState topMaterial = EndBiome.findTopMaterial(world, surfacePos);;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package ru.betterend.world.features;
|
package ru.betterend.world.features;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.world.level.LevelReader;
|
import net.minecraft.world.level.LevelReader;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
import net.minecraft.world.level.block.ChestBlock;
|
import net.minecraft.world.level.block.ChestBlock;
|
||||||
|
@ -42,7 +43,7 @@ public class BuildingListFeature extends ListFeature {
|
||||||
BlockEntity entity = chestBlock.newBlockEntity(chestPos, blockState);
|
BlockEntity entity = chestBlock.newBlockEntity(chestPos, blockState);
|
||||||
levelReader.getChunk(chestPos).setBlockEntity(entity);
|
levelReader.getChunk(chestPos).setBlockEntity(entity);
|
||||||
RandomizableContainerBlockEntity chestEntity = RandomizableContainerBlockEntity.class.cast(entity);
|
RandomizableContainerBlockEntity chestEntity = RandomizableContainerBlockEntity.class.cast(entity);
|
||||||
Biome biome = levelReader.getNoiseBiome(
|
Holder<Biome> biome = levelReader.getNoiseBiome(
|
||||||
chestPos.getX() >> 2,
|
chestPos.getX() >> 2,
|
||||||
chestPos.getY() >> 2,
|
chestPos.getY() >> 2,
|
||||||
chestPos.getZ() >> 2
|
chestPos.getZ() >> 2
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.google.common.collect.Sets;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.Vec3i;
|
import net.minecraft.core.Vec3i;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
|
@ -227,7 +228,7 @@ public abstract class EndCaveFeature extends DefaultFeature {
|
||||||
protected boolean biomeMissingCaves(WorldGenLevel world, BlockPos pos) {
|
protected boolean biomeMissingCaves(WorldGenLevel world, BlockPos pos) {
|
||||||
for (int x = -2; x < 3; x++) {
|
for (int x = -2; x < 3; x++) {
|
||||||
for (int z = -2; z < 3; z++) {
|
for (int z = -2; z < 3; z++) {
|
||||||
Biome biome = world.getBiome(pos.offset(x << 4, 0, z << 4));
|
Holder<Biome> biome = world.getBiome(pos.offset(x << 4, 0, z << 4));
|
||||||
BCLBiome endBiome = BiomeAPI.getFromBiome(biome);
|
BCLBiome endBiome = BiomeAPI.getFromBiome(biome);
|
||||||
boolean hasCaves = endBiome.getCustomData("has_caves", true);
|
boolean hasCaves = endBiome.getCustomData("has_caves", true);
|
||||||
if (!hasCaves && BiomeAPI.END_LAND_BIOME_PICKER.containsImmutable(endBiome.getID())) {
|
if (!hasCaves && BiomeAPI.END_LAND_BIOME_PICKER.containsImmutable(endBiome.getID())) {
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.google.common.collect.Sets;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.world.level.WorldGenLevel;
|
import net.minecraft.world.level.WorldGenLevel;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
|
@ -227,7 +228,7 @@ public class TunelCaveFeature extends EndCaveFeature {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean hasCavesInBiome(WorldGenLevel world, BlockPos pos) {
|
protected boolean hasCavesInBiome(WorldGenLevel world, BlockPos pos) {
|
||||||
Biome biome = world.getBiome(pos);
|
Holder<Biome> biome = world.getBiome(pos);
|
||||||
BCLBiome endBiome = BiomeAPI.getFromBiome(biome);
|
BCLBiome endBiome = BiomeAPI.getFromBiome(biome);
|
||||||
return endBiome.getCustomData("has_caves", true);
|
return endBiome.getCustomData("has_caves", true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package ru.betterend.world.structures.features;
|
package ru.betterend.world.structures.features;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.world.level.ChunkPos;
|
import net.minecraft.world.level.ChunkPos;
|
||||||
import net.minecraft.world.level.LevelHeightAccessor;
|
import net.minecraft.world.level.LevelHeightAccessor;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
|
@ -34,7 +35,7 @@ public class MegaLakeSmallStructure extends FeatureBaseStructure {
|
||||||
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
||||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||||
|
|
||||||
Biome biome = chunkGenerator.getNoiseBiome(x >> 2, y >> 2, z >> 2);
|
Holder<Biome> biome = chunkGenerator.getNoiseBiome(x >> 2, y >> 2, z >> 2);
|
||||||
if (y > 5) {
|
if (y > 5) {
|
||||||
float radius = MHelper.randRange(20, 40, random);
|
float radius = MHelper.randRange(20, 40, random);
|
||||||
float depth = MHelper.randRange(5, 10, random);
|
float depth = MHelper.randRange(5, 10, random);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package ru.betterend.world.structures.features;
|
package ru.betterend.world.structures.features;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.world.level.ChunkPos;
|
import net.minecraft.world.level.ChunkPos;
|
||||||
import net.minecraft.world.level.LevelHeightAccessor;
|
import net.minecraft.world.level.LevelHeightAccessor;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
|
@ -36,7 +37,7 @@ public class MegaLakeStructure extends FeatureBaseStructure {
|
||||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||||
|
|
||||||
if (y > 5) {
|
if (y > 5) {
|
||||||
Biome biome = chunkGenerator.getNoiseBiome(x >> 2, y >> 2, z >> 2);
|
Holder<Biome> biome = chunkGenerator.getNoiseBiome(x >> 2, y >> 2, z >> 2);
|
||||||
|
|
||||||
float radius = MHelper.randRange(32, 64, random);
|
float radius = MHelper.randRange(32, 64, random);
|
||||||
float depth = MHelper.randRange(7, 15, random);
|
float depth = MHelper.randRange(7, 15, random);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package ru.betterend.world.structures.features;
|
package ru.betterend.world.structures.features;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.world.level.ChunkPos;
|
import net.minecraft.world.level.ChunkPos;
|
||||||
import net.minecraft.world.level.LevelHeightAccessor;
|
import net.minecraft.world.level.LevelHeightAccessor;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
|
@ -34,7 +35,7 @@ public class MountainStructure extends FeatureBaseStructure {
|
||||||
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
||||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||||
if (y > 5) {
|
if (y > 5) {
|
||||||
Biome biome = chunkGenerator.getNoiseBiome(x >> 2, y >> 2, z >> 2);
|
Holder<Biome> biome = chunkGenerator.getNoiseBiome(x >> 2, y >> 2, z >> 2);
|
||||||
float radius = MHelper.randRange(50, 100, random);
|
float radius = MHelper.randRange(50, 100, random);
|
||||||
float height = radius * MHelper.randRange(0.8F, 1.2F, random);
|
float height = radius * MHelper.randRange(0.8F, 1.2F, random);
|
||||||
CrystalMountainPiece piece = new CrystalMountainPiece(
|
CrystalMountainPiece piece = new CrystalMountainPiece(
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package ru.betterend.world.structures.features;
|
package ru.betterend.world.structures.features;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.world.level.ChunkPos;
|
import net.minecraft.world.level.ChunkPos;
|
||||||
import net.minecraft.world.level.LevelHeightAccessor;
|
import net.minecraft.world.level.LevelHeightAccessor;
|
||||||
import net.minecraft.world.level.biome.Biome;
|
import net.minecraft.world.level.biome.Biome;
|
||||||
|
@ -38,7 +39,7 @@ public class PaintedMountainStructure extends FeatureBaseStructure {
|
||||||
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
int z = chunkPos.getBlockZ(MHelper.randRange(4, 12, random));
|
||||||
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
int y = chunkGenerator.getBaseHeight(x, z, Types.WORLD_SURFACE_WG, levelHeightAccessor);
|
||||||
if (y > 50) {
|
if (y > 50) {
|
||||||
Biome biome = chunkGenerator.getNoiseBiome(x >> 2, y >> 2, z >> 2);
|
Holder<Biome> biome = chunkGenerator.getNoiseBiome(x >> 2, y >> 2, z >> 2);
|
||||||
float radius = MHelper.randRange(50, 100, random);
|
float radius = MHelper.randRange(50, 100, random);
|
||||||
float height = radius * MHelper.randRange(0.4F, 0.6F, random);
|
float height = radius * MHelper.randRange(0.4F, 0.6F, random);
|
||||||
int count = MHelper.floor(height * MHelper.randRange(0.1F, 0.35F, random) + 1);
|
int count = MHelper.floor(height * MHelper.randRange(0.1F, 0.35F, random) + 1);
|
||||||
|
|
|
@ -2,6 +2,7 @@ package ru.betterend.world.structures.piece;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
import net.minecraft.world.level.ChunkPos;
|
import net.minecraft.world.level.ChunkPos;
|
||||||
|
@ -29,9 +30,9 @@ import java.util.Random;
|
||||||
public class CrystalMountainPiece extends MountainPiece {
|
public class CrystalMountainPiece extends MountainPiece {
|
||||||
private BlockState top;
|
private BlockState top;
|
||||||
|
|
||||||
public CrystalMountainPiece(BlockPos center, float radius, float height, Random random, Biome biome) {
|
public CrystalMountainPiece(BlockPos center, float radius, float height, Random random, Holder<Biome> biome) {
|
||||||
super(EndStructures.MOUNTAIN_PIECE, center, radius, height, random, biome);
|
super(EndStructures.MOUNTAIN_PIECE, center, radius, height, random, biome);
|
||||||
top = EndBiome.findTopMaterial(biome); //biome.getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial();
|
top = EndBiome.findTopMaterial(biome.value()); //biome.getGenerationSettings().getSurfaceBuilderConfig().getTopMaterial();
|
||||||
}
|
}
|
||||||
|
|
||||||
public CrystalMountainPiece(StructurePieceSerializationContext type, CompoundTag tag) {
|
public CrystalMountainPiece(StructurePieceSerializationContext type, CompoundTag tag) {
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.google.common.collect.Maps;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.core.SectionPos;
|
import net.minecraft.core.SectionPos;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.nbt.NbtUtils;
|
import net.minecraft.nbt.NbtUtils;
|
||||||
|
@ -46,7 +47,7 @@ public class LakePiece extends BasePiece {
|
||||||
|
|
||||||
private ResourceLocation biomeID;
|
private ResourceLocation biomeID;
|
||||||
|
|
||||||
public LakePiece(BlockPos center, float radius, float depth, Random random, Biome biome) {
|
public LakePiece(BlockPos center, float radius, float depth, Random random, Holder<Biome> biome) {
|
||||||
super(EndStructures.LAKE_PIECE, random.nextInt(), null);
|
super(EndStructures.LAKE_PIECE, random.nextInt(), null);
|
||||||
this.center = center;
|
this.center = center;
|
||||||
this.radius = radius;
|
this.radius = radius;
|
||||||
|
@ -54,7 +55,7 @@ public class LakePiece extends BasePiece {
|
||||||
this.seed = random.nextInt();
|
this.seed = random.nextInt();
|
||||||
this.noise = new OpenSimplexNoise(this.seed);
|
this.noise = new OpenSimplexNoise(this.seed);
|
||||||
this.aspect = radius / depth;
|
this.aspect = radius / depth;
|
||||||
this.biomeID = BiomeAPI.getBiomeID(biome);
|
this.biomeID = BiomeAPI.getBiomeID(biome.value());
|
||||||
makeBoundingBox();
|
makeBoundingBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package ru.betterend.world.structures.piece;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.nbt.NbtUtils;
|
import net.minecraft.nbt.NbtUtils;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
@ -31,7 +32,7 @@ public abstract class MountainPiece extends BasePiece {
|
||||||
protected int seed1;
|
protected int seed1;
|
||||||
protected int seed2;
|
protected int seed2;
|
||||||
|
|
||||||
public MountainPiece(StructurePieceType type, BlockPos center, float radius, float height, Random random, Biome biome) {
|
public MountainPiece(StructurePieceType type, BlockPos center, float radius, float height, Random random, Holder<Biome> biome) {
|
||||||
super(type, random.nextInt(), null);
|
super(type, random.nextInt(), null);
|
||||||
this.center = center;
|
this.center = center;
|
||||||
this.radius = radius;
|
this.radius = radius;
|
||||||
|
|
|
@ -2,6 +2,7 @@ package ru.betterend.world.structures.piece;
|
||||||
|
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.nbt.ListTag;
|
import net.minecraft.nbt.ListTag;
|
||||||
import net.minecraft.nbt.NbtUtils;
|
import net.minecraft.nbt.NbtUtils;
|
||||||
|
@ -25,7 +26,7 @@ import java.util.Random;
|
||||||
public class PaintedMountainPiece extends MountainPiece {
|
public class PaintedMountainPiece extends MountainPiece {
|
||||||
private BlockState[] slises;
|
private BlockState[] slises;
|
||||||
|
|
||||||
public PaintedMountainPiece(BlockPos center, float radius, float height, Random random, Biome biome, BlockState[] slises) {
|
public PaintedMountainPiece(BlockPos center, float radius, float height, Random random, Holder<Biome> biome, BlockState[] slises) {
|
||||||
super(EndStructures.PAINTED_MOUNTAIN_PIECE, center, radius, height, random, biome);
|
super(EndStructures.PAINTED_MOUNTAIN_PIECE, center, radius, height, random, biome);
|
||||||
this.slises = slises;
|
this.slises = slises;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
"ChorusPlantFeatureMixin",
|
"ChorusPlantFeatureMixin",
|
||||||
"PlayerAdvancementsMixin",
|
"PlayerAdvancementsMixin",
|
||||||
"ChorusFlowerBlockMixin",
|
"ChorusFlowerBlockMixin",
|
||||||
"StructureFeaturesMixin",
|
|
||||||
"NoiseInterpolatorMixin",
|
"NoiseInterpolatorMixin",
|
||||||
"ChorusPlantBlockMixin",
|
"ChorusPlantBlockMixin",
|
||||||
"EndPodiumFeatureMixin",
|
"EndPodiumFeatureMixin",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue