From 99e3c5ddd8c977c9b37579b047bcc00c942192ed Mon Sep 17 00:00:00 2001 From: Ivan Pekov Date: Fri, 15 Jan 2021 16:20:46 +0200 Subject: [PATCH] Updated Upstream and Sidestream(s) (Tuinity/EMC/Origami/Purpur) Upstream/An Sidestream has released updates that appears to apply and compile correctly This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing. Tuinity Changes: f4f7929 Updated Upstream (Paper) EMC Changes: bdbacfb3 Updated Paper a59be75b Convert item name/lore at time of creation properly Origami Changes: eb7662a Fix legacy code being accessible when disabling legacy support Purpur Changes: 7356e48 Fix stuck in portals 7f4c8f8 Updated Upstream (Paper) --- Empirecraft | 2 +- Origami | 2 +- PATCHES.md | 4 +- Purpur | 2 +- Tuinity | 2 +- patches/Purpur/server.txt | 2 +- .../server/0001-Yatopia-Server-Fixes.patch | 85 +++++++++++++------ patches/server/0003-Brandings.patch | 4 +- .../server/0006-Add-last-tick-time-API.patch | 6 +- .../server/0011-Modify-default-configs.patch | 4 +- .../0025-Fix-lead-fall-dmg-config.patch | 2 +- ...ze-some-stuff-in-WorldServer-ticking.patch | 2 +- ...-Fix-LightEngineThreaded-memory-leak.patch | 2 +- ...st-command-for-multiple-additions-re.patch | 4 +- ...0056-Configurable-criterion-triggers.patch | 2 +- .../0057-Configurable-BlockPhysicsEvent.patch | 4 +- patches/server/0058-Infinity-No-Arrows.patch | 2 +- .../0065-Optimised-hallowen-checker.patch | 4 +- 18 files changed, 83 insertions(+), 52 deletions(-) diff --git a/Empirecraft b/Empirecraft index 541b7328..bdbacfb3 160000 --- a/Empirecraft +++ b/Empirecraft @@ -1 +1 @@ -Subproject commit 541b73285e0206794d1bac040a8c6a6ffc92b400 +Subproject commit bdbacfb3b34bb5b706921bda88b4aea5917ea4df diff --git a/Origami b/Origami index 14a141e5..eb7662a1 160000 --- a/Origami +++ b/Origami @@ -1 +1 @@ -Subproject commit 14a141e585046f29dca4d672b04d77736e810c3a +Subproject commit eb7662a1f773df0c578fe1e5d8b0ba634ddde213 diff --git a/PATCHES.md b/PATCHES.md index 2be58136..dfb418e9 100644 --- a/PATCHES.md +++ b/PATCHES.md @@ -69,6 +69,7 @@ # Patches | server | Fix exp drop of zombie pigmen (MC-56653) | Phoenix616 | | | server | Fix lead fall dmg config | tr7zw | | | server | Fix rotating UP/DOWN CW and CCW | BillyGalbreath | | +| server | Fix stuck in portals | BillyGalbreath | | | server | Fix the dead lagging the server | William Blake Galbreath | | | server | Fix vanilla command permission handler | William Blake Galbreath | | | server | Global Eula file | tr7zw | | @@ -98,6 +99,7 @@ # Patches | server | Optimize Villagers | Ivan Pekov | | | server | Optimize advancement loading | Ivan Pekov | | | server | Optimize inventory API item handling | Phoenix616 | | +| server | Optimize random calls in chunk ticking | Paul Sauve | | | server | Optimize some stuff in WorldServer ticking | MrIvanPlays | | | server | Optimize whitelist command for multiple additions / removals | Ivan Pekov | | | server | Option for simpler Villagers | tr7zw | | @@ -105,7 +107,6 @@ # Patches | server | Origami Server Config | Phoenix616 | | | server | PaperPR - Add hex color code support for console logging | Esophose | | | server | PaperPR - Fix username connecting with no texture being | Camotoy | | -| server | PaperPR - Projectile load/save limit per chunk | jmp | | | server | Per entity (type) collision settings | MrIvanPlays | tr7zw | | server | Persistent TileEntity Lore and DisplayName | jmp | | | api | PlayerAttackEntityEvent | Ivan Pekov | | @@ -133,7 +134,6 @@ # Patches | server | Swap priority of checks in chunk ticking | Paul Sauve | | | server | Swaps the predicate order of collision | ㄗㄠˋ ㄑㄧˊ | | | server | Timings stuff | William Blake Galbreath | | -| server | Use faster random implementation | Mykyta Komarnytskyy | | | server | Use offline uuids if we need to | Ivan Pekov | | | server | Use unmodifiableMap instead of making copy | Paul Sauve | | | server | Utilities | YatopiaMC | Mykyta Komarnytskyy, Ivan Pekov | diff --git a/Purpur b/Purpur index 17e9e393..7356e484 160000 --- a/Purpur +++ b/Purpur @@ -1 +1 @@ -Subproject commit 17e9e393700920bfa43e8437f0427c1c394b50dc +Subproject commit 7356e484854ce5040ae94196da5a097ea704f348 diff --git a/Tuinity b/Tuinity index 53d98709..f4f79298 160000 --- a/Tuinity +++ b/Tuinity @@ -1 +1 @@ -Subproject commit 53d98709f8abd035090bd4fedeb838a2939ebbdb +Subproject commit f4f792980f94addade84924df035df486231a83d diff --git a/patches/Purpur/server.txt b/patches/Purpur/server.txt index 4a1f098c..04471a27 100644 --- a/patches/Purpur/server.txt +++ b/patches/Purpur/server.txt @@ -1 +1 @@ -Purpur-config-files&Timings-stuff&Add-component-util&Barrels-and-enderchests-6-rows&Lagging-threshold&Configurable-villager-brain-ticks&Alternative-Keepalive-Handling&MC-168772-Fix-Add-turtle-egg-block-options&Fix-vanilla-command-permission-handler&Fix-outdated-server-showing-in-ping-before-server-fu&Dont-send-useless-entity-packets&MC-147659-Fix-non-black-cats-spawning-in-swamp-huts&Cows-eat-mushrooms&Snowman-drop-and-put-back-pumpkin&Signs-editable-on-right-click&Signs-allow-color-codes&Allow-soil-to-moisten-from-water-directly-under-it&Option-to-toggle-milk-curing-bad-omen&Fix-the-dead-lagging-the-server&Skip-events-if-there-s-no-listeners&Add-permission-for-F3-N-debug&Allow-leashing-villagers&Implement-infinite-lava&Make-lava-flow-speed-configurable&PaperPR-Projectile-load-save-limit-per-chunk&Add-5-second-tps-average-in-tps&Entity-lifespan&Squid-EAR-immunity&Allow-anvil-colors&Add-no-tick-block-list&Add-option-to-disable-dolphin-treasure-searching&Stop-squids-floating-on-top-of-water&Despawn-rate-config-options-per-projectile-type&PaperPR-Add-hex-color-code-support-for-console-loggi&Persistent-TileEntity-Lore-and-DisplayName&Infinity-bow-settings&Allow-infinite-and-mending-enchantments-together&Add-twisting-and-weeping-vines-growth-rates&Config-migration-disable-saving-projectiles-to-disk-&Spread-out-and-optimise-player-list-ticks&Implement-TPSBar&Fix-rotating-UP-DOWN-CW-and-CCW \ No newline at end of file +Purpur-config-files&Timings-stuff&Add-component-util&Barrels-and-enderchests-6-rows&Lagging-threshold&Configurable-villager-brain-ticks&Alternative-Keepalive-Handling&MC-168772-Fix-Add-turtle-egg-block-options&Fix-vanilla-command-permission-handler&Fix-outdated-server-showing-in-ping-before-server-fu&Dont-send-useless-entity-packets&MC-147659-Fix-non-black-cats-spawning-in-swamp-huts&Cows-eat-mushrooms&Snowman-drop-and-put-back-pumpkin&Signs-editable-on-right-click&Signs-allow-color-codes&Allow-soil-to-moisten-from-water-directly-under-it&Option-to-toggle-milk-curing-bad-omen&Fix-the-dead-lagging-the-server&Skip-events-if-there-s-no-listeners&Add-permission-for-F3-N-debug&Allow-leashing-villagers&Implement-infinite-lava&Make-lava-flow-speed-configurable&Add-5-second-tps-average-in-tps&Entity-lifespan&Squid-EAR-immunity&Allow-anvil-colors&Add-no-tick-block-list&Add-option-to-disable-dolphin-treasure-searching&Stop-squids-floating-on-top-of-water&Despawn-rate-config-options-per-projectile-type&PaperPR-Add-hex-color-code-support-for-console-loggi&Persistent-TileEntity-Lore-and-DisplayName&Infinity-bow-settings&Allow-infinite-and-mending-enchantments-together&Add-twisting-and-weeping-vines-growth-rates&Config-migration-disable-saving-projectiles-to-disk-&Spread-out-and-optimise-player-list-ticks&Implement-TPSBar&Fix-rotating-UP-DOWN-CW-and-CCW&Fix-stuck-in-portals \ No newline at end of file diff --git a/patches/server/0001-Yatopia-Server-Fixes.patch b/patches/server/0001-Yatopia-Server-Fixes.patch index 8afdc7d1..eceef367 100644 --- a/patches/server/0001-Yatopia-Server-Fixes.patch +++ b/patches/server/0001-Yatopia-Server-Fixes.patch @@ -244,7 +244,7 @@ index 86f1cfe454ea0a989775b49a6b88375c766ef647..da53af61d1171db3c167c6e007adf953 if (!(this.k instanceof EntityPlayer)) { throw CommandListenerWrapper.a.create(); diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java -index 59caf8aff5e4735b59d6b826a364f77889f9ce06..e809f24a62bd554bda93b8fc1fa79a6f28307364 100644 +index 59caf8aff5e4735b59d6b826a364f77889f9ce06..5c213ee7fc4ef65d118a253d306f549aba6a4d7a 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -434,7 +434,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -256,6 +256,45 @@ index 59caf8aff5e4735b59d6b826a364f77889f9ce06..e809f24a62bd554bda93b8fc1fa79a6f } protected void af() { +@@ -2409,12 +2409,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke + return new Vec2F(this.pitch, this.yaw); + } + ++ public BlockPosition portalPos = BlockPosition.ZERO; // Purpur + public void d(BlockPosition blockposition) { + if (this.ai()) { ++ if (!(world.purpurConfig.playerFixStuckPortal && this instanceof EntityPlayer && !blockposition.equals(portalPos))) // Purpur + this.resetPortalCooldown(); + } else { + if (!this.world.isClientSide && !blockposition.equals(this.ac)) { + this.ac = blockposition.immutableCopy(); ++ portalPos = BlockPosition.ZERO; // Purpur + } + + this.inPortal = true; +diff --git a/src/main/java/net/minecraft/server/Entity.java.rej b/src/main/java/net/minecraft/server/Entity.java.rej +deleted file mode 100644 +index 38dc8171d74f62287c1ac9b04f90ff8d000f1bf1..0000000000000000000000000000000000000000 +--- a/src/main/java/net/minecraft/server/Entity.java.rej ++++ /dev/null +@@ -1,17 +0,0 @@ +-diff a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java (rejected hunks) +-@@ -2419,12 +2419,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke +- return new Vec2F(this.pitch, this.yaw); +- } +- +-+ public BlockPosition portalPos = BlockPosition.ZERO; // Purpur +- public void d(BlockPosition blockposition) { +- if (this.ai()) { +-+ if (!(world.purpurConfig.playerFixStuckPortal && this instanceof EntityPlayer && !blockposition.equals(portalPos))) // Purpur +- this.resetPortalCooldown(); +- } else if (world.purpurConfig.entitiesCanUsePortals || this instanceof EntityPlayer) { // Purpur +- if (!this.world.isClientSide && !blockposition.equals(this.ac)) { +- this.ac = blockposition.immutableCopy(); +-+ portalPos = BlockPosition.ZERO; // Purpur +- } +- +- this.inPortal = true; diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java index 171e8553a339eb3c995369f274de86b824183ca6..4103f3c39e2ed7466824e8fecbb8d21b515b5f01 100644 --- a/src/main/java/net/minecraft/server/EntityVillager.java @@ -513,7 +552,7 @@ index 39dce006ebf2bd81a9d6c62c25eb9bd55d24199e..00000000000000000000000000000000 - } - // Spigot Start diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java -index 15ea85f42fbda6e2d25bd15009156b21571fa513..14f206d1bae202e26fd9c5ea0b9e3ff2a686c12e 100644 +index 56623da6cef58ec3d0ab81643470ce776d8b2484..10784bc7f5e68305b7ad10afdf8cb28cbdd72ae7 100644 --- a/src/main/java/net/minecraft/server/WorldServer.java +++ b/src/main/java/net/minecraft/server/WorldServer.java @@ -181,6 +181,7 @@ public class WorldServer extends World implements GeneratorAccessSeed { @@ -632,7 +671,7 @@ index 0635030ba4c1cea7961238bb0c0be39d8c5a7d50..00000000000000000000000000000000 - public static String afkBroadcastBack = "§e§o%s is no longer AFK"; - public static String afkTabListPrefix = "[AFK] "; diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 361f7857e461578e90cb71e15027dadaf794cb69..5f0491a7cd6bb7e94cc5652be24d9bc111bb8035 100644 +index 361f7857e461578e90cb71e15027dadaf794cb69..e86ccbd36250f4229ce62319a59889bc0ac5befb 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -1,7 +1,15 @@ @@ -651,7 +690,7 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..5f0491a7cd6bb7e94cc5652be24d9bc1 import static net.pl3x.purpur.PurpurConfig.log; public class PurpurWorldConfig { -@@ -56,4 +64,167 @@ public class PurpurWorldConfig { +@@ -56,4 +64,172 @@ public class PurpurWorldConfig { PurpurConfig.config.addDefault("world-settings.default." + path, def); return PurpurConfig.config.getString("world-settings." + worldName + "." + path, PurpurConfig.config.getString("world-settings.default." + path)); } @@ -817,40 +856,32 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..5f0491a7cd6bb7e94cc5652be24d9bc1 + lavaSpeedNotNether = getInt("blocks.lava.speed.not-nether", lavaSpeedNotNether); + lavaInfinite = getBoolean("blocks.lava.infinite-source", lavaInfinite); + lavaInfiniteRequiredSources = getInt("blocks.lava.infinite-required-sources", lavaInfiniteRequiredSources); ++ } ++ ++ public boolean playerFixStuckPortal = false; ++ private void playerFixStuckPortal() { ++ playerFixStuckPortal = getBoolean("gameplay-mechanics.player.fix-stuck-in-portal", playerFixStuckPortal); + } } diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej deleted file mode 100644 -index ad57dcdf457379d3282e710874808a6cebd3c17f..0000000000000000000000000000000000000000 +index cce11dd0fb26d57015a14d56616fd4505c58237b..0000000000000000000000000000000000000000 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej +++ /dev/null -@@ -1,26 +0,0 @@ +@@ -1,13 +0,0 @@ -diff a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java (rejected hunks) --@@ -1,5 +1,6 @@ -- package net.pl3x.purpur; -- --+import com.destroystokyo.paper.PaperConfig; -- import net.minecraft.server.Block; -- import net.minecraft.server.Blocks; -- import net.minecraft.server.EnumDifficulty; --@@ -84,6 +85,17 @@ public class PurpurWorldConfig { -- return PurpurConfig.config.getString("world-settings." + worldName + "." + path, PurpurConfig.config.getString("world-settings.default." + path)); +-@@ -332,6 +332,11 @@ public class PurpurWorldConfig { +- }); - } - --+ private void migrateDisableProjectileSaving() { --+ if (PurpurConfig.version < 6) { --+ final boolean saveProjectilesToDisk = PurpurConfig.config.getBoolean("world-settings." + worldName + ".gameplay-mechanics.save-projectiles-to-disk", true); --+ PurpurConfig.config.set("world-settings." + worldName + ".gameplay-mechanics.save-projectiles-to-disk", null); --+ if (!saveProjectilesToDisk) { --+ PaperConfig.config.set("world-settings." + worldName + ".projectile-load-save-per-chunk-limit", 0); --+ PaperConfig.saveConfig(); --+ } --+ } +-+ public boolean playerFixStuckPortal = false; +-+ private void playerFixStuckPortal() { +-+ playerFixStuckPortal = getBoolean("gameplay-mechanics.player.fix-stuck-in-portal", playerFixStuckPortal); -+ } -+ -- public boolean armorstandSetNameVisible = false; -- public boolean armorstandFixNametags = false; -- public float armorstandStepHeight = 0.0F; +- public boolean teleportIfOutsideBorder = false; +- private void teleportIfOutsideBorder() { +- teleportIfOutsideBorder = getBoolean("gameplay-mechanics.player.teleport-if-outside-border", teleportIfOutsideBorder); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 00e6b6f29e042fb48c2fc8009659c57e9a930abc..fcf2bf8962cf6bc33d4213c1101debae4afa7114 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/patches/server/0003-Brandings.patch b/patches/server/0003-Brandings.patch index 1b68c92e..1e377eac 100644 --- a/patches/server/0003-Brandings.patch +++ b/patches/server/0003-Brandings.patch @@ -39,10 +39,10 @@ index 74ed02fa9296583977bb721014b10ff8b708b43c..a13c7b2b5bc79ecaea404779149ed02c .completer(new ConsoleCommandCompleter(this.server)) ); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 97cece32f994db6ff1d88b740060996869648f3c..c929c3ecb2a8c9056cad0418b2266b47bd0bbcaf 100644 +index 788bee62121d9bbe0d68a617f3d41ff63be447dd..f998f3425c5f30908ad1d07fdaecffcdce97e318 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1519,7 +1519,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c929c3ecb2a8c9056cad0418b2266b47bd0bbcaf..a342a13f387b4079bfc983d500a0fde534891196 100644 +index f998f3425c5f30908ad1d07fdaecffcdce97e318..d4bd48f26299712b49dad06a76bc2a7322f49b63 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -931,6 +931,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant