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 Details

  • Constructor Details

  • 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

      @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
      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

      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