Record Class ItemMatch
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.quest.ItemMatch
public record ItemMatch(Set<net.minecraft.world.item.Item> items, List<net.minecraft.tags.TagKey<net.minecraft.world.item.Item>> tags)
extends Record
Items an objective asks for, as the server matches them: written as a book writes them (
"minecraft:diamond",
"#minecraft:logs", a stack object, or a list of these), matched by item alone.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Set<net.minecraft.world.item.Item> items()Returns the value of theitemsrecord component.booleanmatches(net.minecraft.world.item.ItemStack stack) static ItemMatchread(com.google.gson.JsonElement json) List<net.minecraft.tags.TagKey<net.minecraft.world.item.Item>> tags()Returns the value of thetagsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ItemMatch
-
-
Method Details
-
read
-
matches
public boolean matches(net.minecraft.world.item.ItemStack stack) -
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). -
items
Returns the value of theitemsrecord component.- Returns:
- the value of the
itemsrecord component
-
tags
Returns the value of thetagsrecord component.- Returns:
- the value of the
tagsrecord component
-