Small fix, cleanup

This commit is contained in:
paulevsGitch 2021-12-01 14:52:21 +03:00
parent 211d0fc751
commit 72e29223a1
4 changed files with 47 additions and 38 deletions

View file

@ -3,6 +3,7 @@ package ru.bclib.world.biomes;
import com.google.common.collect.Maps;
import net.minecraft.core.Registry;
import net.minecraft.data.BuiltinRegistries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.biome.Biome;
import org.jetbrains.annotations.Nullable;
@ -26,6 +27,14 @@ public class BCLBiome {
private float genChance = 1.0F;
private float edgeSize = 0.0F;
/**
* Create wrapper for existing biome using its {@link ResourceLocation} identifier.
* @param biomeKey {@link ResourceKey} for the {@link Biome}.
*/
public BCLBiome(ResourceKey<Biome> biomeKey) {
this(biomeKey.location());
}
/**
* Create wrapper for existing biome using its {@link ResourceLocation} identifier.
* @param biomeID {@link ResourceLocation} biome ID.
@ -43,6 +52,7 @@ public class BCLBiome {
}
public BCLBiome(ResourceLocation biomeID, Biome biome) {
this.subbiomes.add(this, 1.0F);
this.biomeID = biomeID;
this.biome = biome;
}

View file

@ -65,7 +65,7 @@ public class HexBiomeChunk {
}
for (short index = 0; index < SIZE; index++) {
if (random.nextInt(4) == 0) {
if (outBuffer[index] != null && random.nextInt(4) == 0) {
circle(outBuffer, index, outBuffer[index].getSubBiome(random), outBuffer[index]);
}
}

View file

@ -4,17 +4,17 @@
"package": "ru.bclib.mixin.client",
"compatibilityLevel": "JAVA_17",
"client": [
"AnvilScreenMixin",
"SimpleReloadableResourceManagerMixin",
"EnchantingTableBlockMixin",
"BackgroundRendererMixin",
"ClientRecipeBookMixin",
"EnchantingTableBlockMixin",
"GameMixin",
"ModelManagerMixin",
"TextureAtlasMixin",
"AnvilScreenMixin",
"ModelBakeryMixin",
"MinecraftMixin",
"GameMixin",
"ModelBakeryMixin",
"ModelManagerMixin",
"SimpleReloadableResourceManagerMixin",
"TextureAtlasMixin"
"GameMixin"
],
"injectors": {
"defaultRequire": 1

View file

@ -4,41 +4,40 @@
"package": "ru.bclib.mixin.common",
"compatibilityLevel": "JAVA_17",
"mixins": [
"AnvilBlockMixin",
"AnvilMenuMixin",
"ChunkGeneratorMixin",
"BoneMealItemMixin",
"SimpleReloadableResourceManagerMixin",
"shears.DiggingEnchantmentMixin",
"LayerLightSectionStorageMixin",
"shears.TripWireBlockMixin",
"shears.BeehiveBlockMixin",
"shears.PumpkinBlockMixin",
"shears.MushroomCowMixin",
"ComposterBlockAccessor",
"PotionBrewingAccessor",
"RecipeManagerAccessor",
"CraftingMenuMixin",
"EnchantmentMenuMixin",
"LayerLightSectionStorageMixin",
"MainMixin",
"MinecraftServerMixin",
"PistonBaseBlockMixin",
"WorldGenRegionMixin",
"TheEndBiomeDataMixin",
"NetherBiomeDataMixin",
"RecipeManagerMixin",
"CraftingMenuMixin",
"BoneMealItemMixin",
"shears.SheepMixin",
"PortalShapeMixin",
"PotionBrewingAccessor",
"RecipeManagerAccessor",
"RecipeManagerMixin",
"ServerLevelMixin",
"SimpleReloadableResourceManagerMixin",
"TagLoaderMixin",
"WorldGenRegionMixin",
"shears.BeehiveBlockMixin",
"shears.DiggingEnchantmentMixin",
"shears.MushroomCowMixin",
"shears.PumpkinBlockMixin",
"shears.SheepMixin",
"RecipeManagerAccessor",
"shears.SnowGolemMixin",
"shears.TripWireBlockMixin"
"EnchantmentMenuMixin",
"MinecraftServerMixin",
"NetherBiomeDataMixin",
"PistonBaseBlockMixin",
"TheEndBiomeDataMixin",
"ChunkGeneratorMixin",
"WorldGenRegionMixin",
"WorldGenRegionMixin",
"RecipeManagerMixin",
"RecipeManagerMixin",
"BoneMealItemMixin",
"CraftingMenuMixin",
"CraftingMenuMixin",
"shears.SheepMixin",
"shears.SheepMixin",
"PortalShapeMixin",
"ServerLevelMixin",
"AnvilBlockMixin",
"AnvilMenuMixin",
"TagLoaderMixin",
"MainMixin"
],
"injectors": {
"defaultRequire": 1