diff --git a/gradle.properties b/gradle.properties index 34d581ae5..b30b0d818 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx3G # Mod Information mod_id=mocreatures -mod_version=12.4.1 +mod_version=12.4.2 maven_group=drzhark.mocreatures archives_base_name=DrZharks-MoCreatures-Extended # License Plugin diff --git a/src/main/java/drzhark/mocreatures/MoCConstants.java b/src/main/java/drzhark/mocreatures/MoCConstants.java index 1f4ce7ed1..a33f88647 100644 --- a/src/main/java/drzhark/mocreatures/MoCConstants.java +++ b/src/main/java/drzhark/mocreatures/MoCConstants.java @@ -8,7 +8,7 @@ public class MoCConstants { public static final String MOD_ID = "mocreatures"; public static final String MOD_PREFIX = MOD_ID + ":"; public static final String MOD_NAME = "DrZhark's Mo'Creatures Extended"; - public static final String MOD_VERSION = "12.4.1"; + public static final String MOD_VERSION = "12.4.2"; public static final String MOD_ACCEPTED_VERSIONS = "[" + MOD_VERSION + "]"; public static final String MOD_DEPENDENCIES = "after:futuremc;after:thaumcraft;after:thermalexpansion;after:traverse"; public static final Integer DATAFIXER_VERSION = 1; diff --git a/src/main/java/drzhark/mocreatures/event/MoCEventHooksTerrain.java b/src/main/java/drzhark/mocreatures/event/MoCEventHooksTerrain.java index 30463af11..30bb1d705 100644 --- a/src/main/java/drzhark/mocreatures/event/MoCEventHooksTerrain.java +++ b/src/main/java/drzhark/mocreatures/event/MoCEventHooksTerrain.java @@ -4,6 +4,7 @@ package drzhark.mocreatures.event; import drzhark.mocreatures.MoCTools; +import drzhark.mocreatures.MoCreatures; import drzhark.mocreatures.entity.IMoCEntity; import drzhark.mocreatures.init.MoCEntities; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; @@ -16,7 +17,6 @@ import net.minecraft.world.biome.Biome; import net.minecraftforge.common.BiomeDictionary; import net.minecraftforge.event.terraingen.PopulateChunkEvent; -import net.minecraftforge.fml.common.eventhandler.Event; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.registry.ForgeRegistries; @@ -69,7 +69,7 @@ public static void addBiomeTypes() { @SubscribeEvent public void onPopulateChunk(PopulateChunkEvent.Populate event) { - // Regular spawning + if (!MoCreatures.proxy.worldGenSpawningCreatures && !MoCreatures.proxy.worldGenSpawningWaterCreatures) return; if (event.getType() == PopulateChunkEvent.Populate.EventType.ANIMALS) { int chunkX = event.getChunkX() * 16; int chunkZ = event.getChunkZ() * 16; @@ -80,8 +80,10 @@ public void onPopulateChunk(PopulateChunkEvent.Populate event) { BlockPos blockPos = new BlockPos(chunkX, 0, chunkZ); Biome biome = world.getBiome(blockPos.add(16, 0, 16)); - MoCTools.performCustomWorldGenSpawning(world, biome, centerX, centerZ, 16, 16, rand, creatureSpawnMap.get(biome), EntityLiving.SpawnPlacementType.ON_GROUND); - MoCTools.performCustomWorldGenSpawning(world, biome, centerX, centerZ, 16, 16, rand, waterCreatureSpawnMap.get(biome), EntityLiving.SpawnPlacementType.IN_WATER); + if (MoCreatures.proxy.worldGenSpawningCreatures) + MoCTools.performCustomWorldGenSpawning(world, biome, centerX, centerZ, 16, 16, rand, creatureSpawnMap.get(biome), EntityLiving.SpawnPlacementType.ON_GROUND); + if (MoCreatures.proxy.worldGenSpawningWaterCreatures) + MoCTools.performCustomWorldGenSpawning(world, biome, centerX, centerZ, 16, 16, rand, waterCreatureSpawnMap.get(biome), EntityLiving.SpawnPlacementType.IN_WATER); } } } diff --git a/src/main/java/drzhark/mocreatures/proxy/MoCProxy.java b/src/main/java/drzhark/mocreatures/proxy/MoCProxy.java index ded95b4bb..1e1f95b40 100644 --- a/src/main/java/drzhark/mocreatures/proxy/MoCProxy.java +++ b/src/main/java/drzhark/mocreatures/proxy/MoCProxy.java @@ -63,9 +63,9 @@ public class MoCProxy implements IGuiHandler { public boolean foggyWyvernLair; public boolean golemDestroyBlocks; public boolean legacyBigCatModels; - public boolean legacySharkModel; public boolean legacyBunnyTextures; public boolean legacyRatDeathSound; + public boolean legacySharkModel; public boolean legacyWerehumanSounds; public boolean legacyWraithSounds; public boolean legacyWyvernLairSky; @@ -73,6 +73,8 @@ public class MoCProxy implements IGuiHandler { public boolean staticLitter; public boolean verboseEntityNames; public boolean weaponEffects; + public boolean worldGenSpawningCreatures; + public boolean worldGenSpawningWaterCreatures; public boolean worldInitDone = false; public double spawnMultiplier; public float ogreCaveStrength; @@ -278,9 +280,9 @@ public void readGlobalConfigValues() { this.golemDestroyBlocks = this.mocSettingsConfig.get(CATEGORY_MOC_MONSTER_GENERAL_SETTINGS, "GolemDestroyBlocks", true, "Allows big golems to break blocks.").getBoolean(true); this.kittyVillageChance = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "KittyVillageChance", 15, "The percentage for kitties spawning in village chunks.").getInt(); this.legacyBigCatModels = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "LegacyBigCatModels", false, "Enables simple big cat models and textures like in legacy versions.").getBoolean(false); - this.legacySharkModel = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "LegacySharkModel", false, "Enables the simple shark model and texture like in legacy versions.").getBoolean(false); this.legacyBunnyTextures = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "LegacyBunnyTextures", false, "Enables simple bunny textures like in legacy versions.").getBoolean(false); this.legacyRatDeathSound = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "LegacyRatDeathSound", false, "Enables legacy rat death sound.").getBoolean(false); + this.legacySharkModel = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "LegacySharkModel", false, "Enables the simple shark model and texture like in legacy versions.").getBoolean(false); this.legacyWerehumanSounds = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "LegacyWerehumanSounds", false, "Enables legacy human werewolf sounds.").getBoolean(false); this.legacyWraithSounds = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "LegacyWraithSounds", false, "Enables legacy wraith sounds.").getBoolean(false); this.legacyWyvernLairSky = this.mocSettingsConfig.get(CATEGORY_MOC_GENERAL_SETTINGS, "LegacyWyvernLairSky", false, "Enables legacy wyvern lair sky.").getBoolean(false); @@ -299,6 +301,8 @@ public void readGlobalConfigValues() { this.staticLitter = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "StaticLitter", true, "Makes the kitty litter box not pushable.").getBoolean(true); this.verboseEntityNames = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "VerboseEntityNames", false, "Enables detailed names for creatures, describing their species.").getBoolean(false); this.weaponEffects = this.mocSettingsConfig.get(CATEGORY_MOC_GENERAL_SETTINGS, "WeaponEffects", true, "Applies potion effects when dealing damage with scorpion weapons.").getBoolean(true); + this.worldGenSpawningCreatures = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "WorldGenSpawningCreatures", true, "Enables custom creature spawning during world generation. Disable this when facing spawning issues with entities from other mods.").getBoolean(true); + this.worldGenSpawningWaterCreatures = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "WorldGenSpawningWaterCreatures", true, "Enables custom water creature spawning during world generation. Disable this when facing spawning issues with entities from other mods.").getBoolean(true); this.wyvernDimension = this.mocSettingsConfig.get(CATEGORY_MOC_ID_SETTINGS, "WyvernLairDimensionID", -17, "The dimension ID of the wyvern lair.").getInt(); this.wyvernEggDropChance = this.mocSettingsConfig.get(CATEGORY_MOC_CREATURE_GENERAL_SETTINGS, "WyvernEggDropChance", 33, "The percentage for wyverns to drop an egg.").getInt();