Record Class GeneratorImpl.SectionModifierImpl

java.lang.Object
java.lang.Record
net.minestom.server.instance.generator.GeneratorImpl.SectionModifierImpl
All Implemented Interfaces:
Block.Setter, UnitModifier, Biome.Setter
Enclosing class:
GeneratorImpl

public static record GeneratorImpl.SectionModifierImpl(DynamicRegistry<Biome> biomeRegistry, Point size, Point start, Point end, GeneratorImpl.GenSection genSection, boolean fork) extends Record
  • Constructor Details

    • SectionModifierImpl

      public SectionModifierImpl(DynamicRegistry<Biome> biomeRegistry, Point size, Point start, Point end, GeneratorImpl.GenSection genSection, boolean fork)
      Creates an instance of a SectionModifierImpl record class.
      Parameters:
      biomeRegistry - the value for the biomeRegistry record component
      size - the value for the size record component
      start - the value for the start record component
      end - the value for the end record component
      genSection - the value for the genSection record component
      fork - the value for the fork record component
  • Method Details

    • setBiome

      public void setBiome(int x, int y, int z, @NotNull DynamicRegistry.Key<Biome> biome)
      Specified by:
      setBiome in interface Biome.Setter
    • setBlock

      public void setBlock(int x, int y, int z, @NotNull @NotNull Block block)
      Specified by:
      setBlock in interface Block.Setter
    • setRelative

      public void setRelative(int x, int y, int z, @NotNull @NotNull Block block)
      Description copied from interface: UnitModifier
      Sets the block relative to the absolute position of the unit.
      Specified by:
      setRelative in interface UnitModifier
      Parameters:
      x - the x coordinate
      y - the y coordinate
      z - the z coordinate
      block - the block to set
    • setAllRelative

      public void setAllRelative(@NotNull @NotNull UnitModifier.Supplier supplier)
      Description copied from interface: UnitModifier
      Sets all blocks within the unit to the block given by the supplier, relative to the absolute position of the unit.
      Specified by:
      setAllRelative in interface UnitModifier
      Parameters:
      supplier - the supplier of the block to set
    • fill

      public void fill(@NotNull @NotNull Block block)
      Description copied from interface: UnitModifier
      Fills the unit with the given block.
      Specified by:
      fill in interface UnitModifier
      Parameters:
      block - the block to fill
    • fillBiome

      public void fillBiome(@NotNull DynamicRegistry.Key<Biome> biome)
      Description copied from interface: UnitModifier
      Fills the 3d rectangular area with the given biome.
      Specified by:
      fillBiome in interface UnitModifier
      Parameters:
      biome - the biome to fill
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • biomeRegistry

      public DynamicRegistry<Biome> biomeRegistry()
      Returns the value of the biomeRegistry record component.
      Returns:
      the value of the biomeRegistry record component
    • size

      public Point size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • start

      public Point start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • end

      public Point end()
      Returns the value of the end record component.
      Returns:
      the value of the end record component
    • genSection

      public GeneratorImpl.GenSection genSection()
      Returns the value of the genSection record component.
      Returns:
      the value of the genSection record component
    • fork

      public boolean fork()
      Returns the value of the fork record component.
      Returns:
      the value of the fork record component
    • setAll

      default void setAll(@NotNull @NotNull UnitModifier.Supplier supplier)
      Description copied from interface: UnitModifier
      Sets all blocks within the unit to the block given by the supplier.
      Specified by:
      setAll in interface UnitModifier
      Parameters:
      supplier - the supplier of the block to set
    • fill

      default void fill(@NotNull @NotNull Point start, @NotNull @NotNull Point end, @NotNull @NotNull Block block)
      Description copied from interface: UnitModifier
      Fills the 3d rectangular area with the given block.
      Specified by:
      fill in interface UnitModifier
      Parameters:
      start - the start (min) point of the area
      end - the end (max) point of the area
      block - the block to fill
    • fillHeight

      default void fillHeight(int minHeight, int maxHeight, @NotNull @NotNull Block block)
      Description copied from interface: UnitModifier
      Fills the 3d rectangular area with the given biome.
      Specified by:
      fillHeight in interface UnitModifier
      Parameters:
      minHeight - the minimum height of the area
      maxHeight - the maximum height of the area
      block - the block to fill