Package net.minecraft.village
Record Class TradeOffers.TypedWrapperFactory
java.lang.Object
java.lang.Record
net.minecraft.village.TradeOffers.TypedWrapperFactory
- Record Components:
typeToFactory
-
- All Implemented Interfaces:
TradeOffers.Factory
- Enclosing class:
TradeOffers
private static record TradeOffers.TypedWrapperFactory(Map<VillagerType,TradeOffers.Factory> typeToFactory)
extends Record
implements TradeOffers.Factory
- Mappings:
Namespace Name official cez$m
intermediary net/minecraft/class_3853$class_8640
named net/minecraft/village/TradeOffers$TypedWrapperFactory
official a
intermediary comp_1962
named typeToFactory
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Map<VillagerType,
TradeOffers.Factory> The field for thetypeToFactory
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a trade offer.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.of
(TradeOffers.Factory factory, VillagerType[] types) final String
toString()
Returns a string representation of this record class.Returns the value of thetypeToFactory
record component.
-
Field Details
-
typeToFactory
The field for thetypeToFactory
record component.
-
-
Constructor Details
-
TypedWrapperFactory
TypedWrapperFactory(Map<VillagerType, TradeOffers.Factory> map)
-
-
Method Details
-
of
- Mappings:
Namespace Name Mixin selector official a
Lcez$m;a(Lcez$g;[Lcfa;)Lcez$m;
intermediary method_53834
Lnet/minecraft/class_3853$class_8640;method_53834(Lnet/minecraft/class_3853$class_1652;[Lnet/minecraft/class_3854;)Lnet/minecraft/class_3853$class_8640;
named of
Lnet/minecraft/village/TradeOffers$TypedWrapperFactory;of(Lnet/minecraft/village/TradeOffers$Factory;[Lnet/minecraft/village/VillagerType;)Lnet/minecraft/village/TradeOffers$TypedWrapperFactory;
-
create
Creates a trade offer.- Specified by:
create
in interfaceTradeOffers.Factory
- Returns:
- a new trade offer, or
null
if none should be created - Mappings:
Namespace Name Mixin selector official a
Lcez$g;a(Lblv;Lauv;)Lcsn;
intermediary method_7246
Lnet/minecraft/class_3853$class_1652;method_7246(Lnet/minecraft/class_1297;Lnet/minecraft/class_5819;)Lnet/minecraft/class_1914;
named create
Lnet/minecraft/village/TradeOffers$Factory;create(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/random/Random;)Lnet/minecraft/village/TradeOffer;
-
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)
. -
typeToFactory
Returns the value of thetypeToFactory
record component.- Returns:
- the value of the
typeToFactory
record component
-