Record Class PalettedContainerFactory

java.lang.Object
java.lang.Record
net.minecraft.world.level.chunk.PalettedContainerFactory

public record PalettedContainerFactory(Strategy<BlockState> blockStatesStrategy, BlockState defaultBlockState, com.mojang.serialization.Codec<PalettedContainer<BlockState>> blockStatesContainerCodec, Strategy<Holder<Biome>> biomeStrategy, Holder<Biome> defaultBiome, com.mojang.serialization.Codec<PalettedContainerRO<Holder<Biome>>> biomeContainerCodec) extends Record
  • Field Details

    • blockStatesStrategy

      private final Strategy<BlockState> blockStatesStrategy
      The field for the blockStatesStrategy record component.
    • defaultBlockState

      private final BlockState defaultBlockState
      The field for the defaultBlockState record component.
    • blockStatesContainerCodec

      private final com.mojang.serialization.Codec<PalettedContainer<BlockState>> blockStatesContainerCodec
      The field for the blockStatesContainerCodec record component.
    • biomeStrategy

      private final Strategy<Holder<Biome>> biomeStrategy
      The field for the biomeStrategy record component.
    • defaultBiome

      private final Holder<Biome> defaultBiome
      The field for the defaultBiome record component.
    • biomeContainerCodec

      private final com.mojang.serialization.Codec<PalettedContainerRO<Holder<Biome>>> biomeContainerCodec
      The field for the biomeContainerCodec record component.
  • Constructor Details

    • PalettedContainerFactory

      public PalettedContainerFactory(Strategy<BlockState> blockStatesStrategy, BlockState defaultBlockState, com.mojang.serialization.Codec<PalettedContainer<BlockState>> blockStatesContainerCodec, Strategy<Holder<Biome>> biomeStrategy, Holder<Biome> defaultBiome, com.mojang.serialization.Codec<PalettedContainerRO<Holder<Biome>>> biomeContainerCodec)
      Creates an instance of a PalettedContainerFactory record class.
      Parameters:
      blockStatesStrategy - the value for the blockStatesStrategy record component
      defaultBlockState - the value for the defaultBlockState record component
      blockStatesContainerCodec - the value for the blockStatesContainerCodec record component
      biomeStrategy - the value for the biomeStrategy record component
      defaultBiome - the value for the defaultBiome record component
      biomeContainerCodec - the value for the biomeContainerCodec record component
  • Method Details

    • create

      public static PalettedContainerFactory create(RegistryAccess pRegistries)
    • createForBlockStates

      public PalettedContainer<BlockState> createForBlockStates()
    • createForBiomes

      public PalettedContainer<Holder<Biome>> createForBiomes()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • blockStatesStrategy

      public Strategy<BlockState> blockStatesStrategy()
      Returns the value of the blockStatesStrategy record component.
      Returns:
      the value of the blockStatesStrategy record component
    • defaultBlockState

      public BlockState defaultBlockState()
      Returns the value of the defaultBlockState record component.
      Returns:
      the value of the defaultBlockState record component
    • blockStatesContainerCodec

      public com.mojang.serialization.Codec<PalettedContainer<BlockState>> blockStatesContainerCodec()
      Returns the value of the blockStatesContainerCodec record component.
      Returns:
      the value of the blockStatesContainerCodec record component
    • biomeStrategy

      public Strategy<Holder<Biome>> biomeStrategy()
      Returns the value of the biomeStrategy record component.
      Returns:
      the value of the biomeStrategy record component
    • defaultBiome

      public Holder<Biome> defaultBiome()
      Returns the value of the defaultBiome record component.
      Returns:
      the value of the defaultBiome record component
    • biomeContainerCodec

      public com.mojang.serialization.Codec<PalettedContainerRO<Holder<Biome>>> biomeContainerCodec()
      Returns the value of the biomeContainerCodec record component.
      Returns:
      the value of the biomeContainerCodec record component