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 Details

  • 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 a ScriptObjectEntity record class.
      Parameters:
      typeNameEntity - the value for the typeNameEntity record component
      typeHealth - the value for the typeHealth record component
      typeHeight - the value for the typeHeight record component
      typeWidth - the value for the typeWidth record component
      typeEntityTag - the value for the typeEntityTag record component
  • Method Details

    • 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 o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • typeNameEntity

      public Optional<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.EntityType<?>>> typeNameEntity()
      Returns the value of the typeNameEntity record component.
      Returns:
      the value of the typeNameEntity record component
    • typeHealth

      public Matchables.NumberBoundCondition typeHealth()
      Returns the value of the typeHealth record component.
      Returns:
      the value of the typeHealth record component
    • typeHeight

      public Matchables.NumberBoundCondition typeHeight()
      Returns the value of the typeHeight record component.
      Returns:
      the value of the typeHeight record component
    • typeWidth

      public Matchables.NumberBoundCondition typeWidth()
      Returns the value of the typeWidth record component.
      Returns:
      the value of the typeWidth record component
    • typeEntityTag

      public Matchables.NBTCondition typeEntityTag()
      Returns the value of the typeEntityTag record component.
      Returns:
      the value of the typeEntityTag record component