Added first test code for new StructreFeature building
This commit is contained in:
parent
3c746a8dc4
commit
86a3480ce0
7 changed files with 74 additions and 15 deletions
|
@ -1,6 +1,7 @@
|
|||
package ru.bclib.api.biomes;
|
||||
|
||||
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.particles.ParticleOptions;
|
||||
import net.minecraft.data.BuiltinRegistries;
|
||||
import net.minecraft.data.worldgen.BiomeDefaultFeatures;
|
||||
|
@ -500,7 +501,7 @@ public class BCLBiomeBuilder {
|
|||
* @param feature {@link PlacedFeature}.
|
||||
* @return same {@link BCLBiomeBuilder} instance.
|
||||
*/
|
||||
public BCLBiomeBuilder feature(Decoration decoration, PlacedFeature feature) {
|
||||
public BCLBiomeBuilder feature(Decoration decoration, Holder<PlacedFeature> feature) {
|
||||
getGeneration().addFeature(decoration, feature);
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.world.item.Item;
|
|||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import ru.bclib.mixin.common.DiggerItemAccessor;
|
||||
|
@ -38,6 +39,18 @@ public class TagAPI {
|
|||
.findAny()
|
||||
.orElse(TagKey.create(registry.key(), id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or create {@link Block} {@link TagKey} with mod namespace.
|
||||
*
|
||||
* @param modID - {@link String} mod namespace (mod id);
|
||||
* @param name - {@link String} tag name.
|
||||
* @return {@link Block} {@link TagKey}.
|
||||
*/
|
||||
public static TagKey<Biome> makeBiomeTag(String modID, String name) {
|
||||
return TagKey.create(Registry.BIOME_REGISTRY, new ResourceLocation(modID, name));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get or create {@link Block} {@link TagKey} with mod namespace.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue