Minor improvements
This commit is contained in:
parent
22bf4384c6
commit
39dda736af
4 changed files with 11 additions and 50 deletions
|
@ -419,6 +419,17 @@ public class BiomeAPI {
|
|||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds new features to existing biome.
|
||||
* @param biome {@link Biome} to add features in.
|
||||
* @param feature {@link ConfiguredFeature} to add.
|
||||
*
|
||||
*/
|
||||
public static void addBiomeFeature(Biome biome, BCLFeature feature) {
|
||||
addBiomeFeature(biome, feature.getPlacedFeature(), feature.getFeatureStep());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds new features to existing biome.
|
||||
* @param biome {@link Biome} to add features in.
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
package ru.bclib.mixin.common;
|
||||
|
||||
import net.minecraft.world.level.biome.BiomeGenerationSettings;
|
||||
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@Mixin(BiomeGenerationSettings.class)
|
||||
public interface BiomeGenerationSettingsAccessor {
|
||||
@Accessor("features")
|
||||
List<List<Supplier<PlacedFeature>>> bcl_getFeatures();
|
||||
|
||||
@Accessor("features")
|
||||
@Mutable
|
||||
void bcl_setFeatures(List<List<Supplier<PlacedFeature>>> value);
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
package ru.bclib.mixin.common;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
@Mixin(targets = "net.minecraft.data.worldgen.Features$Decorators")
|
||||
public interface FeatureDecoratorsAccessor {
|
||||
/*@Accessor("HEIGHTMAP_SQUARE")
|
||||
ConfiguredDecorator<?> bclib_getHeightmapSquare();*/
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
package ru.bclib.mixin.common;
|
||||
|
||||
import net.minecraft.util.random.WeightedRandomList;
|
||||
import net.minecraft.world.entity.MobCategory;
|
||||
import net.minecraft.world.level.biome.MobSpawnSettings;
|
||||
import net.minecraft.world.level.biome.MobSpawnSettings.SpawnerData;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Mutable;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@Mixin(MobSpawnSettings.class)
|
||||
public interface MobSpawnSettingsAccessor {
|
||||
@Accessor("spawners")
|
||||
Map<MobCategory, WeightedRandomList<SpawnerData>> bcl_getSpawners();
|
||||
|
||||
@Accessor("spawners")
|
||||
@Mutable
|
||||
void bcl_setSpawners(Map<MobCategory, WeightedRandomList<SpawnerData>> spawners);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue