diff --git a/gradle.properties b/gradle.properties index 78fbd44..96c70fc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ yarn_mappings=1.20.4+build.3 loader_version=0.15.2 # Mod Properties -mod_version=1.0.3 +mod_version=1.0.4 maven_group=net.superkat.flutterandflounder archives_base_name=flutterandflounder diff --git a/src/main/java/net/superkat/flutterandflounder/flounderfest/api/FlounderFestApi.java b/src/main/java/net/superkat/flutterandflounder/flounderfest/api/FlounderFestApi.java index 89b6cca..7c35a10 100644 --- a/src/main/java/net/superkat/flutterandflounder/flounderfest/api/FlounderFestApi.java +++ b/src/main/java/net/superkat/flutterandflounder/flounderfest/api/FlounderFestApi.java @@ -192,8 +192,14 @@ private static BlockPos fishSpawningPos(ServerWorld world, BlockPos festCenterPo int spawnRadius = world.getGameRules().getInt(FlutterAndFlounderMain.FLOUNDERFEST_MOB_SPAWN_RADIUS); //additional blocks to add a small amount of randomness to the spawn location int spawnProximity = world.getGameRules().getInt(FlutterAndFlounderMain.FLOUNDERFEST_MOB_SPAWN_PROXIMITY); - int x = festCenterPos.getX() + MathHelper.floor(MathHelper.cos(f) * spawnRadius) + world.random.nextInt(spawnProximity); - int z = festCenterPos.getZ() + MathHelper.floor(MathHelper.sin(f) * spawnRadius) + world.random.nextInt(spawnProximity); + int extraX = 0; + int extraZ = 0; + if(spawnProximity > 0) { + extraX = world.random.nextInt(spawnProximity); + extraZ = world.random.nextInt(spawnProximity); + } + int x = festCenterPos.getX() + MathHelper.floor(MathHelper.cos(f) * spawnRadius) + extraX; + int z = festCenterPos.getZ() + MathHelper.floor(MathHelper.sin(f) * spawnRadius) + extraZ; int y = world.getTopY(Heightmap.Type.WORLD_SURFACE, x, z); mutable.set(x, y, z); if(!world.isNearOccupiedPointOfInterest(mutable) || proximity >= 2) {