More more more more more more more more more more more more work

This commit is contained in:
Nassim Jahnke 2021-11-24 13:30:55 +01:00 committed by MiniDigger | Martin
parent 8f67d293a2
commit 4e81c1fe78
22 changed files with 46 additions and 45 deletions

View File

@ -25,7 +25,7 @@ The patch in general terms just loads the class in the plugin's jar
before it starts looking elsewhere for it. before it starts looking elsewhere for it.
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index dfa44d9a0f0e270fddc4f30b845c2b0e23008033..80236a0934861902db7f15571d0d9b4902e70045 100644 index 4397fed2b41e5ab444aa7e3c9b5d7dccc50f4e04..d2712f45dbcf26fabe8463d99f378bf422c66970 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -51,6 +51,7 @@ import org.yaml.snakeyaml.error.YAMLException; @@ -51,6 +51,7 @@ import org.yaml.snakeyaml.error.YAMLException;

View File

@ -13,10 +13,10 @@ The fix for the issue is quite simple, casting chunk coordinates to longs
allows the distance calculation to avoid overflow and work as intended. allows the distance calculation to avoid overflow and work as intended.
diff --git a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java b/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java diff --git a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java b/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java
index 7f7b0c961a76119b6004da03fe01ff4e2ae41628..9a64ab092ac8616ed8b9ea5c1e8677dda5c4333c 100644 index 9a704c45f1afa82ff8d9ee3fa1e2437c1d4ec875..d090bdc063480ee6e28b0d60447ebe4063e6d688 100644
--- a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java --- a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java
+++ b/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java +++ b/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java
@@ -84,7 +84,7 @@ public class TheEndBiomeSource extends BiomeSource { @@ -85,7 +85,7 @@ public class TheEndBiomeSource extends BiomeSource {
int l = j / 2; int l = j / 2;
int m = i % 2; int m = i % 2;
int n = j % 2; int n = j % 2;

View File

@ -32,10 +32,10 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840
This patch also fixes rail duping and carpet duping. This patch also fixes rail duping and carpet duping.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 31e127151d2a046bf1652a909bc3ea64f95f2d1f..db2aa6998ab7d2786bb455401f653eec724d53ba 100644 index 374cb5a2fb8c44b7d914beff5688cf36fc08640c..ebbbffd209c6796bc608992e293035141a122d1f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -457,4 +457,12 @@ public class PaperConfig { @@ -450,4 +450,12 @@ public class PaperConfig {
private static void consoleHasAllPermissions() { private static void consoleHasAllPermissions() {
consoleHasAllPermissions = getBoolean("settings.console-has-all-permissions", consoleHasAllPermissions); consoleHasAllPermissions = getBoolean("settings.console-has-all-permissions", consoleHasAllPermissions);
} }
@ -49,10 +49,10 @@ index 31e127151d2a046bf1652a909bc3ea64f95f2d1f..db2aa6998ab7d2786bb455401f653eec
+ +
} }
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
index 4eac07022a7d896ee8921afa6d35cba7f0c89941..dd50a29d47a62df8cdfd69358218d1559b6794ef 100644 index e9b315fb5a7b466e2ac65ae4ae69e893dd992739..da9ae487799e58b196ebf219a62020d0c28adc70 100644
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java --- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
@@ -411,14 +411,26 @@ public class PistonBaseBlock extends DirectionalBlock { @@ -410,14 +410,26 @@ public class PistonBaseBlock extends DirectionalBlock {
} }
for (k = list.size() - 1; k >= 0; --k) { for (k = list.size() - 1; k >= 0; --k) {
@ -83,7 +83,7 @@ index 4eac07022a7d896ee8921afa6d35cba7f0c89941..dd50a29d47a62df8cdfd69358218d155
} }
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
index 54020a3f2b18c4f42008f5d5f4541ef1a1efbcd7..be4360cc580e3b92b76cdcf54265d5ac25d3d59b 100644 index e2ea913f9e5ae2351f10e0ebedba89d2a6e62d96..15b709c73e1685cc903c121949a18b8aa7978a35 100644
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/piston/PistonMovingBlockEntity.java
@@ -285,7 +285,7 @@ public class PistonMovingBlockEntity extends BlockEntity { @@ -285,7 +285,7 @@ public class PistonMovingBlockEntity extends BlockEntity {

View File

@ -7,10 +7,10 @@ If the falling block dies during teleportation (entity#move), then we need
to detect that by placing a check after the move. to detect that by placing a check after the move.
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index 69f385c57f3716a489781debb32b4adf1cb9383d..15ec064cb9336924e16a7c9b3f76a9b6ef18d947 100644 index a8a9cbcece45c3480120cb2fa0fa03523a87d317..e74a87336b47611fa29df4cd3d272fb08b91630b 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -106,6 +106,11 @@ public class FallingBlockEntity extends Entity { @@ -110,6 +110,11 @@ public class FallingBlockEntity extends Entity {
@Override @Override
public void tick() { public void tick() {
@ -21,8 +21,8 @@ index 69f385c57f3716a489781debb32b4adf1cb9383d..15ec064cb9336924e16a7c9b3f76a9b6
+ // Paper end - fix sand duping + // Paper end - fix sand duping
if (this.blockState.isAir()) { if (this.blockState.isAir()) {
this.discard(); this.discard();
} else { } else if (this.level.isClientSide && this.removeAtMillis > 0L) {
@@ -128,6 +133,12 @@ public class FallingBlockEntity extends Entity { @@ -137,6 +142,12 @@ public class FallingBlockEntity extends Entity {
this.move(MoverType.SELF, this.getDeltaMovement()); this.move(MoverType.SELF, this.getDeltaMovement());

View File

@ -14,10 +14,10 @@ behaviour, we need to move all of this dangerous logic outside
of the move call and into an appropriate place in the tick method. of the move call and into an appropriate place in the tick method.
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index fa291673ab392af499c38d0a3b31bbdb664a3a68..6ed7a2cd6a18ffb925e511045d5e0a6c5b45d2de 100644 index bb1244d895c6e5fd668b5a01f507624fdac847f0..fec9551ef74c17be417a326847cc20b0ad54076b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1325,6 +1325,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1324,6 +1324,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9)); this.player.move(MoverType.PLAYER, new Vec3(d7, d8, d9));
this.player.setOnGround(packet.isOnGround()); // CraftBukkit - SPIGOT-5810, SPIGOT-5835: reset by this.player.move this.player.setOnGround(packet.isOnGround()); // CraftBukkit - SPIGOT-5810, SPIGOT-5835: reset by this.player.move

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add and implement PlayerRecipeBookClickEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 6ed7a2cd6a18ffb925e511045d5e0a6c5b45d2de..bdc3402648d85b435ae4feb3c7aaf1af5ef476fa 100644 index fec9551ef74c17be417a326847cc20b0ad54076b..31d99592c06da5c7eb0738210128509870d44d75 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2763,9 +2763,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -2773,9 +2773,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
this.player.resetLastActionTime(); this.player.resetLastActionTime();
if (!this.player.isSpectator() && this.player.containerMenu.containerId == packet.getContainerId() && this.player.containerMenu instanceof RecipeBookMenu) { if (!this.player.isSpectator() && this.player.containerMenu.containerId == packet.getContainerId() && this.player.containerMenu instanceof RecipeBookMenu) {

View File

@ -9,15 +9,15 @@ on harddrives.
-DPaper.enable-sync-chunk-writes=true to enable -DPaper.enable-sync-chunk-writes=true to enable
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
index 12e55aabf0daf341ec74688e79c43451e820e6dc..0544ac93513d3a274bfb53bb6120bd598f4d603b 100644 index 07fd3da4de300f80516961ae22700dbc741e81dc..f944e6beafc7876ed9c6923a22f58d82967b77cb 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
@@ -108,7 +108,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie @@ -107,7 +107,7 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
this.maxWorldSize = this.get("max-world-size", (integer) -> { this.maxWorldSize = this.get("max-world-size", (integer) -> {
return Mth.clamp(integer, 1, 29999984); return Mth.clamp(integer, (int) 1, 29999984);
}, 29999984); }, 29999984);
- this.syncChunkWrites = this.get("sync-chunk-writes", true); - this.syncChunkWrites = this.get("sync-chunk-writes", true);
+ this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - hide behind flag + this.syncChunkWrites = this.get("sync-chunk-writes", true) && Boolean.getBoolean("Paper.enable-sync-chunk-writes"); // Paper - hide behind flag
this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false); this.enableJmxMonitoring = this.get("enable-jmx-monitoring", false);
this.enableStatus = this.get("enable-status", true); this.enableStatus = this.get("enable-status", true);
this.entityBroadcastRangePercentage = this.get("entity-broadcast-range-percentage", (integer) -> { this.hideOnlinePlayers = this.get("hide-online-players", false);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add permission for command blocks
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 31e3534d6e15f91d781fabb0670e53ef66cb8977..784e6c2db5bb346408948cff8ac3cc9b964dd6d8 100644 index 44e5ab0b545de41b937c7ce304ce643f78a43734..f087f48ad9e0b28d9874f3a9c1e3988ce6b60d87 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -392,7 +392,7 @@ public class ServerPlayerGameMode { @@ -389,7 +389,7 @@ public class ServerPlayerGameMode {
BlockEntity tileentity = this.level.getBlockEntity(pos); BlockEntity tileentity = this.level.getBlockEntity(pos);
Block block = iblockdata.getBlock(); Block block = iblockdata.getBlock();
@ -16,12 +16,12 @@ index 31e3534d6e15f91d781fabb0670e53ef66cb8977..784e6c2db5bb346408948cff8ac3cc9b
+ if (block instanceof GameMasterBlock && !this.player.canUseGameMasterBlocks() && !(block instanceof net.minecraft.world.level.block.CommandBlock && (this.player.isCreative() && this.player.getBukkitEntity().hasPermission("minecraft.commandblock")))) { // Paper - command block permission + if (block instanceof GameMasterBlock && !this.player.canUseGameMasterBlocks() && !(block instanceof net.minecraft.world.level.block.CommandBlock && (this.player.isCreative() && this.player.getBukkitEntity().hasPermission("minecraft.commandblock")))) { // Paper - command block permission
this.level.sendBlockUpdated(pos, iblockdata, iblockdata, 3); this.level.sendBlockUpdated(pos, iblockdata, iblockdata, 3);
return false; return false;
} else if (this.player.blockActionRestricted((Level) this.level, pos, this.gameModeForPlayer)) { } else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index bdc3402648d85b435ae4feb3c7aaf1af5ef476fa..7bd2a88de8eaf9d72d9424a39d5df2600bed7e58 100644 index 31d99592c06da5c7eb0738210128509870d44d75..dd29bad410ff74ce3f1f94bc60560cf10b12375f 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -787,7 +787,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -786,7 +786,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (!this.server.isCommandBlockEnabled()) { if (!this.server.isCommandBlockEnabled()) {
this.player.sendMessage(new TranslatableComponent("advMode.notEnabled"), Util.NIL_UUID); this.player.sendMessage(new TranslatableComponent("advMode.notEnabled"), Util.NIL_UUID);
@ -30,7 +30,7 @@ index bdc3402648d85b435ae4feb3c7aaf1af5ef476fa..7bd2a88de8eaf9d72d9424a39d5df260
this.player.sendMessage(new TranslatableComponent("advMode.notAllowed"), Util.NIL_UUID); this.player.sendMessage(new TranslatableComponent("advMode.notAllowed"), Util.NIL_UUID);
} else { } else {
BaseCommandBlock commandblocklistenerabstract = null; BaseCommandBlock commandblocklistenerabstract = null;
@@ -854,7 +854,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -853,7 +853,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (!this.server.isCommandBlockEnabled()) { if (!this.server.isCommandBlockEnabled()) {
this.player.sendMessage(new TranslatableComponent("advMode.notEnabled"), Util.NIL_UUID); this.player.sendMessage(new TranslatableComponent("advMode.notEnabled"), Util.NIL_UUID);
@ -53,10 +53,10 @@ index 2e6172930526efc536a214e420e690a5ea42ac3e..a71cd95291e593a54c66f5672554f91b
} else { } else {
if (player.getCommandSenderWorld().isClientSide) { if (player.getCommandSenderWorld().isClientSide) {
diff --git a/src/main/java/net/minecraft/world/level/block/CommandBlock.java b/src/main/java/net/minecraft/world/level/block/CommandBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/CommandBlock.java b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
index 363ad038e6c2edc675ded828c7800852d1b0668a..fd73e9100feac8c7bf9a5fee21a0ab2d502dc3e0 100644 index 324d544355215804ed0b06bf931883d81e550ed8..135f37f79d1463896e47679e1d13e123b78f97c9 100644
--- a/src/main/java/net/minecraft/world/level/block/CommandBlock.java --- a/src/main/java/net/minecraft/world/level/block/CommandBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/CommandBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CommandBlock.java
@@ -129,7 +129,7 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock { @@ -130,7 +130,7 @@ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock {
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
BlockEntity tileentity = world.getBlockEntity(pos); BlockEntity tileentity = world.getBlockEntity(pos);

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Ensure Entity AABB's are never invalid
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index ee461f8da2663acc45896a9ae418c2f2129e3319..890502222191ce1ab5a598bf040fc462fc915e31 100644 index 640ea4522419fe90a0a390c2cf0379aab8d060b2..4c506e2bf241ba9d6dd53b54def09be09303664b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -584,8 +584,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -555,8 +555,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
} }
public void setPos(double x, double y, double z) { public void setPos(double x, double y, double z) {
@ -19,7 +19,7 @@ index ee461f8da2663acc45896a9ae418c2f2129e3319..890502222191ce1ab5a598bf040fc462
} }
protected AABB makeBoundingBox() { protected AABB makeBoundingBox() {
@@ -3766,6 +3766,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -3770,6 +3770,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
} }
public final void setPosRaw(double x, double y, double z) { public final void setPosRaw(double x, double y, double z) {
@ -31,7 +31,7 @@ index ee461f8da2663acc45896a9ae418c2f2129e3319..890502222191ce1ab5a598bf040fc462
if (this.position.x != x || this.position.y != y || this.position.z != z) { if (this.position.x != x || this.position.y != y || this.position.z != z) {
this.position = new Vec3(x, y, z); this.position = new Vec3(x, y, z);
int i = Mth.floor(x); int i = Mth.floor(x);
@@ -3784,6 +3789,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -3792,6 +3797,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
} }
} }

View File

@ -8,19 +8,19 @@ makes it so that the server keeps the last difficulty used instead
of restoring the server.properties every single load. of restoring the server.properties every single load.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index f07dd72d2ba1b3e1d30dab5973ca3785ea517471..f37e55afee9486ec1884461a0a2b89f5204e7d00 100644 index 22885b3d7931f2e439769cad39a37e8af3b3de54..f7a0976488732e41e197a3a77f20a937d44c7be3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -857,7 +857,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -823,7 +823,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
chunkproviderserver.getLightEngine().setTaskPerBatch(worldserver.paperConfig.lightQueueSize); // Paper - increase light queue size chunkproviderserver.getLightEngine().setTaskPerBatch(worldserver.paperConfig.lightQueueSize); // Paper - increase light queue size
// CraftBukkit start // CraftBukkit start
// this.updateSpawnFlags(); // this.updateMobSpawningFlags();
- worldserver.setSpawnSettings(this.isSpawningMonsters(), this.isSpawningAnimals()); - worldserver.setSpawnSettings(this.isSpawningMonsters(), this.isSpawningAnimals());
+ worldserver.setSpawnSettings(worldserver.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && ((DedicatedServer) this).settings.getProperties().spawnMonsters, this.isSpawningAnimals()); // Paper - per level difficulty (from setDifficulty(ServerLevel, Difficulty, boolean)) + worldserver.setSpawnSettings(worldserver.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && ((DedicatedServer) this).settings.getProperties().spawnMonsters, this.isSpawningAnimals()); // Paper - per level difficulty (from setDifficulty(ServerLevel, Difficulty, boolean))
this.forceTicks = false; this.forceTicks = false;
// CraftBukkit end // CraftBukkit end
@@ -1727,11 +1727,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1696,11 +1696,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
} }
@ -40,7 +40,7 @@ index f07dd72d2ba1b3e1d30dab5973ca3785ea517471..f37e55afee9486ec1884461a0a2b89f5
} }
} }
@@ -1745,7 +1748,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1714,7 +1717,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
while (iterator.hasNext()) { while (iterator.hasNext()) {
ServerLevel worldserver = (ServerLevel) iterator.next(); ServerLevel worldserver = (ServerLevel) iterator.next();
@ -68,10 +68,10 @@ index 33c859df0b669d0c3e97ccba29f17c1ba2166a27..9f03b738aea623fe409ca176397f48be
return 0; return 0;
} }
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 8098875a5c4146dec81f5daed0e34ddfe17a26c6..286863b7eb9ee0389154304e61942dd68f978ff1 100644 index 2b7ba5d8dda0297c8b35a0cea68c3ae10188e3f2..e968b880e435b8753314d85b919a0abc4f35be25 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -370,7 +370,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -366,7 +366,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@Override @Override
public void forceDifficulty() { public void forceDifficulty() {
@ -81,10 +81,10 @@ index 8098875a5c4146dec81f5daed0e34ddfe17a26c6..286863b7eb9ee0389154304e61942dd6
@Override @Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 08c7c2f9e87cc5ec3d8fce5ad449df4761ebad8a..001167097afed95f93f54ff0e61220148849dd85 100644 index dd29bad410ff74ce3f1f94bc60560cf10b12375f..0bcafeb8008bd2556bcdc556b17d00ff936d7aa9 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3023,7 +3023,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -3028,7 +3028,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) { public void handleChangeDifficulty(ServerboundChangeDifficultyPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) { if (this.player.hasPermissions(2) || this.isSingleplayerOwner()) {
@ -94,10 +94,10 @@ index 08c7c2f9e87cc5ec3d8fce5ad449df4761ebad8a..001167097afed95f93f54ff0e6122014
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f647c541c6908cae5f7b64054d71db2971bd5d1d..740bbfdfecd953d91075c507d1f8ee00dd02c9a8 100644 index a603013de589fad75ff783771a04f10e3bf2ee90..835ff36cfd8c15bf11b3b6a70eb02f6c5b693b8a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -880,8 +880,8 @@ public final class CraftServer implements Server { @@ -923,8 +923,8 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper com.destroystokyo.paper.PaperConfig.init((File) console.options.valueOf("paper-settings")); // Paper
for (ServerLevel world : this.console.getAllLevels()) { for (ServerLevel world : this.console.getAllLevels()) {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow null UUID's for chat
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java
index 26a229f7aa3f4425ed572e2d50730b4e978bf33e..a9fdfa7ec2a022e8adaa62721fb56748884686f5 100644 index 4047e177e3f336aa089ad7645ba8bd9e0863178e..0add1f44b6eaa5e35f8221bfdf608e6b28b71f1e 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundChatPacket.java
@@ -18,7 +18,7 @@ public class ClientboundChatPacket implements Packet<ClientGamePacketListener> { @@ -19,7 +19,7 @@ public class ClientboundChatPacket implements Packet<ClientGamePacketListener> {
public ClientboundChatPacket(Component message, ChatType location, UUID sender) { public ClientboundChatPacket(Component message, ChatType location, UUID sender) {
this.message = message; this.message = message;
this.type = location; this.type = location;

View File

@ -5,3 +5,4 @@ Make sure fluids aren't completly fucked, there may be more sync loads to nuke t
Improve Server Thread Pool and Thread Priorities: mojang added a max thread count property Improve Server Thread Pool and Thread Priorities: mojang added a max thread count property
Use Vanilla Minecart Speeds: is this needed? Use Vanilla Minecart Speeds: is this needed?
Handle Oversized Tile Entities: make sure impl is correct Handle Oversized Tile Entities: make sure impl is correct
0467-Optimize-WorldBorder-collision-checks-and-air check first hunk that has been removed