Package tschipp.carryon.common.scripting
Record Class CarryOnScript.ScriptObject.ScriptObjectEntity
java.lang.Object
java.lang.Record
tschipp.carryon.common.scripting.CarryOnScript.ScriptObject.ScriptObjectEntity
- Enclosing class:
- CarryOnScript.ScriptObject
public static record CarryOnScript.ScriptObject.ScriptObjectEntity(Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> typeNameEntity, Matchables.NumberBoundCondition typeHealth, Matchables.NumberBoundCondition typeHeight, Matchables.NumberBoundCondition typeWidth, Matchables.NBTCondition typeEntityTag)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<CarryOnScript.ScriptObject.ScriptObjectEntity>static final CarryOnScript.ScriptObject.ScriptObjectEntity -
Constructor Summary
ConstructorsConstructorDescriptionScriptObjectEntity(Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> typeNameEntity, Matchables.NumberBoundCondition typeHealth, Matchables.NumberBoundCondition typeHeight, Matchables.NumberBoundCondition typeWidth, Matchables.NBTCondition typeEntityTag) Creates an instance of aScriptObjectEntityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.Returns the value of thetypeEntityTagrecord component.Returns the value of thetypeHealthrecord component.Returns the value of thetypeHeightrecord component.Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>>Returns the value of thetypeNameEntityrecord component.Returns the value of thetypeWidthrecord component.
-
Field Details
-
EMPTY
-
CODEC
public static final com.mojang.serialization.Codec<CarryOnScript.ScriptObject.ScriptObjectEntity> CODEC
-
-
Constructor Details
-
ScriptObjectEntity
public ScriptObjectEntity(Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> typeNameEntity, Matchables.NumberBoundCondition typeHealth, Matchables.NumberBoundCondition typeHeight, Matchables.NumberBoundCondition typeWidth, Matchables.NBTCondition typeEntityTag) Creates an instance of aScriptObjectEntityrecord class.- Parameters:
typeNameEntity- the value for thetypeNameEntityrecord componenttypeHealth- the value for thetypeHealthrecord componenttypeHeight- the value for thetypeHeightrecord componenttypeWidth- the value for thetypeWidthrecord componenttypeEntityTag- the value for thetypeEntityTagrecord component
-
-
Method Details
-
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). -
typeNameEntity
public Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> typeNameEntity()Returns the value of thetypeNameEntityrecord component.- Returns:
- the value of the
typeNameEntityrecord component
-
typeHealth
Returns the value of thetypeHealthrecord component.- Returns:
- the value of the
typeHealthrecord component
-
typeHeight
Returns the value of thetypeHeightrecord component.- Returns:
- the value of the
typeHeightrecord component
-
typeWidth
Returns the value of thetypeWidthrecord component.- Returns:
- the value of the
typeWidthrecord component
-
typeEntityTag
Returns the value of thetypeEntityTagrecord component.- Returns:
- the value of the
typeEntityTagrecord component
-