User Tools

Site Tools


tutorial:directionalblock

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tutorial:directionalblock [2024/12/08 14:03] solidblocktutorial:directionalblock [2024/12/08 14:04] (current) – [Influence path finding] typo solidblock
Line 107: Line 107:
  
 ===== Influence path finding ===== ===== Influence path finding =====
-If you place these blocks in game, you may find the issue that, the mobs when trying to find paths, will try to cross the blocks, as if the blocks did not exist, ending up being blocked by the blocks. That's because mobs treat such non-full-cube blocks as those not blocking their path. To modify this path-finding behavior, you need to override ''canPathFindThrough'' method:+If you place these blocks in game, you may find the issue that, the mobs when trying to find paths, will try to cross the blocks, as if the blocks did not exist, ending up being blocked by the blocks. That's because mobs treat such non-full-cube blocks as those not blocking their path. To modify this path-finding behavior, you need to override ''canPathfindThrough'' method:
 <code java> <code java>
   @Override   @Override
tutorial/directionalblock.1733666588.txt.gz · Last modified: 2024/12/08 14:03 by solidblock