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 Details

  • Method Details

    • blockComponents

      public com.viaversion.nbt.tag.CompoundTag blockComponents(int runtimeId)
      Return an isolated snapshot for this registered runtime-state owner.
    • isRestrictionGroup

      public boolean isRestrictionGroup(String identifier)
    • registeredBlockIdentifier

      public String registeredBlockIdentifier(String identifier)
    • registeredBlockItemId

      public Integer registeredBlockItemId(String identifier)
      Registered BlockLegacy ownership does not require an auxiliary converter for its archetype.
    • restrictionBlocks

      public Set<String> restrictionBlocks(String[] identifiers)
    • bedrockId

      public int bedrockId(com.viaversion.nbt.tag.CompoundTag bedrockBlockStateTag)
    • bedrockId

      public int bedrockId(BlockState bedrockBlockState)
    • blockState

      public BlockState blockState(int bedrockBlockStateId)
    • blockItemRecipeDescriptor

      public BlockItemDescriptor blockItemRecipeDescriptor(int runtimeId)
    • blockItemNumericId

      public Integer blockItemNumericId(int runtimeId)
      Runtime ownership remains known even when an archetype's descriptor is unverified.
    • blockItemState

      public BedrockBlockState blockItemState(String identifier, short metadata)
    • blockItemNameKey

      public String blockItemNameKey(String identifier, Short metadata)
      Resolve the canonical block before selecting its compiled native name. Null metadata selects its default.
    • blockItemRecipeDescriptor

      public BlockItemDescriptor blockItemRecipeDescriptor(String identifier, short metadata)
    • registeredRuntimeId

      public int registeredRuntimeId(BedrockBlockState state)
    • 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

      public void disableCustomBlocks(ResourcePackStorage storage)
    • waterlog

      public int waterlog(int javaBlockStateId)
    • validBlockStates

      public com.viaversion.viaversion.libs.fastutil.ints.IntSortedSet validBlockStates(String bedrockBlockIdentifier)
    • tag

      public String tag(int bedrockBlockStateId)