Fix issue caused by setting spawnRadius to 0. Closes #2624

This commit is contained in:
LexManos 2016-04-04 15:22:17 -07:00
parent 2ae47c0903
commit 6342bfea3e

View file

@ -185,11 +185,11 @@
+ int spawnFuzz = this.field_76579_a instanceof WorldServer ? field_76577_b.getSpawnFuzz((WorldServer)this.field_76579_a, this.field_76579_a.func_73046_m()) : 1;
+ int border = MathHelper.func_76128_c(field_76579_a.func_175723_af().func_177729_b(ret.func_177958_n(), ret.func_177952_p()));
+ if (border < spawnFuzz) spawnFuzz = border;
+ if (spawnFuzz < 1) spawnFuzz = 1;
+ int spawnFuzzHalf = spawnFuzz / 2;
+
+ if (!func_177495_o() && !isAdventure)
+ if (!func_177495_o() && !isAdventure && spawnFuzz != 0)
+ {
+ if (spawnFuzz < 2) spawnFuzz = 2;
+ int spawnFuzzHalf = spawnFuzz / 2;
+ ret = field_76579_a.func_175672_r(ret.func_177982_a(field_76579_a.field_73012_v.nextInt(spawnFuzzHalf) - spawnFuzz, 0, field_76579_a.field_73012_v.nextInt(spawnFuzzHalf) - spawnFuzz));
+ }
+