Merge pull request #744 from TheHappyHopper/master

Temp fix for entity spawn height (fixes #730)
This commit is contained in:
Brian Fopiano 2022-02-09 13:44:20 -08:00 committed by GitHub
commit e9c0ac3c6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,8 +74,10 @@ public class IrisEntitySpawn implements IRare {
for(int id = 0; id < spawns; id++) {
int x = (c.getX() * 16) + rng.i(15);
int z = (c.getZ() * 16) + rng.i(15);
int h = gen.getHeight(x, z, true) + gen.getWorld().minHeight();
int hf = gen.getHeight(x, z, false) + gen.getWorld().minHeight();
int h = gen.getHeight(x, z, true) - 64;
int hf = gen.getHeight(x, z, false) - 64;
//int h = gen.getHeight(x, z, true) + gen.getWorld().minHeight(); Will look into this later
//int hf = gen.getHeight(x, z, false) + gen.getWorld().minHeight();
Location l = switch(getReferenceSpawner().getGroup()) {
case NORMAL -> new Location(c.getWorld(), x, hf + 1, z);
case CAVE -> gen.getMantle().findMarkers(c.getX(), c.getZ(), MarkerMatter.CAVE_FLOOR)