Skip to content

Commit

Permalink
Fixed mob spawns
Browse files Browse the repository at this point in the history
  • Loading branch information
Faboslav committed Jun 11, 2022
1 parent 5f0e4e3 commit d4f5558
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 48 deletions.
4 changes: 2 additions & 2 deletions .github/versions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"1.19": "1.5.0",
"1.19-rc1": "1.5.0",
"1.19": "1.5.1",
"1.19-rc1": "1.5.1",
"1.18.2": "1.4.3",
"1.18.1": "1.2.5",
"1.18": "1.2.5"
Expand Down
42 changes: 21 additions & 21 deletions .github/workflows/publish-with-quilt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ jobs:
with:
name: "friends-and-foes"
path: |
fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.0.jar
forge/build/libs/friendsandfoes-forge-mc1.19-1.5.0.jar
quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.0.jar
fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.1.jar
forge/build/libs/friendsandfoes-forge-mc1.19-1.5.1.jar
quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.1.jar
LICENSE.txt
publish-license-to-release:
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
- name: "Publish Fabric to GitHub"
uses: AButler/[email protected]
with:
files: 'fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.0.jar'
files: 'fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.1.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}

publish-fabric-to-curseforge:
Expand All @@ -104,11 +104,11 @@ jobs:
curseforge-id: 551364
curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }}

files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.0.jar"
files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.1.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: fabric
game-versions: 1.19
name: "Friends&Foes mc1.19-1.5.0 (Fabric)"
name: "Friends&Foes mc1.19-1.5.1 (Fabric)"
dependencies: ${{ env.FABRIC_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}

Expand All @@ -134,12 +134,12 @@ jobs:
modrinth-id: POQ2i9zu
modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }}

files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.0.jar"
files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.1.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: fabric
game-versions: 1.19
name: "Friends&Foes mc1.19-1.5.0 (Fabric)"
version: "fabric-mc1.19-1.5.0"
name: "Friends&Foes mc1.19-1.5.1 (Fabric)"
version: "fabric-mc1.19-1.5.1"
dependencies: ${{ env.FABRIC_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}
retry-attempts: ${{ env.RETRY_ATTEMPTS }}
Expand All @@ -161,7 +161,7 @@ jobs:
- name: "Publish Forge to GitHub"
uses: AButler/[email protected]
with:
files: 'forge/build/libs/friendsandfoes-forge-mc1.19-1.5.0.jar'
files: 'forge/build/libs/friendsandfoes-forge-mc1.19-1.5.1.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}

publish-forge-to-curseforge:
Expand All @@ -182,11 +182,11 @@ jobs:
curseforge-id: 602059
curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }}

files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19-1.5.0.jar"
files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19-1.5.1.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: forge
game-versions: 1.19
name: "Friends&Foes mc1.19-1.5.0 (Forge)"
name: "Friends&Foes mc1.19-1.5.1 (Forge)"
dependencies: ${{ env.FORGE_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}

Expand All @@ -212,12 +212,12 @@ jobs:
modrinth-id: BOCJKD49
modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }}

files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19-1.5.0.jar"
files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19-1.5.1.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: forge
game-versions: 1.19
name: "Friends&Foes mc1.19-1.5.0 (Forge)"
version: "forge-mc1.19-1.5.0"
name: "Friends&Foes mc1.19-1.5.1 (Forge)"
version: "forge-mc1.19-1.5.1"
dependencies: ${{ env.FORGE_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}
retry-attempts: ${{ env.RETRY_ATTEMPTS }}
Expand All @@ -240,7 +240,7 @@ jobs:
- name: "Publish Quilt to GitHub"
uses: AButler/[email protected]
with:
files: 'quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.0.jar'
files: 'quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.1.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}

publish-quilt-to-curseforge:
Expand All @@ -261,11 +261,11 @@ jobs:
curseforge-id: 628248
curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }}

files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.0.jar"
files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.1.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: quilt
game-versions: 1.19
name: "Friends&Foes mc1.19-1.5.0 (Quilt)"
name: "Friends&Foes mc1.19-1.5.1 (Quilt)"
dependencies: ${{ env.QUILT_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}

Expand All @@ -291,12 +291,12 @@ jobs:
modrinth-id: NxP9xmhw
modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }}

