Package net.minecraft.inventory
Record Class ItemSource.Map
java.lang.Object
java.lang.Record
net.minecraft.inventory.ItemSource.Map
- Record Components:
slots-mapper-
- All Implemented Interfaces:
ItemSource
- Enclosing interface:
ItemSource
public static record ItemSource.Map(ItemSource slots, Function<ItemStack,? extends ItemSource> mapper)
extends Record
implements ItemSource
- Mappings:
Namespace Name named net/minecraft/inventory/ItemSource$Mapintermediary net/minecraft/class_12271$class_12273official dtq$bnamed slotsintermediary comp_5165official bnamed mapperintermediary comp_5166official c
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.inventory.ItemSource
ItemSource.Filter, ItemSource.Limit, ItemSource.Map -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Function<ItemStack, ? extends ItemSource> The field for themapperrecord component.private final ItemSourceThe field for theslotsrecord component.Fields inherited from interface net.minecraft.inventory.ItemSource
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionMap(ItemSource slots, Function<ItemStack, ? extends ItemSource> mapper) Creates an instance of aMaprecord class. -
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.Function<ItemStack, ? extends ItemSource> mapper()Returns the value of themapperrecord component.slots()Returns the value of theslotsrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.inventory.ItemSource
filter, filter, limit
-
Field Details
-
Constructor Details
-
Method Details
-
itemCopies
- Specified by:
itemCopiesin interfaceItemSource
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
slots
Returns the value of theslotsrecord component.- Returns:
- the value of the
slotsrecord component
-
mapper
Returns the value of themapperrecord component.- Returns:
- the value of the
mapperrecord component
-