Record Class LocationPredicate

java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.LocationPredicate
Record Components:
position -
biome -
structure -
dimension -
smokey -
light -
block -
fluid -

public record LocationPredicate(Optional<LocationPredicate.PositionRange> position, Optional<RegistryKey<Biome>> biome, Optional<RegistryKey<Structure>> structure, Optional<RegistryKey<World>> dimension, Optional<Boolean> smokey, Optional<LightPredicate> light, Optional<BlockPredicate> block, Optional<FluidPredicate> fluid) extends Record
Mappings:
Namespace Name
official cj
intermediary net/minecraft/class_2090
named net/minecraft/predicate/entity/LocationPredicate
official b
intermediary comp_1794
named position
official c
intermediary comp_1795
named biome
official d
intermediary comp_1796
named structure
official e
intermediary comp_1797
named dimension
official f
intermediary comp_1798
named smokey
official g
intermediary comp_1799
named light
official h
intermediary comp_1800
named block
official i
intermediary comp_1801
named fluid
  • Field Details

  • Constructor Details

  • Method Details

    • create

      Mappings:
      Namespace Name Mixin selector
      official a Lcj;a(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;
      intermediary method_53179 Lnet/minecraft/class_2090;method_53179(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;
      named create Lnet/minecraft/predicate/entity/LocationPredicate;create(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)Ljava/util/Optional;
    • test

      public boolean test(ServerWorld world, double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      official a Lcj;a(Lakq;DDD)Z
      intermediary method_9018 Lnet/minecraft/class_2090;method_9018(Lnet/minecraft/class_3218;DDD)Z
      named test Lnet/minecraft/predicate/entity/LocationPredicate;test(Lnet/minecraft/server/world/ServerWorld;DDD)Z
    • toJson

      public com.google.gson.JsonElement toJson()
      Mappings:
      Namespace Name Mixin selector
      official a Lcj;a()Lcom/google/gson/JsonElement;
      intermediary method_9019 Lnet/minecraft/class_2090;method_9019()Lcom/google/gson/JsonElement;
      named toJson Lnet/minecraft/predicate/entity/LocationPredicate;toJson()Lcom/google/gson/JsonElement;
    • fromJson

      public static Optional<LocationPredicate> fromJson(@Nullable @Nullable com.google.gson.JsonElement json)
      Mappings:
      Namespace Name Mixin selector
      official a Lcj;a(Lcom/google/gson/JsonElement;)Ljava/util/Optional;
      intermediary method_9021 Lnet/minecraft/class_2090;method_9021(Lcom/google/gson/JsonElement;)Ljava/util/Optional;
      named fromJson Lnet/minecraft/predicate/entity/LocationPredicate;fromJson(Lcom/google/gson/JsonElement;)Ljava/util/Optional;
    • 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.
    • position

      Returns the value of the position record component.
      Returns:
      the value of the position record component
    • biome

      public Optional<RegistryKey<Biome>> biome()
      Returns the value of the biome record component.
      Returns:
      the value of the biome record component
    • structure

      public Optional<RegistryKey<Structure>> structure()
      Returns the value of the structure record component.
      Returns:
      the value of the structure record component
    • dimension

      public Optional<RegistryKey<World>> dimension()
      Returns the value of the dimension record component.
      Returns:
      the value of the dimension record component
    • smokey

      public Optional<Boolean> smokey()
      Returns the value of the smokey record component.
      Returns:
      the value of the smokey record component
    • light

      public Optional<LightPredicate> light()
      Returns the value of the light record component.
      Returns:
      the value of the light record component
    • block

      public Optional<BlockPredicate> block()
      Returns the value of the block record component.
      Returns:
      the value of the block record component
    • fluid

      public Optional<FluidPredicate> fluid()
      Returns the value of the fluid record component.
      Returns:
      the value of the fluid record component