Record Class VariableCreatedTrigger.Instance
java.lang.Object
java.lang.Record
org.cyclops.integrateddynamics.advancement.criterion.VariableCreatedTrigger.Instance
- All Implemented Interfaces:
net.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance,net.minecraft.advancements.CriterionTriggerInstance,org.cyclops.cyclopscore.advancement.criterion.ICriterionInstanceTestable<LogicProgrammerVariableFacadeCreatedEvent>
- Enclosing class:
VariableCreatedTrigger
public static record VariableCreatedTrigger.Instance(Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player, Optional<net.minecraft.world.level.block.Block> block, Optional<VariableFacadePredicate> variableFacadePredicate)
extends Record
implements net.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance, org.cyclops.cyclopscore.advancement.criterion.ICriterionInstanceTestable<LogicProgrammerVariableFacadeCreatedEvent>
-
Constructor Summary
ConstructorsConstructorDescriptionInstance(Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player, Optional<net.minecraft.world.level.block.Block> block, Optional<VariableFacadePredicate> variableFacadePredicate) Creates an instance of aInstancerecord class. -
Method Summary
Modifier and TypeMethodDescriptionOptional<net.minecraft.world.level.block.Block> block()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player()Returns the value of theplayerrecord component.booleantest(net.minecraft.server.level.ServerPlayer player, LogicProgrammerVariableFacadeCreatedEvent event) final StringtoString()Returns a string representation of this record class.Returns the value of thevariableFacadePredicaterecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance
validate
-
Constructor Details
-
Instance
public Instance(Optional<net.minecraft.advancements.critereon.ContextAwarePredicate> player, Optional<net.minecraft.world.level.block.Block> block, Optional<VariableFacadePredicate> variableFacadePredicate) Creates an instance of aInstancerecord class.- Parameters:
player- the value for theplayerrecord componentblock- the value for theblockrecord componentvariableFacadePredicate- the value for thevariableFacadePredicaterecord component
-
-
Method Details
-
test
public boolean test(net.minecraft.server.level.ServerPlayer player, LogicProgrammerVariableFacadeCreatedEvent event) - Specified by:
testin interfaceorg.cyclops.cyclopscore.advancement.criterion.ICriterionInstanceTestable<LogicProgrammerVariableFacadeCreatedEvent>
-
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). -
player
Returns the value of theplayerrecord component.- Specified by:
playerin interfacenet.minecraft.advancements.critereon.SimpleCriterionTrigger.SimpleInstance- Returns:
- the value of the
playerrecord component
-
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
variableFacadePredicate
Returns the value of thevariableFacadePredicaterecord component.- Returns:
- the value of the
variableFacadePredicaterecord component
-