Change EnderEye target without changing other things

This commit is contained in:
Jake Potrebic
2021-08-21 12:13:53 -07:00
parent c754319985
commit a6362921cc
2 changed files with 33 additions and 3 deletions

View File

@@ -32,8 +32,15 @@ public class CraftEnderSignal extends CraftEntity implements EnderSignal {
@Override
public void setTargetLocation(Location location) {
// Paper start - Change EnderEye target without changing other things
this.setTargetLocation(location, true);
}
@Override
public void setTargetLocation(Location location, boolean update) {
// Paper end - Change EnderEye target without changing other things
Preconditions.checkArgument(this.getWorld().equals(location.getWorld()), "Cannot target EnderSignal across worlds");
this.getHandle().signalTo(CraftLocation.toBlockPosition(location));
this.getHandle().signalTo(CraftLocation.toBlockPosition(location), update); // Paper - Change EnderEye target without changing other things
}
@Override