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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final recordstatic final record -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCarryOnScript(long priority, CarryOnScript.ScriptObject scriptObject, CarryOnScript.ScriptConditions scriptConditions, CarryOnScript.ScriptRender scriptRender, CarryOnScript.ScriptEffects scriptEffects, boolean overrideChecks) Creates an instance of aCarryOnScriptrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanfulfillsConditions(net.minecraft.server.level.ServerPlayer player) final inthashCode()Returns a hash code value for this object.booleanisBlock()booleanisEntity()booleanisValid()booleanReturns the value of theoverrideChecksrecord component.longpriority()Returns the value of thepriorityrecord component.Returns the value of thescriptConditionsrecord component.Returns the value of thescriptEffectsrecord component.Returns the value of thescriptObjectrecord component.Returns the value of thescriptRenderrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
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 aCarryOnScriptrecord class.- Parameters:
priority- the value for thepriorityrecord componentscriptObject- the value for thescriptObjectrecord componentscriptConditions- the value for thescriptConditionsrecord componentscriptRender- the value for thescriptRenderrecord componentscriptEffects- the value for thescriptEffectsrecord componentoverrideChecks- the value for theoverrideChecksrecord 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
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
priority
public long priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
scriptObject
Returns the value of thescriptObjectrecord component.- Returns:
- the value of the
scriptObjectrecord component
-
scriptConditions
Returns the value of thescriptConditionsrecord component.- Returns:
- the value of the
scriptConditionsrecord component
-
scriptRender
Returns the value of thescriptRenderrecord component.- Returns:
- the value of the
scriptRenderrecord component
-
scriptEffects
Returns the value of thescriptEffectsrecord component.- Returns:
- the value of the
scriptEffectsrecord component
-
overrideChecks
public boolean overrideChecks()Returns the value of theoverrideChecksrecord component.- Returns:
- the value of the
overrideChecksrecord component
-