Skip to content

Commit a2dd72e

Browse files
committed
Allow robits to pathfind past rails
1 parent 14c6663 commit a2dd72e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/mekanism/common/entity/EntityRobit.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@
121121
import net.minecraft.world.level.ChunkPos;
122122
import net.minecraft.world.level.Level;
123123
import net.minecraft.world.level.gameevent.GameEvent;
124+
import net.minecraft.world.level.pathfinder.PathType;
124125
import net.minecraft.world.level.portal.PortalInfo;
125126
import net.minecraft.world.phys.HitResult;
126127
import net.minecraft.world.phys.Vec3;
@@ -201,6 +202,7 @@ private static <T> EntityDataAccessor<T> define(EntityDataSerializer<T> dataSeri
201202
public EntityRobit(EntityType<EntityRobit> type, Level world) {
202203
super(type, world);
203204
getNavigation().setCanFloat(false);
205+
setPathfindingMalus(PathType.UNPASSABLE_RAIL, 0.0F);
204206
setCustomNameVisible(true);
205207
recipeCacheLookupMonitor = new RecipeCacheLookupMonitor<>(this);
206208
// Choose a random offset to check for all errors. We do this to ensure that not every tile tries to recheck errors for every

0 commit comments

Comments
 (0)