Class Memory<T>

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

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

    • value

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

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

    • Memory

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

    • tick

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

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

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

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

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

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

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

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

      public static <T> com.mojang.serialization.Codec<Memory<T>> createCodec(com.mojang.serialization.Codec<T> codec)
      Mappings:
      Namespace Name Mixin selector
      official a Lbjw;a(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;
      named createCodec Lnet/minecraft/entity/ai/brain/Memory;createCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;