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 lookuphorseJumpMaterial- the runtime ID to horse jump material lookup (honey, carpet); UNKNOWN for every ID when the adapter has nonerawIdDefined- whether the player's block palette defines a runtime ID; true for every ID when the adapter cannot tell (see isKnownRawId)
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, IntFunction<HorseJumpMaterial> horseJumpMaterial, IntPredicate rawIdDefined)
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) 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, IntFunction<HorseJumpMaterial> horseJumpMaterial) 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, IntFunction<HorseJumpMaterial> horseJumpMaterial, IntPredicate rawIdDefined) 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.Returns the value of thehorseJumpMaterialrecord component.booleanisItemFrame(org.cloudburstmc.protocol.bedrock.data.definitions.BlockDefinition definition) booleanisKnownRawId(int runtimeId) Can Boar trust what this runtime ID means for collision? False when the palette does not define it (rawIdDefined), or when the collision mapping turns a non-air ID into air: the mapping could not resolve it (Geyser maps an unknown Bedrock ID to Java air).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 therawIdDefinedrecord 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, IntFunction<FallingFlowMaterial> fallingFlowMaterial, IntFunction<HorseJumpMaterial> horseJumpMaterial) -
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) -
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, IntFunction<HorseJumpMaterial> horseJumpMaterial, IntPredicate rawIdDefined) 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 componenthorseJumpMaterial- the value for thehorseJumpMaterialrecord componentrawIdDefined- the value for therawIdDefinedrecord component
-
-
Method Details
-
airId
public int airId() -
waterId
public int waterId() -
isKnownRawId
public boolean isKnownRawId(int runtimeId) Can Boar trust what this runtime ID means for collision? False when the palette does not define it (rawIdDefined), or when the collision mapping turns a non-air ID into air: the mapping could not resolve it (Geyser maps an unknown Bedrock ID to Java air). An unknown ID is never treated as air. Used by KnownBlockReads, the vehicle exit starts, the static seat exits and HorseJumpBlocks. -
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
-
horseJumpMaterial
Returns the value of thehorseJumpMaterialrecord component.- Returns:
- the value of the
horseJumpMaterialrecord component
-
rawIdDefined
Returns the value of therawIdDefinedrecord component.- Returns:
- the value of the
rawIdDefinedrecord component
-