Class RayTraceCheckSpawns
java.lang.Object
com.pixelmonmod.pixelmon.api.spawning.archetypes.algorithms.checkspawns.RayTraceCheckSpawns
- All Implemented Interfaces:
CheckSpawns
A /checkspawns for a ray-trace-based triggers. It creates a
SpawnLocation
at the location of the block being looked at by the target, sets the location type
and then uses the selected spawner's selection algorithm to create all information.
It will comment on not looking at an acceptable block if the given block state predicate fails.
-
Field Summary
Modifier and TypeFieldDescriptionPredicate<net.minecraft.world.level.block.state.BlockState>
The condition that must be passed by the block being looked at by the target.TheLocationType
to set for the traced block.The permission node required to use this checkspawns. -
Constructor Summary
ConstructorDescriptionRayTraceCheckSpawns
(LocationType locationType, Predicate<net.minecraft.world.level.block.state.BlockState> isValidBlock, String node) -
Method Summary
Modifier and TypeMethodDescriptionvoid
checkSpawns
(AbstractSpawner spawner, net.minecraft.commands.CommandSourceStack sender, List<String> arguments) Executes /checkspawns directly from the command.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.pixelmonmod.pixelmon.api.spawning.calculators.CheckSpawns
generateMessages
-
Field Details
-
node
The permission node required to use this checkspawns. -
locationType
TheLocationType
to set for the traced block. -
isValidBlock
The condition that must be passed by the block being looked at by the target.
-
-
Constructor Details
-
RayTraceCheckSpawns
public RayTraceCheckSpawns(LocationType locationType, Predicate<net.minecraft.world.level.block.state.BlockState> isValidBlock, String node)
-
-
Method Details
-
getPermissionNode
- Specified by:
getPermissionNode
in interfaceCheckSpawns
-
checkSpawns
public void checkSpawns(AbstractSpawner spawner, net.minecraft.commands.CommandSourceStack sender, List<String> arguments) Description copied from interface:CheckSpawns
Executes /checkspawns directly from the command.- Specified by:
checkSpawns
in interfaceCheckSpawns
-