diff --git a/.github/versions.json b/.github/versions.json index f76854e76..ac2bc8f90 100644 --- a/.github/versions.json +++ b/.github/versions.json @@ -1,7 +1,7 @@ { - "1.19.2": "1.5.8", - "1.19.1": "1.5.8", - "1.19": "1.5.8", + "1.19.2": "1.5.9", + "1.19.1": "1.5.9", + "1.19": "1.5.9", "1.18.2": "1.4.5", "1.18.1": "1.2.5", "1.18": "1.2.5" diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dcf7897d..af0c7e327 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## mc1.19.2-1.5.9, August 30, 2022 + +- Fixed all spawning related issues (mob not spawning at all) + ## mc1.19.2-1.5.8, August 28, 2022 - Fixed the critical crash related to the bees and mooblooms from the previous release diff --git a/common/src/main/java/com/faboslav/friendsandfoes/config/FriendsAndFoesConfig.java b/common/src/main/java/com/faboslav/friendsandfoes/config/FriendsAndFoesConfig.java index 3c81bceaa..fb1b4af21 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/config/FriendsAndFoesConfig.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/config/FriendsAndFoesConfig.java @@ -45,7 +45,7 @@ public final class FriendsAndFoesConfig implements Config public boolean enableMaulerSpawn = true; @Description("Spawn weight in desert biome") - public int maulerDesertSpawnWeight = 32; + public int maulerDesertSpawnWeight = 8; @Description("Minimal spawn group size in desert biome") public int maulerDesertSpawnMinGroupSize = 1; @@ -54,7 +54,7 @@ public final class FriendsAndFoesConfig implements Config public int maulerDesertSpawnMaxGroupSize = 1; @Description("Spawn weight in badlands biome") - public int maulerBadlandsSpawnWeight = 32; + public int maulerBadlandsSpawnWeight = 16; @Description("Minimal spawn group size in badlands biome") public int maulerBadlandsSpawnMinGroupSize = 1; diff --git a/common/src/main/java/com/faboslav/friendsandfoes/entity/GlareEntity.java b/common/src/main/java/com/faboslav/friendsandfoes/entity/GlareEntity.java index f731fba9a..0c584bded 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/entity/GlareEntity.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/entity/GlareEntity.java @@ -147,14 +147,14 @@ public static boolean canSpawn( BlockState blockState = serverWorldAccess.getBlockState(blockPos.down()); boolean isBelowSurfaceLevel = blockPos.getY() < 63; - boolean isSkyVisible = serverWorldAccess.isSkyVisible(blockPos); - boolean isBlockPosDarkSpot = serverWorldAccess.getBaseLightLevel(blockPos, 0) <= 3; + boolean isSkyHidden = serverWorldAccess.isSkyVisible(blockPos) == false; + boolean isBlockPosLightEnough = serverWorldAccess.getBaseLightLevel(blockPos, 0) > 3; boolean isRelatedBlock = blockState.isIn(FriendsAndFoesTags.GLARES_SPAWNABLE_ON); return isBelowSurfaceLevel && isRelatedBlock - && isSkyVisible == false - && isBlockPosDarkSpot == false; + && isSkyHidden + && isBlockPosLightEnough; } protected void initGoals() { diff --git a/common/src/main/java/com/faboslav/friendsandfoes/platform/CustomSpawnGroup.java b/common/src/main/java/com/faboslav/friendsandfoes/platform/CustomSpawnGroup.java index e97034ed2..e98d89c04 100644 --- a/common/src/main/java/com/faboslav/friendsandfoes/platform/CustomSpawnGroup.java +++ b/common/src/main/java/com/faboslav/friendsandfoes/platform/CustomSpawnGroup.java @@ -7,7 +7,7 @@ public final class CustomSpawnGroup { public static final String GLARES_INTERNAL_NAME = "GLARES"; public static final String NAME = "glares"; - public static final int SPAWN_CAP = 10; + public static final int SPAWN_CAP = 15; public static final boolean PEACEFUL = true; public static final boolean RARE = false; public static final int IMMEDIATE_DESPAWN_RANGE = 128; diff --git a/common/src/main/resources/data/friendsandfoes/tags/blocks/glares_spawnable_on.json b/common/src/main/resources/data/friendsandfoes/tags/blocks/glares_spawnable_on.json index 4b3b05362..0b49a650c 100644 --- a/common/src/main/resources/data/friendsandfoes/tags/blocks/glares_spawnable_on.json +++ b/common/src/main/resources/data/friendsandfoes/tags/blocks/glares_spawnable_on.json @@ -7,6 +7,7 @@ "minecraft:grass", "minecraft:small_dripleaf", "minecraft:big_dripleaf", - "minecraft:clay" + "minecraft:clay", + "minecraft:stone" ] } \ No newline at end of file diff --git a/common/src/main/resources/data/friendsandfoes/tags/worldgen/biome/has_more_moobloom.json b/common/src/main/resources/data/friendsandfoes/tags/worldgen/biome/has_more_mooblooms.json similarity index 100% rename from common/src/main/resources/data/friendsandfoes/tags/worldgen/biome/has_more_moobloom.json rename to common/src/main/resources/data/friendsandfoes/tags/worldgen/biome/has_more_mooblooms.json diff --git a/common/src/main/resources/data/friendsandfoes/tags/worldgen/biome/has_savanna_mauler.json b/common/src/main/resources/data/friendsandfoes/tags/worldgen/biome/has_savanna_mauler.json index dfffb6e5a..8971a0849 100644 --- a/common/src/main/resources/data/friendsandfoes/tags/worldgen/biome/has_savanna_mauler.json +++ b/common/src/main/resources/data/friendsandfoes/tags/worldgen/biome/has_savanna_mauler.json @@ -1,5 +1,13 @@ { "values": [ - "#minecraft:is_savanna" + "#minecraft:is_savanna", + { + "id": "#forge:is_savanna", + "required": false + }, + { + "id": "#c:savanna", + "required": false + } ] } \ No newline at end of file diff --git a/fabric/src/main/java/com/faboslav/friendsandfoes/mixin/fabric/AddCustomSpawnGroupMixin.java b/fabric/src/main/java/com/faboslav/friendsandfoes/mixin/fabric/AddCustomSpawnGroupMixin.java index dcc4960cd..fcccc81dd 100644 --- a/fabric/src/main/java/com/faboslav/friendsandfoes/mixin/fabric/AddCustomSpawnGroupMixin.java +++ b/fabric/src/main/java/com/faboslav/friendsandfoes/mixin/fabric/AddCustomSpawnGroupMixin.java @@ -55,7 +55,7 @@ private static void friendsandfoes_addCustomSpawnGroup(CallbackInfo ci) { var glaresSpawnGroup = newSpawnGroup( CustomSpawnGroup.GLARES_INTERNAL_NAME, lastSpawnGroup.ordinal() + 1, - FriendsAndFoes.makeStringID(CustomSpawnGroup.NAME), + CustomSpawnGroup.NAME, CustomSpawnGroup.SPAWN_CAP, CustomSpawnGroup.PEACEFUL, CustomSpawnGroup.RARE, diff --git a/forge/src/main/java/com/faboslav/friendsandfoes/platform/forge/CustomSpawnGroupImpl.java b/forge/src/main/java/com/faboslav/friendsandfoes/platform/forge/CustomSpawnGroupImpl.java index c38c3a8e1..637dd83fa 100644 --- a/forge/src/main/java/com/faboslav/friendsandfoes/platform/forge/CustomSpawnGroupImpl.java +++ b/forge/src/main/java/com/faboslav/friendsandfoes/platform/forge/CustomSpawnGroupImpl.java @@ -1,21 +1,22 @@ package com.faboslav.friendsandfoes.platform.forge; -import com.faboslav.friendsandfoes.FriendsAndFoes; import com.faboslav.friendsandfoes.platform.CustomSpawnGroup; import net.minecraft.entity.SpawnGroup; public final class CustomSpawnGroupImpl { + public static SpawnGroup GLARES; + /** * @see CustomSpawnGroup#getGlaresCategory() */ public static SpawnGroup getGlaresCategory() { - var spawnGroup = SpawnGroup.byName(CustomSpawnGroup.GLARES_INTERNAL_NAME); + var spawnGroup = SpawnGroup.byName(CustomSpawnGroup.NAME); if (spawnGroup == null) { spawnGroup = SpawnGroup.create( - CustomSpawnGroup.GLARES_INTERNAL_NAME, - FriendsAndFoes.makeStringID(CustomSpawnGroup.NAME), + CustomSpawnGroup.NAME, + CustomSpawnGroup.NAME, CustomSpawnGroup.SPAWN_CAP, CustomSpawnGroup.PEACEFUL, CustomSpawnGroup.RARE, diff --git a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/badlands_mauler.json b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/badlands_mauler.json similarity index 85% rename from forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/badlands_mauler.json rename to forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/badlands_mauler.json index 0972e4c04..92ef5ed3b 100644 --- a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/badlands_mauler.json +++ b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/badlands_mauler.json @@ -1,11 +1,11 @@ { "type": "forge:add_spawns", "biomes": "#friendsandfoes:has_badlands_mauler", - "spawn": { + "spawners": { "type": "friendsandfoes:mauler", "minCount": 1, "maxCount": 1, - "weight": 32 + "weight": 16 }, "category": "creature" } \ No newline at end of file diff --git a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/desert_mauler.json b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/desert_mauler.json similarity index 85% rename from forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/desert_mauler.json rename to forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/desert_mauler.json index bdc4c9b6e..5076476d6 100644 --- a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/desert_mauler.json +++ b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/desert_mauler.json @@ -1,11 +1,11 @@ { "type": "forge:add_spawns", "biomes": "#friendsandfoes:has_desert_mauler", - "spawn": { + "spawners": { "type": "friendsandfoes:mauler", "minCount": 1, "maxCount": 1, - "weight": 32 + "weight": 8 }, "category": "creature" } \ No newline at end of file diff --git a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/glare.json b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/glare.json similarity index 75% rename from forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/glare.json rename to forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/glare.json index 67b9316f8..7739740ec 100644 --- a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/glare.json +++ b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/glare.json @@ -1,7 +1,7 @@ { - "type": "friendsandfoes:mob_spawns", + "type": "forge:add_spawns", "biomes": "#friendsandfoes:has_glare", - "spawn": { + "spawners": { "type": "friendsandfoes:glare", "minCount": 1, "maxCount": 1, diff --git a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/less_mooblooms.json b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/less_mooblooms.json similarity index 69% rename from forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/less_mooblooms.json rename to forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/less_mooblooms.json index 1fd13d45d..7cb9998fe 100644 --- a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/less_mooblooms.json +++ b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/less_mooblooms.json @@ -1,7 +1,7 @@ { "type": "forge:add_spawns", - "biomes": "#friendsandfoes:less_moobloom", - "spawn": { + "biomes": "#friendsandfoes:has_less_mooblooms", + "spawners": { "type": "friendsandfoes:moobloom", "minCount": 2, "maxCount": 4, diff --git a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/more_mooblooms.json b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/more_mooblooms.json similarity index 69% rename from forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/more_mooblooms.json rename to forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/more_mooblooms.json index 4c20c8901..b1baff533 100644 --- a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/more_mooblooms.json +++ b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/more_mooblooms.json @@ -1,7 +1,7 @@ { "type": "forge:add_spawns", - "biomes": "#friendsandfoes:more_moobloom", - "spawn": { + "biomes": "#friendsandfoes:has_more_mooblooms", + "spawners": { "type": "friendsandfoes:moobloom", "minCount": 2, "maxCount": 4, diff --git a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/savanna_mauler.json b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/savanna_mauler.json similarity index 92% rename from forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/savanna_mauler.json rename to forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/savanna_mauler.json index 14ff9dcf8..f13e9e59d 100644 --- a/forge/src/main/resources/data/friendsandfoes/forge/biome_modifiers/savanna_mauler.json +++ b/forge/src/main/resources/data/friendsandfoes/forge/biome_modifier/savanna_mauler.json @@ -1,7 +1,7 @@ { "type": "forge:add_spawns", "biomes": "#friendsandfoes:has_savanna_mauler", - "spawn": { + "spawners": { "type": "friendsandfoes:mauler", "minCount": 1, "maxCount": 1, diff --git a/gradle.properties b/gradle.properties index eb69afff2..7ec90be6e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ org.gradle.configureondemand=false # Mod mod_name=Friends&Foes mod_id=friendsandfoes -mod_version=1.5.8 +mod_version=1.5.9 mod_author=Faboslav mod_description=Adds all eliminated mobs from the minecraft mob votes along with the forgotten mobs like the Illusioner. maven_group=com.faboslav.friendsandfoes diff --git a/quilt/src/main/java/com/faboslav/friendsandfoes/mixin/quilt/AddCustomSpawnGroupMixin.java b/quilt/src/main/java/com/faboslav/friendsandfoes/mixin/quilt/AddCustomSpawnGroupMixin.java index d167e913f..b2bf5774a 100644 --- a/quilt/src/main/java/com/faboslav/friendsandfoes/mixin/quilt/AddCustomSpawnGroupMixin.java +++ b/quilt/src/main/java/com/faboslav/friendsandfoes/mixin/quilt/AddCustomSpawnGroupMixin.java @@ -55,7 +55,7 @@ private static void friendsandfoes_addCustomSpawnGroup(CallbackInfo ci) { var glaresSpawnGroup = newSpawnGroup( CustomSpawnGroup.GLARES_INTERNAL_NAME, lastSpawnGroup.ordinal() + 1, - FriendsAndFoes.makeStringID(CustomSpawnGroup.NAME), + CustomSpawnGroup.NAME, CustomSpawnGroup.SPAWN_CAP, CustomSpawnGroup.PEACEFUL, CustomSpawnGroup.RARE,