Record Class BlockMappingInfo

java.lang.Object
java.lang.Record
ac.boar.anticheat.player.data.BlockMappingInfo
Record Components:
airDefinition - the air definition
waterDefinition - the water definition
lavaDefinition - the lava definition
powderSnowDefinition - the powder snow definition
airIds - the blocks considered air
itemFramePredicate - the item-frame block check
toIntermediary - the intermediary mapper
fromIntermediary - the intermediary mapper
fallingFlowMaterial - the ordinary-layer runtime ID to falling-flow material lookup

public record BlockMappingInfo(org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition airDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition waterDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition lavaDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition powderSnowDefinition, it.unimi.dsi.fastutil.ints.IntList airIds, Predicate<org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition> itemFramePredicate, IntUnaryOperator toIntermediary, IntUnaryOperator fromIntermediary, IntFunction<FallingFlowMaterial> fallingFlowMaterial) extends Record
Holds very simple information related to block mappings. A few convenience entries exist to access common block states, with the toIntermediary being used to convert a Bedrock block runtime id into the intermediary IDs used by the server.
  • Constructor Summary

    Constructors
    Constructor
    Description
    BlockMappingInfo(org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition airDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition waterDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition lavaDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition powderSnowDefinition, it.unimi.dsi.fastutil.ints.IntList airIds, Predicate<org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition> itemFramePredicate, IntUnaryOperator toIntermediary, IntUnaryOperator fromIntermediary)
     
    BlockMappingInfo(org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition airDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition waterDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition lavaDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition powderSnowDefinition, it.unimi.dsi.fastutil.ints.IntList airIds, Predicate<org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition> itemFramePredicate, IntUnaryOperator toIntermediary, IntUnaryOperator fromIntermediary, IntFunction<FallingFlowMaterial> fallingFlowMaterial)
    Creates an instance of a BlockMappingInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition
    Returns the value of the airDefinition record component.
    int
     
    it.unimi.dsi.fastutil.ints.IntList
    Returns the value of the airIds record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the fallingFlowMaterial record component.
    Returns the value of the fromIntermediary record component.
    final int
    Returns a hash code value for this object.
    boolean
    isItemFrame(org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition definition)
     
    Predicate<org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition>
    Returns the value of the itemFramePredicate record component.
    org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition
    Returns the value of the lavaDefinition record component.
    org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition
    Returns the value of the powderSnowDefinition record component.
    Returns the value of the toIntermediary record component.
    final String
    Returns a string representation of this record class.
    org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition
    Returns the value of the waterDefinition record component.
    int
     

    Methods inherited from class java.lang.Object

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

    • BlockMappingInfo

      public BlockMappingInfo(org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition airDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition waterDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition lavaDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition powderSnowDefinition, it.unimi.dsi.fastutil.ints.IntList airIds, Predicate<org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition> itemFramePredicate, IntUnaryOperator toIntermediary, IntUnaryOperator fromIntermediary)
    • BlockMappingInfo

      public BlockMappingInfo(org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition airDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition waterDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition lavaDefinition, org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition powderSnowDefinition, it.unimi.dsi.fastutil.ints.IntList airIds, Predicate<org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition> itemFramePredicate, IntUnaryOperator toIntermediary, IntUnaryOperator fromIntermediary, IntFunction<FallingFlowMaterial> fallingFlowMaterial)
      Creates an instance of a BlockMappingInfo record class.
      Parameters:
      airDefinition - the value for the airDefinition record component
      waterDefinition - the value for the waterDefinition record component
      lavaDefinition - the value for the lavaDefinition record component
      powderSnowDefinition - the value for the powderSnowDefinition record component
      airIds - the value for the airIds record component
      itemFramePredicate - the value for the itemFramePredicate record component
      toIntermediary - the value for the toIntermediary record component
      fromIntermediary - the value for the fromIntermediary record component
      fallingFlowMaterial - the value for the fallingFlowMaterial record component
  • Method Details

    • airId

      public int airId()
    • waterId

      public int waterId()
    • isItemFrame

      public boolean isItemFrame(org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition definition)
    • 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.
    • airDefinition

      public org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition airDefinition()
      Returns the value of the airDefinition record component.
      Returns:
      the value of the airDefinition record component
    • waterDefinition

      public org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition waterDefinition()
      Returns the value of the waterDefinition record component.
      Returns:
      the value of the waterDefinition record component
    • lavaDefinition

      public org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition lavaDefinition()
      Returns the value of the lavaDefinition record component.
      Returns:
      the value of the lavaDefinition record component
    • powderSnowDefinition

      public org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition powderSnowDefinition()
      Returns the value of the powderSnowDefinition record component.
      Returns:
      the value of the powderSnowDefinition record component
    • airIds

      public it.unimi.dsi.fastutil.ints.IntList airIds()
      Returns the value of the airIds record component.
      Returns:
      the value of the airIds record component
    • itemFramePredicate

      public Predicate<org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition> itemFramePredicate()
      Returns the value of the itemFramePredicate record component.
      Returns:
      the value of the itemFramePredicate record component
    • toIntermediary

      public IntUnaryOperator toIntermediary()
      Returns the value of the toIntermediary record component.
      Returns:
      the value of the toIntermediary record component
    • fromIntermediary

      public IntUnaryOperator fromIntermediary()
      Returns the value of the fromIntermediary record component.
      Returns:
      the value of the fromIntermediary record component
    • fallingFlowMaterial

      public IntFunction<FallingFlowMaterial> fallingFlowMaterial()
      Returns the value of the fallingFlowMaterial record component.
      Returns:
      the value of the fallingFlowMaterial record component