files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.0.jar"
files-primary: "quilt/build/libs/friendsandfoes-quilt-mc1.19-1.5.1.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: quilt
game-versions: 1.19
name: "Friends&Foes mc1.19-1.5.0 (Quilt)"
version: "quilt-mc1.19-1.5.0"
name: "Friends&Foes mc1.19-1.5.1 (Quilt)"
version: "quilt-mc1.19-1.5.1"
dependencies: ${{ env.QUILT_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}
retry-attempts: ${{ env.RETRY_ATTEMPTS }}
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ jobs:
with:
name: "friends-and-foes"
path: |
fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.0.jar
forge/build/libs/friendsandfoes-forge-mc1.19-1.5.0.jar
fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.1.jar
forge/build/libs/friendsandfoes-forge-mc1.19-1.5.1.jar
LICENSE.txt
publish-license-to-release:
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
- name: "Publish Fabric to GitHub"
uses: AButler/[email protected]
with:
files: 'fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.0.jar'
files: 'fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.1.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}

publish-fabric-to-curseforge:
Expand All @@ -104,11 +104,11 @@ jobs:
curseforge-id: 551364
curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }}

files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.0.jar"
files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.1.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: fabric
game-versions: 1.19
name: "Friends&Foes mc1.19-1.5.0 (Fabric)"
name: "Friends&Foes mc1.19-1.5.1 (Fabric)"
dependencies: ${{ env.FABRIC_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}

Expand All @@ -134,12 +134,12 @@ jobs:
modrinth-id: POQ2i9zu
modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }}

