Temp fix for entity spawn height

Temporary fix for the mob spawning issue until 1.18 heights are natively added
This commit is contained in:
TheHappyHopper 2022-02-09 09:26:51 -08:00
parent f0ab72db92
commit edac6d1f22

View File

@ -74,8 +74,8 @@ 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);
int hf = gen.getHeight(x, z, false);
int h = gen.getHeight(x, z, true) - 64;
int hf = gen.getHeight(x, z, false) - 64;
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)