Record Class BlockStatePredicate.StateMatch
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.block.state.BlockStatePredicate.StateMatch
- All Implemented Interfaces:
BlockStatePredicate,ReplacementMatch,Predicate<net.minecraft.world.level.block.state.BlockState>
- Enclosing interface:
BlockStatePredicate
public static record BlockStatePredicate.StateMatch(net.minecraft.world.level.block.state.BlockState state)
extends Record
implements BlockStatePredicate
-
Nested Class Summary
Nested classes/interfaces inherited from interface dev.latvian.mods.kubejs.block.state.BlockStatePredicate
BlockStatePredicate.AndMatch, BlockStatePredicate.BlockMatch, BlockStatePredicate.NotMatch, BlockStatePredicate.OrMatch, BlockStatePredicate.RegexMatch, BlockStatePredicate.Simple, BlockStatePredicate.StateMatch, BlockStatePredicate.TagMatch -
Field Summary
Fields inherited from interface dev.latvian.mods.kubejs.recipe.match.ReplacementMatch
NONE -
Constructor Summary
ConstructorsConstructorDescriptionStateMatch(net.minecraft.world.level.block.state.BlockState state) Creates an instance of aStateMatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.levelgen.structure.templatesystem.RuleTestfinal booleanIndicates whether some other object is "equal to" this one.Set<net.minecraft.resources.ResourceLocation> Collection<net.minecraft.world.level.block.Block> Collection<net.minecraft.world.level.block.state.BlockState> final inthashCode()Returns a hash code value for this object.net.minecraft.world.level.block.state.BlockStatestate()Returns the value of thestaterecord component.booleantest(net.minecraft.world.level.block.state.BlockState s) booleantestBlock(net.minecraft.world.level.block.Block block) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.latvian.mods.kubejs.block.state.BlockStatePredicate
check
-
Constructor Details
-
StateMatch
public StateMatch(net.minecraft.world.level.block.state.BlockState state) Creates an instance of aStateMatchrecord class.- Parameters:
state- the value for thestaterecord component
-
-
Method Details
-
test
public boolean test(net.minecraft.world.level.block.state.BlockState s) - Specified by:
testin interfaceBlockStatePredicate- Specified by:
testin interfacePredicate<net.minecraft.world.level.block.state.BlockState>
-
testBlock
public boolean testBlock(net.minecraft.world.level.block.Block block) - Specified by:
testBlockin interfaceBlockStatePredicate
-
getBlocks
- Specified by:
getBlocksin interfaceBlockStatePredicate
-
getBlockStates
- Specified by:
getBlockStatesin interfaceBlockStatePredicate
-
getBlockIds
- Specified by:
getBlockIdsin interfaceBlockStatePredicate
-
asRuleTest
public net.minecraft.world.level.levelgen.structure.templatesystem.RuleTest asRuleTest()- Specified by:
asRuleTestin interfaceBlockStatePredicate
-
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). -
state
public net.minecraft.world.level.block.state.BlockState state()Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-