Skip to content

Commit

Permalink
Partially revert last change - behaviour should now hopefully somewhe…
Browse files Browse the repository at this point in the history
…re in between with mob counts
  • Loading branch information
LunNova committed Jun 4, 2017
1 parent 51646c5 commit a54fd91
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ public int findChunksForSpawning(WorldServer worldServer, boolean peaceful, bool
SpawnLoop:
for (val entry : requiredSpawns.entrySet()) {
val creatureType = entry.getKey();
for (int j = 0; j < triesPerCreatureType; j++) {
val tries = Math.max(triesPerCreatureType, entry.getValue() / (triesPerCreatureType * mobClumping));
for (int j = 0; j < tries; j++) {
long hash = spawnableChunks.get(worldServer.rand.nextInt(size));
int x = (int) (hash >> 32);
int z = (int) hash;
Expand Down Expand Up @@ -208,7 +209,7 @@ public int findChunksForSpawning(WorldServer worldServer, boolean peaceful, bool
if (ssY <= 0)
continue;
state = chunk.getBlockState(ssX, ssY - 1, ssZ);
if (!state.getMaterial().isOpaque() || !state.getBlock().canCreatureSpawn(state, worldServer, new BlockPos(ssX, ssY - 1, ssZ), null))
if (!state.getBlock().canCreatureSpawn(state, worldServer, new BlockPos(ssX, ssY - 1, ssZ), null))
continue;
}

Expand Down

0 comments on commit a54fd91

Please sign in to comment.