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
named net/minecraft/village/TradeOffers$TypedWrapperFactory
intermediary net/minecraft/class_3853$class_8640
official cmq$m
named typeToFactory
intermediary comp_1962
official a
  • Field Details

  • Constructor Details

  • Method Details

    • of

      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/village/TradeOffers$TypedWrapperFactory;of(Lnet/minecraft/village/TradeOffers$Factory;[Lnet/minecraft/village/VillagerType;)Lnet/minecraft/village/TradeOffers$TypedWrapperFactory;
      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;
      official a Lcmq$m;a(Lcmq$g;[Lcmr;)Lcmq$m;
    • create

      @Nullable public @Nullable TradeOffer create(Entity entity, Random random)
      Creates a trade offer.
      Specified by:
      create in interface TradeOffers.Factory
      Returns:
      a new trade offer, or null if none should be created
      Mappings:
      Namespace Name Mixin selector
      named create Lnet/minecraft/village/TradeOffers$Factory;create(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/random/Random;)Lnet/minecraft/village/TradeOffer;
      intermediary method_7246 Lnet/minecraft/class_3853$class_1652;method_7246(Lnet/minecraft/class_1297;Lnet/minecraft/class_5819;)Lnet/minecraft/class_1914;
      official a Lcmq$g;a(Lbsw;Lazh;)Lday;
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • typeToFactory

      public Map<VillagerType,TradeOffers.Factory> typeToFactory()
      Returns the value of the typeToFactory record component.
      Returns:
      the value of the typeToFactory record component