Class Memory<T>

java.lang.Object
net.minecraft.entity.ai.brain.Memory<T>

public class Memory<T> extends Object
Mappings:
Namespace Name
named net/minecraft/entity/ai/brain/Memory
intermediary net/minecraft/class_4831
official cfi
  • Field Details

    • value

      private final T value
      Mappings:
      Namespace Name Mixin selector
      named value Lnet/minecraft/entity/ai/brain/Memory;value:Ljava/lang/Object;
      intermediary field_22330 Lnet/minecraft/class_4831;field_22330:Ljava/lang/Object;
      official a Lcfi;a:Ljava/lang/Object;
    • expiry

      private long expiry
      Mappings:
      Namespace Name Mixin selector
      named expiry Lnet/minecraft/entity/ai/brain/Memory;expiry:J
      intermediary field_22331 Lnet/minecraft/class_4831;field_22331:J
      official b Lcfi;b:J
  • Constructor Details

    • Memory

      public Memory(T value, long expiry)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/brain/Memory;<init>(Ljava/lang/Object;J)V
      intermediary <init> Lnet/minecraft/class_4831;<init>(Ljava/lang/Object;J)V
      official <init> Lcfi;<init>(Ljava/lang/Object;J)V
  • Method Details

    • tick

      public void tick()
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/entity/ai/brain/Memory;tick()V
      intermediary method_24913 Lnet/minecraft/class_4831;method_24913()V
      official a Lcfi;a()V
    • permanent

      public static <T> Memory<T> permanent(T value)
      Creates a memory without an expiry time.
      Mappings:
      Namespace Name Mixin selector
      named permanent Lnet/minecraft/entity/ai/brain/Memory;permanent(Ljava/lang/Object;)Lnet/minecraft/entity/ai/brain/Memory;
      intermediary method_28355 Lnet/minecraft/class_4831;method_28355(Ljava/lang/Object;)Lnet/minecraft/class_4831;
      official a Lcfi;a(Ljava/lang/Object;)Lcfi;
    • timed

      public static <T> Memory<T> timed(T value, long expiry)
      Creates a memory that has an expiry time.
      Mappings:
      Namespace Name Mixin selector
      named timed Lnet/minecraft/entity/ai/brain/Memory;timed(Ljava/lang/Object;J)Lnet/minecraft/entity/ai/brain/Memory;
      intermediary method_24636 Lnet/minecraft/class_4831;method_24636(Ljava/lang/Object;J)Lnet/minecraft/class_4831;
      official a Lcfi;a(Ljava/lang/Object;J)Lcfi;
    • getExpiry

      public long getExpiry()
      Mappings:
      Namespace Name Mixin selector
      named getExpiry Lnet/minecraft/entity/ai/brain/Memory;getExpiry()J
      intermediary method_35127 Lnet/minecraft/class_4831;method_35127()J
      official b Lcfi;b()J
    • getValue

      public T getValue()
      Mappings:
      Namespace Name Mixin selector
      named getValue Lnet/minecraft/entity/ai/brain/Memory;getValue()Ljava/lang/Object;
      intermediary method_24637 Lnet/minecraft/class_4831;method_24637()Ljava/lang/Object;
      official c Lcfi;c()Ljava/lang/Object;
    • isExpired

      public boolean isExpired()
      Mappings:
      Namespace Name Mixin selector
      named isExpired Lnet/minecraft/entity/ai/brain/Memory;isExpired()Z
      intermediary method_24634 Lnet/minecraft/class_4831;method_24634()Z
      official d Lcfi;d()Z
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isTimed

      public boolean isTimed()
      Mappings:
      Namespace Name Mixin selector
      named isTimed Lnet/minecraft/entity/ai/brain/Memory;isTimed()Z
      intermediary method_24914 Lnet/minecraft/class_4831;method_24914()Z
      official e Lcfi;e()Z
    • createCodec

      public static <T> com.mojang.serialization.Codec<Memory<T>> createCodec(com.mojang.serialization.Codec<T> codec)
      Mappings:
      Namespace Name Mixin selector
      named createCodec Lnet/minecraft/entity/ai/brain/Memory;createCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      intermediary method_28353 Lnet/minecraft/class_4831;method_28353(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      official a Lcfi;a(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;