Class BiomeCoords

java.lang.Object
net.minecraft.world.biome.source.BiomeCoords

public final class BiomeCoords extends Object
Utility class for converting between biome coordinates and block or chunk coordinates.

Modders should use this class as Mojang may change the biome coordinate to block or chunk coordinate ratio in the future again.

API Note:
A biome voxel comprises of 4×4×4 block voxels, as that's how biomes are stored in game after 19w36a. Each chunk section has 4×4×4 biome voxels as a result.
Mappings:
Namespace Name
named net/minecraft/world/biome/source/BiomeCoords
intermediary net/minecraft/class_5742
official jx
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    private static final int
     
    static final int
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    fromBlock(int blockCoord)
    Converts a block x, y, or z to a biome x, y, or z.
    static int
    fromChunk(int chunkCoord)
    Converts a chunk x or z to a biome x or z.
    static int
    method_39920(int int2)
     
    static int
    toBlock(int biomeCoord)
    Converts a biome x, y, or z to a block x, y, or z.
    static int
    toChunk(int biomeCoord)
    Converts a biome x or z to a chunk x or z.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • field_33089

      public static final int field_33089
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_33089 Lnet/minecraft/world/biome/source/BiomeCoords;field_33089:I
      intermediary field_33089 Lnet/minecraft/class_5742;field_33089:I
      official a Ljx;a:I
    • field_33090

      public static final int field_33090
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_33090 Lnet/minecraft/world/biome/source/BiomeCoords;field_33090:I
      intermediary field_33090 Lnet/minecraft/class_5742;field_33090:I
      official b Ljx;b:I
    • field_34830

      public static final int field_34830
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_34830 Lnet/minecraft/world/biome/source/BiomeCoords;field_34830:I
      intermediary field_34830 Lnet/minecraft/class_5742;field_34830:I
      official c Ljx;c:I
    • field_33091

      private static final int field_33091
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_33091 Lnet/minecraft/world/biome/source/BiomeCoords;field_33091:I
      intermediary field_33091 Lnet/minecraft/class_5742;field_33091:I
      official d Ljx;d:I
  • Constructor Details

    • BiomeCoords

      private BiomeCoords()
  • Method Details

    • fromBlock

      public static int fromBlock(int blockCoord)
      Converts a block x, y, or z to a biome x, y, or z.
      Parameters:
      blockCoord - a block x, y, or z
      Implementation Requirements:
      This implementation returns blockCoord / 4.
      Mappings:
      Namespace Name Mixin selector
      named fromBlock Lnet/minecraft/world/biome/source/BiomeCoords;fromBlock(I)I
      intermediary method_33100 Lnet/minecraft/class_5742;method_33100(I)I
      official a Ljx;a(I)I
    • method_39920

      public static int method_39920(int int2)
      Mappings:
      Namespace Name Mixin selector
      named method_39920 Lnet/minecraft/world/biome/source/BiomeCoords;method_39920(I)I
      intermediary method_39920 Lnet/minecraft/class_5742;method_39920(I)I
      official b Ljx;b(I)I
    • toBlock

      public static int toBlock(int biomeCoord)
      Converts a biome x, y, or z to a block x, y, or z.
      Parameters:
      biomeCoord - a biome x, y, or z
      Implementation Requirements:
      This implementation returns blockCoord * 4.
      Mappings:
      Namespace Name Mixin selector
      named toBlock Lnet/minecraft/world/biome/source/BiomeCoords;toBlock(I)I
      intermediary method_33101 Lnet/minecraft/class_5742;method_33101(I)I
      official c Ljx;c(I)I
    • fromChunk

      public static int fromChunk(int chunkCoord)
      Converts a chunk x or z to a biome x or z.
      Parameters:
      chunkCoord - a chunk x or z
      Implementation Requirements:
      This implementation returns chunkCoord * 4.
      Mappings:
      Namespace Name Mixin selector
      named fromChunk Lnet/minecraft/world/biome/source/BiomeCoords;fromChunk(I)I
      intermediary method_33102 Lnet/minecraft/class_5742;method_33102(I)I
      official d Ljx;d(I)I
    • toChunk

      public static int toChunk(int biomeCoord)
      Converts a biome x or z to a chunk x or z.
      Parameters:
      biomeCoord - a biome x or z
      Implementation Requirements:
      This implementation returns biomeCoord / 4.
      Mappings:
      Namespace Name Mixin selector
      named toChunk Lnet/minecraft/world/biome/source/BiomeCoords;toChunk(I)I
      intermediary method_33103 Lnet/minecraft/class_5742;method_33103(I)I
      official e Ljx;e(I)I