Record Class BlockStatePredicate.TagMatch
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.block.state.BlockStatePredicate.TagMatch
- All Implemented Interfaces:
BlockStatePredicate,ReplacementMatch,Predicate<net.minecraft.world.level.block.state.BlockState>
- Enclosing interface:
BlockStatePredicate
public static record BlockStatePredicate.TagMatch(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag)
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
ConstructorsConstructorDescriptionTagMatch(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag) Creates an instance of aTagMatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.levelgen.structure.templatesystem.RuleTestfinal booleanIndicates whether some other object is "equal to" this one.Collection<net.minecraft.world.level.block.Block> final inthashCode()Returns a hash code value for this object.net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag()Returns the value of thetagrecord component.booleantest(net.minecraft.world.level.block.state.BlockState state) 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, getBlockIds, getBlockStates
-
Constructor Details
-
TagMatch
public TagMatch(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag) Creates an instance of aTagMatchrecord class.- Parameters:
tag- the value for thetagrecord component
-
-
Method Details
-
test
public boolean test(net.minecraft.world.level.block.state.BlockState state) - 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
-
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). -
tag
public net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block> tag()Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-