Record Class VillagerTradesHandler.Insert
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.insert.handler.VillagerTradesHandler.Insert
- All Implemented Interfaces:
InsertHandler.Insert
- Enclosing class:
- VillagerTradesHandler
public static record VillagerTradesHandler.Insert(net.minecraft.world.entity.npc.VillagerProfession profession, it.unimi.dsi.fastutil.ints.Int2ObjectMap<List<net.minecraft.world.entity.npc.VillagerTrades.ItemListing>> trades, boolean experimental)
extends Record
implements InsertHandler.Insert
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of theexperimentalrecord component.final inthashCode()Returns a hash code value for this object.net.minecraft.world.entity.npc.VillagerProfessionReturns the value of theprofessionrecord component.final StringtoString()Returns a string representation of this record class.it.unimi.dsi.fastutil.ints.Int2ObjectMap<List<net.minecraft.world.entity.npc.VillagerTrades.ItemListing>>trades()Returns the value of thetradesrecord component.
-
Constructor Details
-
Insert
public Insert(net.minecraft.world.entity.npc.VillagerProfession profession, it.unimi.dsi.fastutil.ints.Int2ObjectMap<List<net.minecraft.world.entity.npc.VillagerTrades.ItemListing>> trades, boolean experimental) Creates an instance of aInsertrecord class.- Parameters:
profession- the value for theprofessionrecord componenttrades- the value for thetradesrecord componentexperimental- the value for theexperimentalrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
profession
public net.minecraft.world.entity.npc.VillagerProfession profession()Returns the value of theprofessionrecord component.- Returns:
- the value of the
professionrecord component
-
trades
public it.unimi.dsi.fastutil.ints.Int2ObjectMap<List<net.minecraft.world.entity.npc.VillagerTrades.ItemListing>> trades()Returns the value of thetradesrecord component.- Returns:
- the value of the
tradesrecord component
-
experimental
public boolean experimental()Returns the value of theexperimentalrecord component.- Returns:
- the value of the
experimentalrecord component
-