Record Class PNXChunkDelegate

java.lang.Object
java.lang.Record
cn.nukkit.level.terra.delegate.PNXChunkDelegate
All Implemented Interfaces:
com.dfsek.terra.api.Handle, com.dfsek.terra.api.world.chunk.Chunk, com.dfsek.terra.api.world.chunk.ChunkAccess

@PowerNukkitXOnly @Since("1.6.0.0-PNX") public record PNXChunkDelegate(com.dfsek.terra.api.world.ServerWorld world, BaseFullChunk chunk) extends Record implements com.dfsek.terra.api.world.chunk.Chunk
  • Constructor Summary

    Constructors
    Constructor
    Description
    PNXChunkDelegate(com.dfsek.terra.api.world.ServerWorld world, BaseFullChunk chunk)
    Creates an instance of a PNXChunkDelegate record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the chunk record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    com.dfsek.terra.api.block.state.BlockState
    getBlock(int i, int i1, int i2)
     
     
    com.dfsek.terra.api.world.ServerWorld
     
    int
     
    int
     
    final int
    Returns a hash code value for this object.
    void
    setBlock(int i, int i1, int i2, com.dfsek.terra.api.block.state.BlockState blockState)
     
    void
    setBlock(int i, int i1, int i2, com.dfsek.terra.api.block.state.BlockState blockState, boolean b)
     
    final String
    Returns a string representation of this record class.
    com.dfsek.terra.api.world.ServerWorld
    Returns the value of the world record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PNXChunkDelegate

      public PNXChunkDelegate(com.dfsek.terra.api.world.ServerWorld world, BaseFullChunk chunk)
      Creates an instance of a PNXChunkDelegate record class.
      Parameters:
      world - the value for the world record component
      chunk - the value for the chunk record component
  • Method Details

    • setBlock

      public void setBlock(int i, int i1, int i2, com.dfsek.terra.api.block.state.BlockState blockState, boolean b)
      Specified by:
      setBlock in interface com.dfsek.terra.api.world.chunk.Chunk
    • setBlock

      public void setBlock(int i, int i1, int i2, @NotNull com.dfsek.terra.api.block.state.BlockState blockState)
      Specified by:
      setBlock in interface com.dfsek.terra.api.world.chunk.Chunk
      Specified by:
      setBlock in interface com.dfsek.terra.api.world.chunk.ChunkAccess
    • getBlock

      @NotNull public com.dfsek.terra.api.block.state.BlockState getBlock(int i, int i1, int i2)
      Specified by:
      getBlock in interface com.dfsek.terra.api.world.chunk.Chunk
      Specified by:
      getBlock in interface com.dfsek.terra.api.world.chunk.ChunkAccess
    • getX

      public int getX()
      Specified by:
      getX in interface com.dfsek.terra.api.world.chunk.Chunk
    • getZ

      public int getZ()
      Specified by:
      getZ in interface com.dfsek.terra.api.world.chunk.Chunk
    • getWorld

      public com.dfsek.terra.api.world.ServerWorld getWorld()
      Specified by:
      getWorld in interface com.dfsek.terra.api.world.chunk.Chunk
    • getHandle

      public Object getHandle()
      Specified by:
      getHandle in interface com.dfsek.terra.api.Handle
    • 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.
    • world

      public com.dfsek.terra.api.world.ServerWorld world()
      Returns the value of the world record component.
      Returns:
      the value of the world record component
    • chunk

      public BaseFullChunk chunk()
      Returns the value of the chunk record component.
      Returns:
      the value of the chunk record component