Record Class LaputaState

java.lang.Object
java.lang.Record
vazkii.botania.common.component.LaputaState

public record LaputaState(net.minecraft.world.level.block.state.BlockState blockState, Optional<net.minecraft.world.item.component.CustomData> blockEntityData, @Nullable net.minecraft.core.BlockPos nextPos, int yStart, int i, int j, int k) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<LaputaState>
     
    static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,LaputaState>
    Only encodes the block state, as no other data is required by the client.
  • Constructor Summary

    Constructors
    Constructor
    Description
    LaputaState(net.minecraft.world.level.block.state.BlockState blockState, Optional<net.minecraft.world.item.component.CustomData> blockEntityData, @Nullable net.minecraft.core.BlockPos nextPos, int yStart, int i, int j, int k)
    Creates an instance of a LaputaState record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<net.minecraft.world.item.component.CustomData>
    Returns the value of the blockEntityData record component.
    net.minecraft.world.level.block.state.BlockState
    Returns the value of the blockState record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    i()
    Returns the value of the i record component.
    int
    j()
    Returns the value of the j record component.
    int
    k()
    Returns the value of the k record component.
    @Nullable net.minecraft.core.BlockPos
    Returns the value of the nextPos record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the yStart record component.

    Methods inherited from class java.lang.Object

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

    • CODEC

      public static final com.mojang.serialization.Codec<LaputaState> CODEC
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,LaputaState> STREAM_CODEC
      Only encodes the block state, as no other data is required by the client. TODO: is that a good idea to save bandwidth?
  • Constructor Details

    • LaputaState

      public LaputaState(net.minecraft.world.level.block.state.BlockState blockState, Optional<net.minecraft.world.item.component.CustomData> blockEntityData, @Nullable @Nullable net.minecraft.core.BlockPos nextPos, int yStart, int i, int j, int k)
      Creates an instance of a LaputaState record class.
      Parameters:
      blockState - the value for the blockState record component
      blockEntityData - the value for the blockEntityData record component
      nextPos - the value for the nextPos record component
      yStart - the value for the yStart record component
      i - the value for the i record component
      j - the value for the j record component
      k - the value for the k record component
  • Method Details

    • 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.
    • blockState

      public net.minecraft.world.level.block.state.BlockState blockState()
      Returns the value of the blockState record component.
      Returns:
      the value of the blockState record component
    • blockEntityData

      public Optional<net.minecraft.world.item.component.CustomData> blockEntityData()
      Returns the value of the blockEntityData record component.
      Returns:
      the value of the blockEntityData record component
    • nextPos

      @Nullable public @Nullable net.minecraft.core.BlockPos nextPos()
      Returns the value of the nextPos record component.
      Returns:
      the value of the nextPos record component
    • yStart

      public int yStart()
      Returns the value of the yStart record component.
      Returns:
      the value of the yStart record component
    • i

      public int i()
      Returns the value of the i record component.
      Returns:
      the value of the i record component
    • j

      public int j()
      Returns the value of the j record component.
      Returns:
      the value of the j record component
    • k

      public int k()
      Returns the value of the k record component.
      Returns:
      the value of the k record component