Fix teleport sometimes breaking

This commit is contained in:
Runemoro 2018-04-25 16:11:51 -04:00
parent 32bac210ff
commit 662e11ff4c
2 changed files with 2 additions and 0 deletions

View file

@ -62,6 +62,7 @@ public abstract class RestoringTarget extends VirtualTarget {
@Override @Override
public RGBA getColor() { public RGBA getColor() {
if (wrappedDestination != null) { if (wrappedDestination != null) {
wrappedDestination.location = location;
return wrappedDestination.getColor(); return wrappedDestination.getColor();
} else { } else {
return getUnlinkedColor(location); return getUnlinkedColor(location);

View file

@ -207,6 +207,7 @@ import javax.annotation.Nonnull;
} else if (destination == null) { } else if (destination == null) {
color = new RGBA(0.7f, 0.7f, 0.7f, 1); color = new RGBA(0.7f, 0.7f, 0.7f, 1);
} else { } else {
destination.setLocation(new Location(world, pos));
RGBA newColor = destination.getColor(); RGBA newColor = destination.getColor();
if (color == null && newColor != null || !color.equals(newColor)) { if (color == null && newColor != null || !color.equals(newColor)) {
color = newColor; color = newColor;