mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-15 03:03:41 +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()
|
.isEmpty()
|
||||||
&& !blockState.getCollisionShape(world, targetPos)
|
&& !blockState.getCollisionShape(world, targetPos)
|
||||||
.isEmpty())) {
|
.isEmpty())) {
|
||||||
if (targetPos.getY() == 0)
|
if (targetPos.getY() == world.getMinBuildHeight())
|
||||||
targetPos = targetPos.above();
|
targetPos = targetPos.above();
|
||||||
world.levelEvent(2001, targetPos, Block.getId(state));
|
world.levelEvent(2001, targetPos, Block.getId(state));
|
||||||
Block.dropResources(state, world, targetPos, null);
|
Block.dropResources(state, world, targetPos, null);
|
||||||
|
|
|
@ -76,6 +76,8 @@ public class SpoutTileEntity extends SmartTileEntity implements IHaveGoggleInfor
|
||||||
|
|
||||||
protected ProcessingResult onItemReceived(TransportedItemStack transported,
|
protected ProcessingResult onItemReceived(TransportedItemStack transported,
|
||||||
TransportedItemStackHandlerBehaviour handler) {
|
TransportedItemStackHandlerBehaviour handler) {
|
||||||
|
if (handler.tileEntity.isVirtual())
|
||||||
|
return PASS;
|
||||||
if (!FillingBySpout.canItemBeFilled(level, transported.stack))
|
if (!FillingBySpout.canItemBeFilled(level, transported.stack))
|
||||||
return PASS;
|
return PASS;
|
||||||
if (tank.isEmpty())
|
if (tank.isEmpty())
|
||||||
|
|
|
@ -644,9 +644,13 @@ public class Navigation {
|
||||||
|
|
||||||
List<Entry<TrackNode, TrackEdge>> validTargets = new ArrayList<>();
|
List<Entry<TrackNode, TrackEdge>> validTargets = new ArrayList<>();
|
||||||
Map<TrackNode, TrackEdge> connectionsFrom = graph.getConnectionsFrom(node2);
|
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()))
|
if (edge.canTravelTo(connection.getValue()))
|
||||||
validTargets.add(connection);
|
validTargets.add(connection);
|
||||||
|
}
|
||||||
|
|
||||||
if (validTargets.isEmpty())
|
if (validTargets.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue