Update to Minecraft 1.15.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-01-22 08:00:00 +11:00
parent 09a2fa4d96
commit 77b64e0c78
50 changed files with 293 additions and 421 deletions

View File

@@ -69,7 +69,7 @@ public class CraftFox extends CraftAnimals implements Fox {
@Override
public AnimalTamer getFirstTrustedPlayer() {
UUID uuid = getHandle().getDataWatcher().get(EntityFox.by).orElse(null);
UUID uuid = getHandle().getDataWatcher().get(EntityFox.FIRST_TRUSTED_PLAYER).orElse(null);
if (uuid == null) {
return null;
}
@@ -84,16 +84,16 @@ public class CraftFox extends CraftAnimals implements Fox {
@Override
public void setFirstTrustedPlayer(AnimalTamer player) {
if (player == null && getHandle().getDataWatcher().get(EntityFox.bz).isPresent()) {
if (player == null && getHandle().getDataWatcher().get(EntityFox.SECOND_TRUSTED_PLAYER).isPresent()) {
throw new IllegalStateException("Must remove second trusted player first");
}
getHandle().getDataWatcher().set(EntityFox.by, player == null ? Optional.empty() : Optional.of(player.getUniqueId()));
getHandle().getDataWatcher().set(EntityFox.FIRST_TRUSTED_PLAYER, player == null ? Optional.empty() : Optional.of(player.getUniqueId()));
}
@Override
public AnimalTamer getSecondTrustedPlayer() {
UUID uuid = getHandle().getDataWatcher().get(EntityFox.bz).orElse(null);
UUID uuid = getHandle().getDataWatcher().get(EntityFox.SECOND_TRUSTED_PLAYER).orElse(null);
if (uuid == null) {
return null;
}
@@ -108,10 +108,10 @@ public class CraftFox extends CraftAnimals implements Fox {
@Override
public void setSecondTrustedPlayer(AnimalTamer player) {
if (player != null && !getHandle().getDataWatcher().get(EntityFox.by).isPresent()) {
if (player != null && !getHandle().getDataWatcher().get(EntityFox.FIRST_TRUSTED_PLAYER).isPresent()) {
throw new IllegalStateException("Must add first trusted player first");
}
getHandle().getDataWatcher().set(EntityFox.bz, player == null ? Optional.empty() : Optional.of(player.getUniqueId()));
getHandle().getDataWatcher().set(EntityFox.SECOND_TRUSTED_PLAYER, player == null ? Optional.empty() : Optional.of(player.getUniqueId()));
}
}

View File

@@ -52,11 +52,11 @@ public abstract class CraftRaider extends CraftMonster implements Raider {
@Override
public boolean isCanJoinRaid() {
return getHandle().eD();
return getHandle().isCanJoinRaid();
}
@Override
public void setCanJoinRaid(boolean join) {
getHandle().u(join);
getHandle().setCanJoinRaid(join);
}
}