Record Class ItemCookingProperties
java.lang.Object
java.lang.Record
net.raphimc.viabedrock.protocol.model.ItemCookingProperties
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionItemCookingProperties(boolean food, String blockIdentifier, boolean replacementBlockItem) Creates an instance of aItemCookingPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockIdentifierrecord component.category()final booleanIndicates whether some other object is "equal to" this one.booleanfood()Returns the value of thefoodrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thereplacementBlockItemrecord component.final StringtoString()Returns a string representation of this record class.withComponentItemData(com.viaversion.nbt.tag.CompoundTag components, String identifier, Function<String, String> resolveBlock) Apply compiled component data to an existing ComponentItem, retaining omitted components.withLegacyItemData(com.viaversion.nbt.tag.CompoundTag components, Function<String, String> resolveBlock) Base Item uses a direct block name; ComponentItem placement properties do not apply.
-
Field Details
-
NONE
-
-
Constructor Details
-
ItemCookingProperties
Creates an instance of aItemCookingPropertiesrecord class.- Parameters:
food- the value for thefoodrecord componentblockIdentifier- the value for theblockIdentifierrecord componentreplacementBlockItem- the value for thereplacementBlockItemrecord component
-
-
Method Details
-
withComponentItemData
public ItemCookingProperties withComponentItemData(com.viaversion.nbt.tag.CompoundTag components, String identifier, Function<String, String> resolveBlock) Apply compiled component data to an existing ComponentItem, retaining omitted components. -
withLegacyItemData
public ItemCookingProperties withLegacyItemData(com.viaversion.nbt.tag.CompoundTag components, Function<String, String> resolveBlock) Base Item uses a direct block name; ComponentItem placement properties do not apply. -
category
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
food
public boolean food()Returns the value of thefoodrecord component.- Returns:
- the value of the
foodrecord component
-
blockIdentifier
Returns the value of theblockIdentifierrecord component.- Returns:
- the value of the
blockIdentifierrecord component
-
replacementBlockItem
public boolean replacementBlockItem()Returns the value of thereplacementBlockItemrecord component.- Returns:
- the value of the
replacementBlockItemrecord component
-