several more patches updated

This commit is contained in:
Jake 2021-11-24 09:22:48 -08:00 committed by MiniDigger | Martin
parent 26dcf812a4
commit 0f7ca21add
9 changed files with 17 additions and 15 deletions

View File

@ -9,19 +9,21 @@ loss, which forces the server to lose the same precision as the client
keeping them in sync. keeping them in sync.
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 288310df8ca9eff6901d906b48ba7cd1b6bc8ae3..3a39180042a7753feba2262ad1a8fd6b92132846 100644 index 1de3d8848419fce792e28c8100eca1b2488ac968..408e359e6f1a07c5616822e2ecf7549bf481c77d 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
@@ -498,4 +498,9 @@ public class PaperConfig { @@ -101,6 +101,11 @@ public class PaperConfig {
private static void trackPluginScoreboards() {
trackPluginScoreboards = getBoolean("settings.track-plugin-scoreboards", false); trackPluginScoreboards = getBoolean("settings.track-plugin-scoreboards", false);
} }
+
+ public static boolean fixEntityPositionDesync = true; + public static boolean fixEntityPositionDesync = true;
+ private static void fixEntityPositionDesync() { + private static void fixEntityPositionDesync() {
+ fixEntityPositionDesync = getBoolean("settings.fix-entity-position-desync", fixEntityPositionDesync); + fixEntityPositionDesync = getBoolean("settings.fix-entity-position-desync", fixEntityPositionDesync);
+ } + }
} +
public static void registerCommands() {
for (Map.Entry<String, Command> entry : commands.entrySet()) {
MinecraftServer.getServer().server.getCommandMap().register(entry.getKey(), "Paper", entry.getValue());
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundMoveEntityPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundMoveEntityPacket.java diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundMoveEntityPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundMoveEntityPacket.java
index b30c08bfb8c55161543a4ef09f2e462e0a1fe4ae..ec93f5300cc7d423ec0d292f0f8443f900d72dab 100644 index b30c08bfb8c55161543a4ef09f2e462e0a1fe4ae..ec93f5300cc7d423ec0d292f0f8443f900d72dab 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundMoveEntityPacket.java --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundMoveEntityPacket.java
@ -41,10 +43,10 @@ index b30c08bfb8c55161543a4ef09f2e462e0a1fe4ae..ec93f5300cc7d423ec0d292f0f8443f9
public Vec3 updateEntityPosition(Vec3 orig) { public Vec3 updateEntityPosition(Vec3 orig) {
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 34b3e3a522dd8fd226cb32d1218f75092065c431..7b8e747a44d9a60f345154a9aee817b8d923b424 100644 index 11cb360e71b3f2e3d6821162af91d6752e8d17c0..a6ef4b05daaa93ef333647cc00f8a708d466aaba 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
@@ -3785,6 +3785,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -3789,6 +3789,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
} }
public final void setPosRaw(double x, double y, double z, boolean forceBoundingBoxUpdate) { public final void setPosRaw(double x, double y, double z, boolean forceBoundingBoxUpdate) {
// Paper end // Paper end

View File

@ -5,12 +5,12 @@ Subject: [PATCH] Player Chunk Load/Unload Events
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 4f1291a1f840000aac782389e4c93b317cbf90d1..8608464c1d229625a10fd459427d8cc5e217789a 100644 index 207c566603671685f7d0abbb11274d2027568a05..6166d1ce68742fbcb365c59cd44a611addbe2f8c 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2094,11 +2094,21 @@ public class ServerPlayer extends Player { @@ -2091,11 +2091,21 @@ public class ServerPlayer extends Player {
public void trackChunk(ChunkPos chunkPos, Packet<?> chunkDataPacket, Packet<?> lightUpdatePacket) {
this.connection.send(lightUpdatePacket); public void trackChunk(ChunkPos chunkPos, Packet<?> chunkDataPacket) {
this.connection.send(chunkDataPacket); this.connection.send(chunkDataPacket);
+ // Paper start + // Paper start
+ if(io.papermc.paper.event.packet.PlayerChunkLoadEvent.getHandlerList().getRegisteredListeners().length > 0){ + if(io.papermc.paper.event.packet.PlayerChunkLoadEvent.getHandlerList().getRegisteredListeners().length > 0){

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Expose LivingEntity hurt direction
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 37d8519c9c653be0eb60563dc5811a1202a662dd..154886c81830ef2133ea44a93df807375021e51a 100644 index 24ffc967391c9ba175f41396a90007ecdc32f55c..0293d6fd1bb29f75fa1fa1cdfa36b3f679c1bc45 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -850,5 +850,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { @@ -850,5 +850,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add OBSTRUCTED reason to BedEnterResult
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 869990c181403a025d219dbd0e1201005973ffe9..aaefea1af4086e74f356bbb09b130a9845fa82f1 100644 index 1c0bf20f19a697e588a1d0210c181d29edbcaba7..37d99e3a1771feee9edb94f17a649ebb3511a459 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -262,6 +262,10 @@ public class CraftEventFactory { @@ -262,6 +262,10 @@ public class CraftEventFactory {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Do not crash from invalid ingredient lists in
diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
index 2610d9cd849aa38cc7a67aef21223707e85682ec..4a7b657265cbbc91ae85409abb3db29cfc555a2c 100644 index 68bd3bb6fde77a65b5271631f6ef726dc613019b..742ffe531bb8f3a9ca34dea99b044123d90cfff9 100644
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java --- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java +++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
@@ -279,7 +279,11 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa @@ -275,7 +275,11 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
} }
if (!event.isCancelled()) { if (!event.isCancelled()) {