mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-29 14:25:03 +01:00
cleanup
This commit is contained in:
parent
2565fa7605
commit
aff05bf84a
4 changed files with 12 additions and 13 deletions
|
@ -1,7 +1,6 @@
|
|||
package com.simibubi.create.content.trains.entity;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
@ -55,8 +54,6 @@ import net.minecraftforge.api.distmarker.Dist;
|
|||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.network.PacketDistributor;
|
||||
|
||||
import org.openjdk.nashorn.internal.objects.Global;
|
||||
|
||||
public class CarriageContraptionEntity extends OrientedContraptionEntity {
|
||||
|
||||
private static final EntityDataAccessor<CarriageSyncData> CARRIAGE_DATA =
|
||||
|
|
|
@ -611,6 +611,7 @@ public class Navigation {
|
|||
|
||||
int signalWeight = Mth.clamp(ticksWaitingForSignal * 2, Train.Penalties.RED_SIGNAL, 200);
|
||||
|
||||
// Apply penalties to initial edge
|
||||
int initialPenalty = 0;
|
||||
if (costRelevant)
|
||||
initialPenalty += penalties.getOrDefault(initialEdge, 0);
|
||||
|
@ -712,6 +713,7 @@ public class Navigation {
|
|||
if (costRelevant)
|
||||
newPenalty += penalties.getOrDefault(newEdge, 0);
|
||||
|
||||
// Apply penalty to next connected edge
|
||||
boolean hasDestination = false;
|
||||
EdgeData signalData = newEdge.getEdgeData();
|
||||
if (signalData.hasPoints()) {
|
||||
|
@ -758,7 +760,7 @@ public class Navigation {
|
|||
continue;
|
||||
|
||||
double remainingDist = 0;
|
||||
|
||||
// Calculate remaining distance estimator for next connected edge
|
||||
if (destinations != null && !destinations.isEmpty()) {
|
||||
remainingDist = Double.MAX_VALUE;
|
||||
Vec3 newNodePosition = newNode.getLocation().getLocation();
|
||||
|
|
Loading…
Reference in a new issue