Package ac.boar.anticheat.player.data
Record Class BlockMappingInfo
java.lang.Object
java.lang.Record
ac.boar.anticheat.player.data.BlockMappingInfo
- Record Components:
airDefinition- the air definitionwaterDefinition- the water definitionlavaDefinition- the lava definitionpowderSnowDefinition- the powder snow definitionairIds- the blocks considered airitemFramePredicate- the item-frame block checktoIntermediary- the intermediary mapperfromIntermediary- the intermediary mapperfallingFlowMaterial- 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
ConstructorsConstructorDescriptionBlockMappingInfo(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 aBlockMappingInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinitionReturns the value of theairDefinitionrecord component.intairId()it.unimi.dsi.fastutil.ints.IntListairIds()Returns the value of theairIdsrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefallingFlowMaterialrecord component.Returns the value of thefromIntermediaryrecord component.final inthashCode()Returns a hash code value for this object.booleanisItemFrame(org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition definition) Predicate<org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition> Returns the value of theitemFramePredicaterecord component.org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinitionReturns the value of thelavaDefinitionrecord component.org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinitionReturns the value of thepowderSnowDefinitionrecord component.Returns the value of thetoIntermediaryrecord component.final StringtoString()Returns a string representation of this record class.org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinitionReturns the value of thewaterDefinitionrecord component.intwaterId()
-
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 aBlockMappingInforecord class.- Parameters:
airDefinition- the value for theairDefinitionrecord componentwaterDefinition- the value for thewaterDefinitionrecord componentlavaDefinition- the value for thelavaDefinitionrecord componentpowderSnowDefinition- the value for thepowderSnowDefinitionrecord componentairIds- the value for theairIdsrecord componentitemFramePredicate- the value for theitemFramePredicaterecord componenttoIntermediary- the value for thetoIntermediaryrecord componentfromIntermediary- the value for thefromIntermediaryrecord componentfallingFlowMaterial- the value for thefallingFlowMaterialrecord component
-
-
Method Details
-
airId
public int airId() -
waterId
public int waterId() -
isItemFrame
public boolean isItemFrame(org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition definition) -
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
airDefinition
public org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition airDefinition()Returns the value of theairDefinitionrecord component.- Returns:
- the value of the
airDefinitionrecord component
-
waterDefinition
public org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition waterDefinition()Returns the value of thewaterDefinitionrecord component.- Returns:
- the value of the
waterDefinitionrecord component
-
lavaDefinition
public org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition lavaDefinition()Returns the value of thelavaDefinitionrecord component.- Returns:
- the value of the
lavaDefinitionrecord component
-
powderSnowDefinition
public org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition powderSnowDefinition()Returns the value of thepowderSnowDefinitionrecord component.- Returns:
- the value of the
powderSnowDefinitionrecord component
-
airIds
public it.unimi.dsi.fastutil.ints.IntList airIds()Returns the value of theairIdsrecord component.- Returns:
- the value of the
airIdsrecord component
-
itemFramePredicate
public Predicate<org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition> itemFramePredicate()Returns the value of theitemFramePredicaterecord component.- Returns:
- the value of the
itemFramePredicaterecord component
-
toIntermediary
Returns the value of thetoIntermediaryrecord component.- Returns:
- the value of the
toIntermediaryrecord component
-
fromIntermediary
Returns the value of thefromIntermediaryrecord component.- Returns:
- the value of the
fromIntermediaryrecord component
-
fallingFlowMaterial
Returns the value of thefallingFlowMaterialrecord component.- Returns:
- the value of the
fallingFlowMaterialrecord component
-