files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.0.jar"
files-primary: "fabric/build/libs/friendsandfoes-fabric-mc1.19-1.5.1.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: fabric
game-versions: 1.19
name: "Friends&Foes mc1.19-1.5.0 (Fabric)"
version: "fabric-mc1.19-1.5.0"
name: "Friends&Foes mc1.19-1.5.1 (Fabric)"
version: "fabric-mc1.19-1.5.1"
dependencies: ${{ env.FABRIC_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}
retry-attempts: ${{ env.RETRY_ATTEMPTS }}
Expand All @@ -161,7 +161,7 @@ jobs:
- name: "Publish Forge to GitHub"
uses: AButler/[email protected]
with:
files: 'forge/build/libs/friendsandfoes-forge-mc1.19-1.5.0.jar'
files: 'forge/build/libs/friendsandfoes-forge-mc1.19-1.5.1.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}

publish-forge-to-curseforge:
Expand All @@ -182,11 +182,11 @@ jobs:
curseforge-id: 602059
curseforge-token: ${{ secrets.CURSEFORGE_RELEASE_TOKEN }}

files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19-1.5.0.jar"
files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19-1.5.1.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: forge
game-versions: 1.19
name: "Friends&Foes mc1.19-1.5.0 (Forge)"
name: "Friends&Foes mc1.19-1.5.1 (Forge)"
dependencies: ${{ env.FORGE_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}

Expand All @@ -212,12 +212,12 @@ jobs:
modrinth-id: BOCJKD49
modrinth-token: ${{ secrets.MODRINTH_RELEASE_TOKEN }}

files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19-1.5.0.jar"
files-primary: "forge/build/libs/friendsandfoes-forge-mc1.19-1.5.1.jar"
version-type: ${{ env.VERSION_TYPE }}
loaders: forge
game-versions: 1.19
name: "Friends&Foes mc1.19-1.5.0 (Forge)"
version: "forge-mc1.19-1.5.0"
name: "Friends&Foes mc1.19-1.5.1 (Forge)"
version: "forge-mc1.19-1.5.1"
dependencies: ${{ env.FORGE_DEPENDENCIES }}
java: ${{ env.JAVA_VERSIONS }}
retry-attempts: ${{ env.RETRY_ATTEMPTS }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## mc1.19-1.5.1, June 11, 2022

- Fixed natural mob spawning

## mc1.19-1.5.0, June 11, 2022

- Ported to 1.19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public final class FriendsAndFoes
private static final FriendsAndFoesConfig CONFIG = OmegaConfig.register(FriendsAndFoesConfig.class);
private static final Logger LOGGER = LoggerFactory.getLogger(FriendsAndFoes.MOD_ID);
public static final String MOD_ID = "friendsandfoes";
public static final String MOD_VERSION = "1.5.0";
public static final String MOD_VERSION = "1.5.1";
public static final ServerTickDeltaCounter serverTickDeltaCounter = new ServerTickDeltaCounter(20.0F, 0L);

public static Identifier makeID(String path) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ public static void initBiomeModifications() {
var config = FriendsAndFoes.getConfig();

if (config.enableGlare && config.enableGlareSpawn) {
Predicate<BiomeModifications.BiomeContext> LUSH_CAVES = (ctx) -> Objects.equals(ctx.getKey(), BiomeKeys.LUSH_CAVES.getValue());
Predicate<BiomeModifications.BiomeContext> LUSH_CAVES = (ctx) -> Objects.equals(ctx.getKey().get(), BiomeKeys.LUSH_CAVES.getValue());
registerBiomeModification(LUSH_CAVES, GLARE.get(), SpawnGroup.valueOf(ExpandedEnumValues.GLARES), config.glareSpawnWeight, config.glareSpawnMinGroupSize, config.glareSpawnMaxGroupSize);
}

if (config.enableMauler && config.enableMaulerSpawn) {
Predicate<BiomeModifications.BiomeContext> DESERT = (ctx) -> Objects.equals(ctx.getKey(), BiomeKeys.DESERT.getValue());
Predicate<BiomeModifications.BiomeContext> BADLANDS = (ctx) -> Objects.equals(ctx.getKey(), BiomeKeys.BADLANDS.getValue());
Predicate<BiomeModifications.BiomeContext> ERODED_BADLANDS = (ctx) -> Objects.equals(ctx.getKey(), BiomeKeys.ERODED_BADLANDS.getValue());
Predicate<BiomeModifications.BiomeContext> WOODED_BADLANDS = (ctx) -> Objects.equals(ctx.getKey(), BiomeKeys.WOODED_BADLANDS.getValue());
Predicate<BiomeModifications.BiomeContext> SAVANNA = (ctx) -> Objects.equals(ctx.getKey(), BiomeKeys.SAVANNA.getValue());
Predicate<BiomeModifications.BiomeContext> SAVANNA_PLATEAU = (ctx) -> Objects.equals(ctx.getKey(), BiomeKeys.SAVANNA_PLATEAU.getValue());
Predicate<BiomeModifications.BiomeContext> DESERT = (ctx) -> Objects.equals(ctx.getKey().get(), BiomeKeys.DESERT.getValue());
Predicate<BiomeModifications.BiomeContext> BADLANDS = (ctx) -> Objects.equals(ctx.getKey().get(), BiomeKeys.BADLANDS.getValue());
Predicate<BiomeModifications.BiomeContext> ERODED_BADLANDS = (ctx) -> Objects.equals(ctx.getKey().get(), BiomeKeys.ERODED_BADLANDS.getValue());
Predicate<BiomeModifications.BiomeContext> WOODED_BADLANDS = (ctx) -> Objects.equals(ctx.getKey().get(), BiomeKeys.WOODED_BADLANDS.getValue());
Predicate<BiomeModifications.BiomeContext> SAVANNA = (ctx) -> Objects.equals(ctx.getKey().get(), BiomeKeys.SAVANNA.getValue());
Predicate<BiomeModifications.BiomeContext> SAVANNA_PLATEAU = (ctx) -> Objects.equals(ctx.getKey().get(), BiomeKeys.SAVANNA_PLATEAU.getValue());

registerBiomeModification(DESERT, MAULER.get(), SpawnGroup.CREATURE, config.maulerDesertSpawnWeight, config.maulerDesertSpawnMinGroupSize, config.maulerDesertSpawnMaxGroupSize);
registerBiomeModification(BADLANDS, MAULER.get(), SpawnGroup.CREATURE, config.maulerBadlandsSpawnWeight, config.maulerBadlandsSpawnMinGroupSize, config.maulerBadlandsSpawnMaxGroupSize);
Expand All @@ -99,8 +99,8 @@ public static void initBiomeModifications() {
}

if (config.enableMoobloom && config.enableMoobloomSpawn) {
Predicate<BiomeModifications.BiomeContext> FLOWER_FOREST = (ctx) -> Objects.equals(ctx.getKey(), BiomeKeys.FLOWER_FOREST.getValue());
Predicate<BiomeModifications.BiomeContext> MEADOW = (ctx) -> Objects.equals(ctx.getKey(), BiomeKeys.MEADOW.getValue());
Predicate<BiomeModifications.BiomeContext> FLOWER_FOREST = (ctx) -> Objects.equals(ctx.getKey().get(), BiomeKeys.FLOWER_FOREST.getValue());
Predicate<BiomeModifications.BiomeContext> MEADOW = (ctx) -> Objects.equals(ctx.getKey().get(), BiomeKeys.MEADOW.getValue());

registerBiomeModification(FLOWER_FOREST, MOOBLOOM.get(), SpawnGroup.CREATURE, config.moobloomFlowerForestSpawnWeight, config.moobloomFlowerForestSpawnMinGroupSize, config.moobloomFlowerForestSpawnMaxGroupSize);
registerBiomeModification(MEADOW, MOOBLOOM.get(), SpawnGroup.CREATURE, config.moobloomMeadowSpawnWeight, config.moobloomMeadowSpawnMinGroupSize, config.moobloomMeadowSpawnMaxGroupSize);
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.configureondemand=false
# Mod
mod_name=Friends&Foes
mod_id=friendsandfoes
mod_version=1.5.0
mod_version=1.5.1
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
Expand Down

0 comments on commit d4f5558

Please sign in to comment.