Record Class BlockStatePredicate.BlockMatch
java.lang.Object
java.lang.Record
dev.latvian.mods.kubejs.block.state.BlockStatePredicate.BlockMatch
- All Implemented Interfaces:
BlockStatePredicate,ReplacementMatch,Predicate<net.minecraft.world.level.block.state.BlockState>
- Enclosing interface:
BlockStatePredicate
public static record BlockStatePredicate.BlockMatch(net.minecraft.world.level.block.Block block)
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
ConstructorsConstructorDescriptionBlockMatch(net.minecraft.world.level.block.Block block) Creates an instance of aBlockMatchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.level.levelgen.structure.templatesystem.RuleTestnet.minecraft.world.level.block.Blockblock()Returns the value of theblockrecord component.final 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.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
-
Constructor Details
-
BlockMatch
public BlockMatch(net.minecraft.world.level.block.Block block) Creates an instance of aBlockMatchrecord class.- Parameters:
block- the value for theblockrecord 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
-
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). -
block
public net.minecraft.world.level.block.Block block()Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-