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
public RGBA getColor() {
if (wrappedDestination != null) {
wrappedDestination.location = location;
return wrappedDestination.getColor();
} else {
return getUnlinkedColor(location);

View file

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