Package net.minecraft.loot.slot
Record Class ItemStream.Map
java.lang.Object
java.lang.Record
net.minecraft.loot.slot.ItemStream.Map
- Record Components:
slots-mapper-
- All Implemented Interfaces:
ItemStream
- Enclosing interface:
ItemStream
public static record ItemStream.Map(ItemStream slots, Function<ItemStack,? extends ItemStream> mapper)
extends Record
implements ItemStream
- Mappings:
Namespace Name named net/minecraft/loot/slot/ItemStream$Mapintermediary net/minecraft/class_12271$class_12273official dtw$bnamed slotsintermediary comp_5165official bnamed mapperintermediary comp_5166official c
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.loot.slot.ItemStream
ItemStream.Filter, ItemStream.Limit, ItemStream.Map -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Function<ItemStack, ? extends ItemStream> The field for themapperrecord component.private final ItemStreamThe field for theslotsrecord component.Fields inherited from interface net.minecraft.loot.slot.ItemStream
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionMap(ItemStream slots, Function<ItemStack, ? extends ItemStream> 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 ItemStream> 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.loot.slot.ItemStream
filter, limit, map
-
Field Details
-
Constructor Details
-
Method Details
-
itemCopies
- Specified by:
itemCopiesin interfaceItemStream
-
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
-