Merge branch 'ServerPatch' into 'main'

Fixed error when going into servers

See merge request jeseibel/distant-horizons-core!1
This commit is contained in:
James Seibel
2021-11-25 14:02:51 +00:00
2 changed files with 4 additions and 2 deletions
@@ -400,7 +400,7 @@ public class LodBuilder
if (world != null && !world.isEmpty())
if (world != null)
{
// server world sky light (always accurate)
blockLight = world.getBlockLight(blockPos);
@@ -429,7 +429,7 @@ public class LodBuilder
else
{
world = MC.getWrappedServerWorld();
if (world.isEmpty())
if (world==null)
return 0;
// client world sky light (almost never accurate)
blockLight = world.getBlockLight(blockPos);
@@ -46,6 +46,8 @@ public interface IWorldWrapper
public boolean hasSkyLight();
// Pls dont use this
// If the world is null then this cant be called and gives an error
public boolean isEmpty();
public int getHeight();