Skip to content

Commit

Permalink
Merge pull request #46 from maximumpower55/fix-pathfinding
Browse files Browse the repository at this point in the history
Fix pathfinding
  • Loading branch information
maximumpower55 authored Aug 7, 2023
2 parents 0967247 + 410b6ec commit 4f5035b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
import io.github.debuggyteam.architecture_extensions.blocks.ArchExRodBlock;
import io.github.debuggyteam.architecture_extensions.blocks.RoofBlock;
import io.github.debuggyteam.architecture_extensions.blocks.WallPostBlock;
import net.fabricmc.fabric.api.registry.LandPathNodeTypesRegistry;
import net.minecraft.block.Block;
import net.minecraft.entity.ai.pathing.PathNodeType;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
Expand Down Expand Up @@ -102,6 +104,9 @@ public TypedGroupedBlock register(BlockGroup group, BlockGroup.GroupedBlock grou

Registry.register(Registries.ITEM, id, new TypedGroupedBlockItem(block, typedGroupedBlock, new QuiltItemSettings()));

// So mobs don't get stuck on arch-ex blocks, and lag the server trying to path-find through them
// Required since that is the default for non full blocks
LandPathNodeTypesRegistry.register(block, PathNodeType.BLOCKED, PathNodeType.BLOCKED);
if (callback != null) callback.onBlockCreated(group, this, baseBlock, block);

return typedGroupedBlock;
Expand Down

0 comments on commit 4f5035b

Please sign in to comment.