mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-14 10:03:48 +01:00
Discomportulated
- Potential fix for spout ponder crash with other mods installed - Fixed train navigation not behaving correctly near portals
This commit is contained in:
parent
d27f979867
commit
c33fc73f3a
3 changed files with 8 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue