Record Class PrefabUtil.PasteRegion.Section

java.lang.Object
java.lang.Record
com.hypixel.hytale.server.core.util.PrefabUtil.PasteRegion.Section
Enclosing class:
PrefabUtil.PasteRegion

public static record PrefabUtil.PasteRegion.Section(@Nullable BlockSection blocks, @Nullable FluidSection fluids, @Nullable BlockPhysics physics, @Nullable EntitySection entities, @Nullable BlockComponentSection blockComponents) extends Record
Holds the component data for a chunk section.
Since:
12.06.2020
  • Constructor Details

    • Section

      public Section(@Nullable BlockSection blocks, @Nullable FluidSection fluids, @Nullable BlockPhysics physics, @Nullable EntitySection entities, @Nullable BlockComponentSection blockComponents)
      Creates an instance of a Section record class.
      Parameters:
      blocks - the value for the blocks record component
      fluids - the value for the fluids record component
      physics - the value for the physics record component
      entities - the value for the entities record component
      blockComponents - the value for the blockComponents record component
  • Method Details

    • getBlock

      public int getBlock(int sectionIndex)
    • getFiller

      public int getFiller(int sectionIndex)
    • getRotation

      public int getRotation(int sectionIndex)
    • getSupport

      public byte getSupport(int sectionIndex)
    • getFluid

      public int getFluid(int sectionIndex)
    • getFluidLevel

      public byte getFluidLevel(int sectionIndex)
    • getState

      @Nullable public Holder<ChunkStore> getState(int sectionIndex)
    • 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.
    • blocks

      @Nullable public BlockSection blocks()
      Returns the value of the blocks record component.
      Returns:
      the value of the blocks record component
    • fluids

      @Nullable public FluidSection fluids()
      Returns the value of the fluids record component.
      Returns:
      the value of the fluids record component
    • physics

      @Nullable public BlockPhysics physics()
      Returns the value of the physics record component.
      Returns:
      the value of the physics record component
    • entities

      @Nullable public EntitySection entities()
      Returns the value of the entities record component.
      Returns:
      the value of the entities record component
    • blockComponents

      @Nullable public BlockComponentSection blockComponents()
      Returns the value of the blockComponents record component.
      Returns:
      the value of the blockComponents record component