Record Class BlockItemId
java.lang.Object
java.lang.Record
net.minecraft.references.BlockItemId
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ResourceKey<Block> The field for theblockrecord component.private final ResourceKey<Item> The field for theitemrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionBlockItemId(ResourceKey<Block> block, ResourceKey<Item> item) Creates an instance of aBlockItemIdrecord class. -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord component.static BlockItemIdstatic BlockItemIdstatic BlockItemIdcreate(Identifier blockId, Identifier itemId) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.item()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
block
The field for theblockrecord component. -
item
The field for theitemrecord component.
-
-
Constructor Details
-
BlockItemId
Creates an instance of aBlockItemIdrecord class.- Parameters:
block- the value for theblockrecord componentitem- the value for theitemrecord component
-
-
Method Details
-
create
-
create
-
create
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
item
Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-