mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Fix issue caused by setting spawnRadius to 0. Closes #2624
This commit is contained in:
1 parent
2ae47c0903
commit
6342bfea3e
1 file changed
+3
-3
@@ -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));
|
||||
+ }
|
||||
+
|
||||
|
||||
Reference in new issue
Block a user