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 TypeMethodDescriptionbuild()clear()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.intgetCount()The number of items in this stack.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorThe custom display name of the item, if it has been renamed.com.google.protobuf.ByteStringThe custom display name of the item, if it has been renamed.The Minecraft item identifier in namespaced format.com.google.protobuf.ByteStringThe Minecraft item identifier in namespaced format.intgetSlot()The slot index within the container.booleanThe custom display name of the item, if it has been renamed.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(InventorySlot other) setCount(int value) The number of items in this stack.setDisplayName(String value) 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, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods 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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<InventorySlot.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<InventorySlot.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<InventorySlot.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<InventorySlot.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
getSlotin interfaceInventorySlotOrBuilder- Returns:
- The slot.
-
setSlot
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
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
The Minecraft item identifier in namespaced format. Examples: "minecraft:diamond_sword", "minecraft:stone", "minecraft:enchanted_book"
string item_id = 2;- Specified by:
getItemIdin interfaceInventorySlotOrBuilder- 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:
getItemIdBytesin interfaceInventorySlotOrBuilder- Returns:
- The bytes for itemId.
-
setItemId
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
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
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:
getCountin interfaceInventorySlotOrBuilder- Returns:
- The count.
-
setCount
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
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:
hasDisplayNamein interfaceInventorySlotOrBuilder- Returns:
- Whether the displayName field is set.
-
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:
getDisplayNamein interfaceInventorySlotOrBuilder- 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:
getDisplayNameBytesin interfaceInventorySlotOrBuilder- Returns:
- The bytes for displayName.
-
setDisplayName
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
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
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.
-