mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
[1.15.x] Add horizon hook (#7528)
* Redirect getHorizonHeight to extension interface * Add getHorizonHeight method
This commit is contained in:
1 parent
52dd0eceb2
commit
90ced4b3f7
2 files changed
+15
-2
No files matched your search
@@ -26,9 +26,8 @@ import net.minecraft.client.renderer.Vector3f;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.WorldType;
|
||||
import net.minecraft.world.biome.Biomes;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.dimension.Dimension;
|
||||
@@ -239,6 +238,11 @@ public interface IForgeDimension
|
||||
return 63;
|
||||
}
|
||||
|
||||
default double getHorizonHeight()
|
||||
{
|
||||
return getWorld().getWorldInfo().getGenerator() == WorldType.FLAT ? 0.0D : 63.0D;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if the cursor on the map should 'spin' when rendered, like it does for the player in the nether.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user