Class InventorySlot.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<InventorySlot.Builder>
com.google.protobuf.GeneratedMessage.Builder<InventorySlot.Builder>
com.soulfiremc.grpc.generated.InventorySlot.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, InventorySlotOrBuilder, Cloneable
Enclosing class:
InventorySlot

public static final class InventorySlot.Builder extends com.google.protobuf.GeneratedMessage.Builder<InventorySlot.Builder> implements InventorySlotOrBuilder
Represents an item in an inventory slot.
Used for both container slots and carried (cursor) items.
Protobuf type soulfire.v1.InventorySlot
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    The number of items in this stack.
    The custom display name of the item, if it has been renamed.
    The Minecraft item identifier in namespaced format.
    The slot index within the container.
    int
    The number of items in this stack.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    The custom display name of the item, if it has been renamed.
    com.google.protobuf.ByteString
    The custom display name of the item, if it has been renamed.
    The Minecraft item identifier in namespaced format.
    com.google.protobuf.ByteString
    The Minecraft item identifier in namespaced format.
    int
    The slot index within the container.
    boolean
    The custom display name of the item, if it has been renamed.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
     
    setCount(int value)
    The number of items in this stack.
    The custom display name of the item, if it has been renamed.
    setDisplayNameBytes(com.google.protobuf.ByteString value)
    The custom display name of the item, if it has been renamed.
    The Minecraft item identifier in namespaced format.
    setItemIdBytes(com.google.protobuf.ByteString value)
    The Minecraft item identifier in namespaced format.
    setSlot(int value)
    The slot index within the container.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3

    Methods inherited from class com.google.protobuf.AbstractMessage.Builder

    findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

    addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException

    Methods inherited from class Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<InventorySlot.Builder>
    • clear

      public InventorySlot.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<InventorySlot.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<InventorySlot.Builder>
    • getDefaultInstanceForType

      public InventorySlot getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public InventorySlot build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public InventorySlot buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public InventorySlot.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<InventorySlot.Builder>
    • mergeFrom

      public InventorySlot.Builder mergeFrom(InventorySlot other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<InventorySlot.Builder>
    • mergeFrom

      public InventorySlot.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<InventorySlot.Builder>
      Throws:
      IOException
    • getSlot

      public int getSlot()
      The slot index within the container.
      - For container menus: 0 to (total_slots - 1)
      - For player inventory: 0-4 crafting, 5-8 armor, 9-35 main inventory, 36-44 hotbar, 45 offhand
      - For carried items (cursor): -1 is used as a special indicator
      
      int32 slot = 1;
      Specified by:
      getSlot in interface InventorySlotOrBuilder
      Returns:
      The slot.
    • setSlot

      public InventorySlot.Builder setSlot(int value)
      The slot index within the container.
      - For container menus: 0 to (total_slots - 1)
      - For player inventory: 0-4 crafting, 5-8 armor, 9-35 main inventory, 36-44 hotbar, 45 offhand
      - For carried items (cursor): -1 is used as a special indicator
      
      int32 slot = 1;
      Parameters:
      value - The slot to set.
      Returns:
      This builder for chaining.
    • clearSlot

      public InventorySlot.Builder clearSlot()
      The slot index within the container.
      - For container menus: 0 to (total_slots - 1)
      - For player inventory: 0-4 crafting, 5-8 armor, 9-35 main inventory, 36-44 hotbar, 45 offhand
      - For carried items (cursor): -1 is used as a special indicator
      
      int32 slot = 1;
      Returns:
      This builder for chaining.
    • getItemId

      public String getItemId()
      The Minecraft item identifier in namespaced format.
      Examples: "minecraft:diamond_sword", "minecraft:stone", "minecraft:enchanted_book"
      
      string item_id = 2;
      Specified by:
      getItemId in interface InventorySlotOrBuilder
      Returns:
      The itemId.
    • getItemIdBytes

      public com.google.protobuf.ByteString getItemIdBytes()
      The Minecraft item identifier in namespaced format.
      Examples: "minecraft:diamond_sword", "minecraft:stone", "minecraft:enchanted_book"
      
      string item_id = 2;
      Specified by:
      getItemIdBytes in interface InventorySlotOrBuilder
      Returns:
      The bytes for itemId.
    • setItemId

      public InventorySlot.Builder setItemId(String value)
      The Minecraft item identifier in namespaced format.
      Examples: "minecraft:diamond_sword", "minecraft:stone", "minecraft:enchanted_book"
      
      string item_id = 2;
      Parameters:
      value - The itemId to set.
      Returns:
      This builder for chaining.
    • clearItemId

      public InventorySlot.Builder clearItemId()
      The Minecraft item identifier in namespaced format.
      Examples: "minecraft:diamond_sword", "minecraft:stone", "minecraft:enchanted_book"
      
      string item_id = 2;
      Returns:
      This builder for chaining.
    • setItemIdBytes

      public InventorySlot.Builder setItemIdBytes(com.google.protobuf.ByteString value)
      The Minecraft item identifier in namespaced format.
      Examples: "minecraft:diamond_sword", "minecraft:stone", "minecraft:enchanted_book"
      
      string item_id = 2;
      Parameters:
      value - The bytes for itemId to set.
      Returns:
      This builder for chaining.
    • getCount

      public int getCount()
      The number of items in this stack.
      Range: 1 to the item's maximum stack size (typically 1, 16, or 64).
      
      int32 count = 3;
      Specified by:
      getCount in interface InventorySlotOrBuilder
      Returns:
      The count.
    • setCount

      public InventorySlot.Builder setCount(int value)
      The number of items in this stack.
      Range: 1 to the item's maximum stack size (typically 1, 16, or 64).
      
      int32 count = 3;
      Parameters:
      value - The count to set.
      Returns:
      This builder for chaining.
    • clearCount

      public InventorySlot.Builder clearCount()
      The number of items in this stack.
      Range: 1 to the item's maximum stack size (typically 1, 16, or 64).
      
      int32 count = 3;
      Returns:
      This builder for chaining.
    • hasDisplayName

      public boolean hasDisplayName()
      The custom display name of the item, if it has been renamed.
      Only present when the item has a custom name component (e.g., renamed in an anvil).
      Contains the plain text string, not JSON text components.
      
      optional string display_name = 4;
      Specified by:
      hasDisplayName in interface InventorySlotOrBuilder
      Returns:
      Whether the displayName field is set.
    • getDisplayName

      public String getDisplayName()
      The custom display name of the item, if it has been renamed.
      Only present when the item has a custom name component (e.g., renamed in an anvil).
      Contains the plain text string, not JSON text components.
      
      optional string display_name = 4;
      Specified by:
      getDisplayName in interface InventorySlotOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
      The custom display name of the item, if it has been renamed.
      Only present when the item has a custom name component (e.g., renamed in an anvil).
      Contains the plain text string, not JSON text components.
      
      optional string display_name = 4;
      Specified by:
      getDisplayNameBytes in interface InventorySlotOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public InventorySlot.Builder setDisplayName(String value)
      The custom display name of the item, if it has been renamed.
      Only present when the item has a custom name component (e.g., renamed in an anvil).
      Contains the plain text string, not JSON text components.
      
      optional string display_name = 4;
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public InventorySlot.Builder clearDisplayName()
      The custom display name of the item, if it has been renamed.
      Only present when the item has a custom name component (e.g., renamed in an anvil).
      Contains the plain text string, not JSON text components.
      
      optional string display_name = 4;
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public InventorySlot.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
      The custom display name of the item, if it has been renamed.
      Only present when the item has a custom name component (e.g., renamed in an anvil).
      Contains the plain text string, not JSON text components.
      
      optional string display_name = 4;
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.