Update to Minecraft 1.20

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-06-08 01:30:00 +10:00
parent bac55e67d6
commit 9d740b84b0
269 changed files with 2605 additions and 2568 deletions

View File

@@ -9,7 +9,7 @@
if (worldborder.getDamageSafeZone() == (double) f) {
throw CommandWorldBorder.ERROR_SAME_DAMAGE_BUFFER.create();
@@ -69,7 +69,7 @@
@@ -71,7 +71,7 @@
}
private static int setDamageAmount(CommandListenerWrapper commandlistenerwrapper, float f) throws CommandSyntaxException {
@@ -18,7 +18,7 @@
if (worldborder.getDamagePerBlock() == (double) f) {
throw CommandWorldBorder.ERROR_SAME_DAMAGE_AMOUNT.create();
@@ -81,7 +81,7 @@
@@ -85,7 +85,7 @@
}
private static int setWarningTime(CommandListenerWrapper commandlistenerwrapper, int i) throws CommandSyntaxException {
@@ -27,7 +27,7 @@
if (worldborder.getWarningTime() == i) {
throw CommandWorldBorder.ERROR_SAME_WARNING_TIME.create();
@@ -93,7 +93,7 @@
@@ -99,7 +99,7 @@
}
private static int setWarningDistance(CommandListenerWrapper commandlistenerwrapper, int i) throws CommandSyntaxException {
@@ -36,15 +36,16 @@
if (worldborder.getWarningBlocks() == i) {
throw CommandWorldBorder.ERROR_SAME_WARNING_DISTANCE.create();
@@ -105,14 +105,14 @@
@@ -113,7 +113,7 @@
}
private static int getSize(CommandListenerWrapper commandlistenerwrapper) {
- double d0 = commandlistenerwrapper.getServer().overworld().getWorldBorder().getSize();
+ double d0 = commandlistenerwrapper.getLevel().getWorldBorder().getSize(); // CraftBukkit
commandlistenerwrapper.sendSuccess(IChatBaseComponent.translatable("commands.worldborder.get", String.format(Locale.ROOT, "%.0f", d0)), false);
return MathHelper.floor(d0 + 0.5D);
commandlistenerwrapper.sendSuccess(() -> {
return IChatBaseComponent.translatable("commands.worldborder.get", String.format(Locale.ROOT, "%.0f", d0));
@@ -122,7 +122,7 @@
}
private static int setCenter(CommandListenerWrapper commandlistenerwrapper, Vec2F vec2f) throws CommandSyntaxException {
@@ -53,7 +54,7 @@
if (worldborder.getCenterX() == (double) vec2f.x && worldborder.getCenterZ() == (double) vec2f.y) {
throw CommandWorldBorder.ERROR_SAME_CENTER.create();
@@ -126,7 +126,7 @@
@@ -138,7 +138,7 @@
}
private static int setSize(CommandListenerWrapper commandlistenerwrapper, double d0, long i) throws CommandSyntaxException {