Discomportulated

- Potential fix for spout ponder crash with other mods installed
- Fixed train navigation not behaving correctly near portals
This commit is contained in:
simibubi 2022-08-12 20:50:48 +02:00
parent d27f979867
commit c33fc73f3a
3 changed files with 8 additions and 2 deletions

View file

@ -1022,7 +1022,7 @@ public abstract class Contraption {
.isEmpty()
&& !blockState.getCollisionShape(world, targetPos)
.isEmpty())) {
if (targetPos.getY() == 0)
if (targetPos.getY() == world.getMinBuildHeight())
targetPos = targetPos.above();
world.levelEvent(2001, targetPos, Block.getId(state));
Block.dropResources(state, world, targetPos, null);

View file

@ -76,6 +76,8 @@ public class SpoutTileEntity extends SmartTileEntity implements IHaveGoggleInfor
protected ProcessingResult onItemReceived(TransportedItemStack transported,
TransportedItemStackHandlerBehaviour handler) {
if (handler.tileEntity.isVirtual())
return PASS;
if (!FillingBySpout.canItemBeFilled(level, transported.stack))
return PASS;
if (tank.isEmpty())

View file

@ -644,9 +644,13 @@ public class Navigation {
List<Entry<TrackNode, TrackEdge>> validTargets = new ArrayList<>();
Map<TrackNode, TrackEdge> connectionsFrom = graph.getConnectionsFrom(node2);
for (Entry<TrackNode, TrackEdge> connection : connectionsFrom.entrySet())
for (Entry<TrackNode, TrackEdge> connection : connectionsFrom.entrySet()) {
TrackNode newNode = connection.getKey();
if (newNode == node1)
continue;
if (edge.canTravelTo(connection.getValue()))
validTargets.add(connection);
}
if (validTargets.isEmpty())
continue;