Class BlockStateRewriter
java.lang.Object
net.raphimc.viabedrock.protocol.rewriter.BlockStateRewriter
- All Implemented Interfaces:
com.viaversion.viaversion.api.connection.StorableObject
public class BlockStateRewriter
extends Object
implements com.viaversion.viaversion.api.connection.StorableObject
-
Constructor Summary
ConstructorsConstructorDescriptionBlockStateRewriter(BlockProperties[] blockProperties, boolean hashedRuntimeBlockIds, ResourcePackStorage resourcePackStorage) -
Method Summary
Modifier and TypeMethodDescriptionintbedrockId(int legacyBlockStateId) intbedrockId(com.viaversion.nbt.tag.CompoundTag bedrockBlockStateTag) intbedrockId(BlockState bedrockBlockState) com.viaversion.nbt.tag.CompoundTagblockComponents(int runtimeId) Return an isolated snapshot for this registered runtime-state owner.blockItemNameKey(String identifier, Short metadata) Resolve the canonical block before selecting its compiled native name.blockItemNumericId(int runtimeId) Runtime ownership remains known even when an archetype's descriptor is unverified.blockItemRecipeDescriptor(int runtimeId) blockItemRecipeDescriptor(String identifier, short metadata) blockItemState(String identifier, short metadata) blockState(int bedrockBlockStateId) voiddisableCustomBlocks(ResourcePackStorage storage) intfluidJavaId(int bedrockBlockStateId) Forward liquid state, preserving its mapped depth/falling properties; -1 for nonliquid or unknown IDs.booleanisRestrictionGroup(String identifier) intjavaId(int bedrockBlockStateId) registeredBlockIdentifier(String identifier) registeredBlockItemId(String identifier) Registered BlockLegacy ownership does not require an auxiliary converter for its archetype.intrestrictionBlocks(String[] identifiers) tag(int bedrockBlockStateId) com.viaversion.viaversion.libs.fastutil.ints.IntSortedSetvalidBlockStates(String bedrockBlockIdentifier) intwaterlog(int javaBlockStateId) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.viaversion.viaversion.api.connection.StorableObject
onRemove
-
Constructor Details
-
BlockStateRewriter
public BlockStateRewriter(BlockProperties[] blockProperties, boolean hashedRuntimeBlockIds, ResourcePackStorage resourcePackStorage)
-
-
Method Details
-
blockComponents
public com.viaversion.nbt.tag.CompoundTag blockComponents(int runtimeId) Return an isolated snapshot for this registered runtime-state owner. -
isRestrictionGroup
-
registeredBlockIdentifier
-
registeredBlockItemId
-
restrictionBlocks
-
bedrockId
public int bedrockId(com.viaversion.nbt.tag.CompoundTag bedrockBlockStateTag) -
bedrockId
-
blockState
-
blockItemRecipeDescriptor
-
blockItemNumericId
Runtime ownership remains known even when an archetype's descriptor is unverified. -
blockItemState
-
blockItemNameKey
-
blockItemRecipeDescriptor
-
registeredRuntimeId
-
bedrockId
public int bedrockId(int legacyBlockStateId) -
javaId
public int javaId(int bedrockBlockStateId) -
fluidJavaId
public int fluidJavaId(int bedrockBlockStateId) Forward liquid state, preserving its mapped depth/falling properties; -1 for nonliquid or unknown IDs. -
disableCustomBlocks
-
waterlog
public int waterlog(int javaBlockStateId) -
validBlockStates
public com.viaversion.viaversion.libs.fastutil.ints.IntSortedSet validBlockStates(String bedrockBlockIdentifier) -
tag
-