Interface IPathfindHandler
public interface IPathfindHandler
Implement this and register it via
IDroneRegistry.addPathfindableBlock(Block, IPathfindHandler) to provide
custom pathfinding functionality for a particular block.-
Method Summary
Modifier and TypeMethodDescriptionbooleancanPathfindThrough(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Check if the drone may pathfind through the block at the given world and block position.default voidonPathingThrough(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) CURRENTLY NOT IMPLEMENTED! Will be called every tick as long as the drone is < 1 block away from the given coordinate.
-
Method Details
-
canPathfindThrough
boolean canPathfindThrough(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) Check if the drone may pathfind through the block at the given world and block position.- Parameters:
world- the drone's worldpos- the block position to test- Returns:
- true if the drone may pathfind through this block, false otherwise
-
onPathingThrough
default void onPathingThrough(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos) CURRENTLY NOT IMPLEMENTED! Will be called every tick as long as the drone is < 1 block away from the given coordinate. can be used to open a door for a drone for example.- Parameters:
world- the drone's worldpos- the block position to test
-