Package net.minecraft.predicate.entity
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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
private static final record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Optional<RegistryKey<Biome>>
The field for thebiome
record component.private final Optional<BlockPredicate>
The field for theblock
record component.static final com.mojang.serialization.Codec<LocationPredicate>
private final Optional<RegistryKey<World>>
The field for thedimension
record component.private final Optional<FluidPredicate>
The field for thefluid
record component.private final Optional<LightPredicate>
The field for thelight
record component.private final Optional<LocationPredicate.PositionRange>
The field for theposition
record component.The field for thesmokey
record component.private final Optional<RegistryKey<Structure>>
The field for thestructure
record component. -
Constructor Summary
ConstructorDescriptionLocationPredicate
(Optional<LocationPredicate.PositionRange> optional, Optional<RegistryKey<Biome>> optional2, Optional<RegistryKey<Structure>> optional3, Optional<RegistryKey<World>> optional4, Optional<Boolean> optional5, Optional<LightPredicate> optional6, Optional<BlockPredicate> optional7, Optional<FluidPredicate> optional8) -
Method Summary
Modifier and TypeMethodDescriptionbiome()
Returns the value of thebiome
record component.block()
Returns the value of theblock
record component.private static Optional<LocationPredicate>
create
(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) Returns the value of thedimension
record component.final boolean
Indicates whether some other object is "equal to" this one.fluid()
Returns the value of thefluid
record component.static Optional<LocationPredicate>
fromJson
(@Nullable com.google.gson.JsonElement json) final int
hashCode()
Returns a hash code value for this object.light()
Returns the value of thelight
record component.position()
Returns the value of theposition
record component.smokey()
Returns the value of thesmokey
record component.Returns the value of thestructure
record component.boolean
test
(ServerWorld world, double x, double y, double z) com.google.gson.JsonElement
toJson()
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
position
The field for theposition
record component. -
biome
The field for thebiome
record component. -
structure
The field for thestructure
record component. -
dimension
The field for thedimension
record component. -
smokey
The field for thesmokey
record component. -
light
The field for thelight
record component. -
block
The field for theblock
record component. -
fluid
The field for thefluid
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector official a
Lcj;a:Lcom/mojang/serialization/Codec;
intermediary field_45760
Lnet/minecraft/class_2090;field_45760:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/predicate/entity/LocationPredicate;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
LocationPredicate
public LocationPredicate(Optional<LocationPredicate.PositionRange> optional, Optional<RegistryKey<Biome>> optional2, Optional<RegistryKey<Structure>> optional3, Optional<RegistryKey<World>> optional4, Optional<Boolean> optional5, Optional<LightPredicate> optional6, Optional<BlockPredicate> optional7, Optional<FluidPredicate> optional8)
-
-
Method Details
-
create
private static Optional<LocationPredicate> create(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) - 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
- 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
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
position
Returns the value of theposition
record component.- Returns:
- the value of the
position
record component
-
biome
Returns the value of thebiome
record component.- Returns:
- the value of the
biome
record component
-
structure
Returns the value of thestructure
record component.- Returns:
- the value of the
structure
record component
-
dimension
Returns the value of thedimension
record component.- Returns:
- the value of the
dimension
record component
-
smokey
Returns the value of thesmokey
record component.- Returns:
- the value of the
smokey
record component
-
light
Returns the value of thelight
record component.- Returns:
- the value of the
light
record component
-
block
Returns the value of theblock
record component.- Returns:
- the value of the
block
record component
-
fluid
Returns the value of thefluid
record component.- Returns:
- the value of the
fluid
record component
-