mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +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
@@ -69,3 +69,12 @@
|
||||
if (p_217384_1_ == this.field_73037_M.field_71439_g) {
|
||||
this.field_73037_M.func_147118_V().func_147682_a(new EntityTickableSound(p_217384_3_, p_217384_4_, p_217384_2_));
|
||||
}
|
||||
@@ -689,7 +706,7 @@
|
||||
}
|
||||
|
||||
public double func_228331_m_() {
|
||||
- return this.field_72986_A.func_76067_t() == WorldType.field_77138_c ? 0.0D : 63.0D;
|
||||
+ return this.field_73011_w.getHorizonHeight();
|
||||
}
|
||||
|
||||
public int func_228332_n_() {
|
||||
@@ -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