Record Class CarryOnScript

java.lang.Object
java.lang.Record
tschipp.carryon.common.scripting.CarryOnScript

public record CarryOnScript(long priority, CarryOnScript.ScriptObject scriptObject, CarryOnScript.ScriptConditions scriptConditions, CarryOnScript.ScriptRender scriptRender, CarryOnScript.ScriptEffects scriptEffects, boolean overrideChecks) extends Record
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<CarryOnScript> CODEC
  • Constructor Details

    • CarryOnScript

      public CarryOnScript(long priority, CarryOnScript.ScriptObject scriptObject, CarryOnScript.ScriptConditions scriptConditions, CarryOnScript.ScriptRender scriptRender, CarryOnScript.ScriptEffects scriptEffects, boolean overrideChecks)
      Creates an instance of a CarryOnScript record class.
      Parameters:
      priority - the value for the priority record component
      scriptObject - the value for the scriptObject record component
      scriptConditions - the value for the scriptConditions record component
      scriptRender - the value for the scriptRender record component
      scriptEffects - the value for the scriptEffects record component
      overrideChecks - the value for the overrideChecks record component
  • Method Details

    • isValid

      public boolean isValid()
    • isBlock

      public boolean isBlock()
    • isEntity

      public boolean isEntity()
    • fulfillsConditions

      public boolean fulfillsConditions(net.minecraft.server.level.ServerPlayer player)
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • priority

      public long priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • scriptObject

      public CarryOnScript.ScriptObject scriptObject()
      Returns the value of the scriptObject record component.
      Returns:
      the value of the scriptObject record component
    • scriptConditions

      public CarryOnScript.ScriptConditions scriptConditions()
      Returns the value of the scriptConditions record component.
      Returns:
      the value of the scriptConditions record component
    • scriptRender

      public CarryOnScript.ScriptRender scriptRender()
      Returns the value of the scriptRender record component.
      Returns:
      the value of the scriptRender record component
    • scriptEffects

      public CarryOnScript.ScriptEffects scriptEffects()
      Returns the value of the scriptEffects record component.
      Returns:
      the value of the scriptEffects record component
    • overrideChecks

      public boolean overrideChecks()
      Returns the value of the overrideChecks record component.
      Returns:
      the value of the overrideChecks record component