Merge branch 'ver/1.16.4' of https://github.com/YatopiaMC/Yatopia into patch-mappalette

This commit is contained in:
Ivan Pekov 2020-12-26 11:59:49 +02:00
commit 1890cf9a82
No known key found for this signature in database
GPG Key ID: BC975C392D9CA3A3
26 changed files with 229 additions and 43 deletions

@ -1 +1 @@
Subproject commit ff087b793c514b62745d9eb8be5f1f7168690119
Subproject commit 20b8c796f4b66bce7bc3be496f5c9e9edef1d226

@ -1 +1 @@
Subproject commit e45a78e4b8a2990e697e47667b9d90a25405afe8
Subproject commit d32f7b265f971d588a1ee69eb25e74ad372e133d

View File

@ -28,6 +28,7 @@ # Patches
| server | Add permission for F3+N debug | William Blake Galbreath | |
| server | Add timings for Behavior | Phoenix616 | |
| server | Add timings for Pathfinder | MrIvanPlays | |
| server | Add twisting and weeping vines growth rates | BillyGalbreath | |
| server | AirplaneLite Data Structs | Paul Sauve | |
| server | AirplaneLite MC Dev Fixes | Paul Sauve | |
| server | Allow anvil colors | William Blake Galbreath | |
@ -43,6 +44,7 @@ # Patches
| server | Config migration: disable saving projectiles to disk -> | jmp | |
| server | Configurable BlockPhysicsEvent | Mykyta Komarnytskyy | |
| server | Configurable criterion triggers | Mykyta Komarnytskyy | |
| server | Configurable enchanting table tick | Ivan Pekov | |
| server | Configurable flight checks | l_MrBoom_l | |
| server | Configurable movement checks | l_MrBoom_l | |
| server | Configurable villager brain ticks | William Blake Galbreath | |
@ -56,6 +58,7 @@ # Patches
| server | Do not update distance map when animal and mob spawning is | Beech Horn | |
| server | Don't load chunk with seed based feature search | Phoenix616 | |
| server | Don't trigger Lootable Refresh for non player interaction | Aikar | |
| server | Don't unnecessarily copy the passenger list | Ivan Pekov | |
| server | Don't wake up entities when damage event is cancelled | Phoenix616 | |
| server | Dont send useless entity packets | William Blake Galbreath | |
| server | Ensure pools create daemon threads | Ivan Pekov | |
@ -67,11 +70,15 @@ # Patches
| server | Fix exp drop of zombie pigmen (MC-56653) | Phoenix616 | |
| server | Fix lead fall dmg config | tr7zw | |
| server | Fix the dead lagging the server | William Blake Galbreath | |
| server | Fix vanilla command permission handler | William Blake Galbreath | |
| server | Global Eula file | tr7zw | |
| server | Heavily optimize furnance fuel and recipe lookups | tr7zw | Mykyta Komarn |
| server | Heavily optimize recipe lookups in CraftingManager | Mykyta Komarn | Ivan Pekov |
| server | Highly optimize VillagePlace filtering | Ivan Pekov | |
| server | Hopper Optimizations | Phoenix616 | |
| server | Implement TPSBar | BillyGalbreath | |
| server | Implement bamboo growth settings | William Blake Galbreath | |
| server | Implement infinite lava | William Blake Galbreath | |
| server | Improve task performance | ishland | Mykyta Komarn |
| server | Infinity No Arrows | Bud Gidiere | |
| server | Infinity bow settings | William Blake Galbreath | |
@ -80,6 +87,7 @@ # Patches
| server | Lagging threshold | William Blake Galbreath | |
| server | MC-147659 - Fix non black cats spawning in swamp huts | William Blake Galbreath | |
| server | MC-168772 Fix - Add turtle egg block options | William Blake Galbreath | |
| server | Make lava flow speed configurable | William Blake Galbreath | |
| api | Modify POM | YatopiaMC | |
| server | Modify POM | YatopiaMC | |
| server | Modify default configs | tr7zw | |
@ -125,7 +133,6 @@ # Patches
| server | Strip raytracing for EntityLiving#hasLineOfSight | Paul Sauve | |
| server | Swap priority of checks in chunk ticking | Paul Sauve | |
| server | Swaps the predicate order of collision | ㄗㄠˋ ㄑㄧˊ | |
| server | Tile Entity optimizations | Mykyta Komarnytskyy | |
| server | Timings stuff | William Blake Galbreath | |
| server | Use faster random implementation | Mykyta Komarnytskyy | |
| server | Use offline uuids if we need to | Ivan Pekov | |

2
Purpur

@ -1 +1 @@
Subproject commit 79d304ff80a864161d685811ade645701e693fa9
Subproject commit 5758335e73176ec765e6d8c73b78c3f39f5262ee

@ -1 +1 @@
Subproject commit 3e77330ea2a797fdfc594cfd25c38a82d9613597
Subproject commit 86b20d4ea11e52f1d5e9509351ac577e8a9cdce5

View File

@ -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-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&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&Config-migration-disable-saving-projectiles-to-disk-&Spread-out-and-optimise-player-list-ticks
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&Implement-bamboo-growth-settings&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

View File

@ -141,8 +141,63 @@ index 2291135eaef64c403183724cb6e413cd7e472672..6fcc7ed7c129e6a33386d65b37cbba4a
public static long getAdjacent(int baseX, int baseY, int baseZ, EnumDirection enumdirection) { return asLong(baseX + enumdirection.getAdjacentX(), baseY + enumdirection.getAdjacentY(), baseZ + enumdirection.getAdjacentZ()); } // Paper
public static long a(long i, EnumDirection enumdirection) {
return a(i, enumdirection.getAdjacentX(), enumdirection.getAdjacentY(), enumdirection.getAdjacentZ());
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
index cabce1a8ba5db56495628edd9bc796aee7a53356..9754a9eac48c50efdefdceefbb4386bf0df583dd 100644
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
@@ -107,6 +107,7 @@ public class CommandDispatcher {
CommandIdleTimeout.a(this.b);
CommandStop.a(this.b);
CommandWhitelist.a(this.b);
+ net.pl3x.purpur.command.TPSBarCommand.register(getDispatcher()); // Purpur
}
if (commanddispatcher_servertype.d) {
@@ -337,6 +338,7 @@ public class CommandDispatcher {
}
+ public static LiteralArgumentBuilder<CommandListenerWrapper> literal(String s) { return a(s); } // Purpur - OBFHELPER
public static LiteralArgumentBuilder<CommandListenerWrapper> a(String s) {
return LiteralArgumentBuilder.literal(s);
}
@@ -356,6 +358,7 @@ public class CommandDispatcher {
};
}
+ public com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> getDispatcher() { return a(); } // Purpur - OBFHELPER
public com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> a() {
return this.b;
}
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java.rej b/src/main/java/net/minecraft/server/CommandDispatcher.java.rej
deleted file mode 100644
index 7c1db96ec8692728e204a7d8490d74cf53b096a5..0000000000000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java.rej
+++ /dev/null
@@ -1,9 +0,0 @@
-diff a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java (rejected hunks)
-@@ -109,6 +109,7 @@ public class CommandDispatcher {
- CommandWhitelist.a(this.b);
- net.pl3x.purpur.command.DemoCommand.register(getDispatcher()); // Purpur
- net.pl3x.purpur.command.PingCommand.register(getDispatcher()); // Purpur
-+ net.pl3x.purpur.command.TPSBarCommand.register(getDispatcher()); // Purpur
- }
-
- if (commanddispatcher_servertype.d) {
diff --git a/src/main/java/net/minecraft/server/CommandListenerWrapper.java b/src/main/java/net/minecraft/server/CommandListenerWrapper.java
index 86f1cfe454ea0a989775b49a6b88375c766ef647..da53af61d1171db3c167c6e007adf95355771653 100644
--- a/src/main/java/net/minecraft/server/CommandListenerWrapper.java
+++ b/src/main/java/net/minecraft/server/CommandListenerWrapper.java
@@ -189,6 +189,7 @@ public class CommandListenerWrapper implements ICompletionProvider, com.destroys
}
}
+ public EntityPlayer getPlayerOrException() throws CommandSyntaxException { return h(); } // Purpur - OBFHELPER
public EntityPlayer h() throws CommandSyntaxException {
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 c8bbcf43d3352b3d42e15a2e2d1673b08bc16402..119abc84fadb6b011813ae8667a48c87feffcdc4 100644
index 985d0d4aea2210e908ac76fbeafc0c895372aee7..d224b1d0e224853e825486559938aed2c56c3981 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
@ -503,7 +558,7 @@ index ccee2c7ae135a3a532f76b44d7d3ad6db7e8c387..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..117e32be8c34f264cfeae78081abefb487cab5f3 100644
index 361f7857e461578e90cb71e15027dadaf794cb69..5f0491a7cd6bb7e94cc5652be24d9bc111bb8035 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -1,7 +1,15 @@
@ -522,7 +577,7 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..117e32be8c34f264cfeae78081abefb4
import static net.pl3x.purpur.PurpurConfig.log;
public class PurpurWorldConfig {
@@ -56,4 +64,139 @@ public class PurpurWorldConfig {
@@ -56,4 +64,167 @@ 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));
}
@ -660,6 +715,34 @@ index 361f7857e461578e90cb71e15027dadaf794cb69..117e32be8c34f264cfeae78081abefb4
+ PaperConfig.saveConfig();
+ }
+ }
+ }
+
+ public int bambooMaxHeight = 16;
+ public int bambooSmallHeight = 10;
+ private void bambooSettings() {
+ bambooMaxHeight = getInt("blocks.bamboo.max-height", bambooMaxHeight);
+ bambooSmallHeight = getInt("blocks.bamboo.small-height", bambooSmallHeight);
+ }
+
+ public double twistingVinesGrowthModifier = 0.10D;
+ private void twistingVinesSettings() {
+ twistingVinesGrowthModifier = getDouble("blocks.twisting_vines.growth-modifier", twistingVinesGrowthModifier);
+ }
+
+ public double weepingVinesGrowthModifier = 0.10D;
+ private void weepingVinesSettings() {
+ weepingVinesGrowthModifier = getDouble("blocks.weeping_vines.growth-modifier", weepingVinesGrowthModifier);
+ }
+
+ public int lavaSpeedNether = 10;
+ public int lavaSpeedNotNether = 30;
+ public boolean lavaInfinite = false;
+ public int lavaInfiniteRequiredSources = 2;
+ private void lavaSettings() {
+ lavaSpeedNether = getInt("blocks.lava.speed.nether", lavaSpeedNether);
+ lavaSpeedNotNether = getInt("blocks.lava.speed.not-nether", lavaSpeedNotNether);
+ lavaInfinite = getBoolean("blocks.lava.infinite-source", lavaInfinite);
+ lavaInfiniteRequiredSources = getInt("blocks.lava.infinite-required-sources", lavaInfiniteRequiredSources);
+ }
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java.rej

View File

@ -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 7510d4b98804f79276b02b40de5fa8e8bc2cde7a..8c34b3d0e6c0d2d4be42bea01abae2c47d6633f0 100644
index a91869dde9f47e00b6c6e380e7d3b92282d9b235..fc3abab760aa90e2afa5b4bf6abd3a0aff897f25 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1522,7 +1522,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1524,7 +1524,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
}
public String getServerModName() {

View File

@ -7,10 +7,10 @@ Original patch by:
Co-authored-by: tr7zw <tr7zw@live.de>
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8c34b3d0e6c0d2d4be42bea01abae2c47d6633f0..eb9d61b5e76c7b40faebfa8308cd3348b7e31fac 100644
index fc3abab760aa90e2afa5b4bf6abd3a0aff897f25..e990a39d97cb1427dd2ce43bdc79fb84e93e9c4b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -934,6 +934,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -936,6 +936,8 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
// Paper End
// Spigot End
@ -19,7 +19,7 @@ index 8c34b3d0e6c0d2d4be42bea01abae2c47d6633f0..eb9d61b5e76c7b40faebfa8308cd3348
protected void w() {
try {
long serverStartTime = SystemUtils.getMonotonicNanos(); // Paper
@@ -1005,7 +1007,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1007,7 +1009,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
this.a(gameprofilertick);
this.methodProfiler.a();
this.methodProfiler.enter("tick");

View File

@ -47,7 +47,7 @@ index 3ee8d31c453105eca7b96bede39a9ebbf40e1c2c..0a9f03526abf0638ada15d9810b94988
this.setAllowFlight(dedicatedserverproperties.allowFlight);
this.setResourcePack(dedicatedserverproperties.resourcePack, this.ba());
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 1b646a7bb1588ebff5b4fdb12bd3016084041e77..d37143396cac0bc8980b03fe0e5e31cc4ecf08ff 100644
index 36c6968ac03872004d46e70f38c5a515621b8eb1..1597eec51d69f6fc136eda5e1b6bdcdb3fceeb69 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -266,6 +266,7 @@ public abstract class EntityLiving extends Entity {
@ -67,7 +67,7 @@ index 1b646a7bb1588ebff5b4fdb12bd3016084041e77..d37143396cac0bc8980b03fe0e5e31cc
if (this.isFireProof() || this.world.isClientSide) {
this.extinguish();
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index d0fc49cb95bbebd5de9cec41dfb5b359c1724360..ce7724a1797a992561d074f85c7bdef71b4dbe78 100644
index 528072b27060becb37f73fa9b50bac6e3d2b2232..d56ca11a30faeb4f1346b853f50c25f46e3bd49e 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -188,7 +188,7 @@ public abstract class PlayerList {

View File

@ -59,10 +59,10 @@ index 537456a7427cddd6783f5b5d8ee2d655668c4c53..004184a7c3da4f72f68a5fd9b4dd5abd
}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index d37143396cac0bc8980b03fe0e5e31cc4ecf08ff..862d54fdb9a0908d0c279e55437cf8ab7b9b55d3 100644
index 1597eec51d69f6fc136eda5e1b6bdcdb3fceeb69..615dc8586b692138446998bd6a1dc245d3c65c70 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2864,7 +2864,7 @@ public abstract class EntityLiving extends Entity {
@@ -2870,7 +2870,7 @@ public abstract class EntityLiving extends Entity {
// Paper - end don't run getEntities if we're not going to use its result
// Tuinity start - reduce memory allocation from collideNearby
List<Entity> list = com.tuinity.tuinity.util.CachedLists.getTempGetEntitiesList();

View File

@ -39,10 +39,10 @@ index 5d3bb5f393a1e0e4a2e8b9a466530a91279697a9..7f084e7f11a829c10d113c7fb39eec0b
if (enumdirection2 != EnumDirection.DOWN && world.isBlockFacePowered(blockposition1.shift(enumdirection2), enumdirection2)) {
return true;
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 862d54fdb9a0908d0c279e55437cf8ab7b9b55d3..a9a32ff9e44f31eeb52180777dffffcbef93bd83 100644
index 615dc8586b692138446998bd6a1dc245d3c65c70..ddd9f3cca681b067515d8a8d217d03747c3352a3 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2585,10 +2585,12 @@ public abstract class EntityLiving extends Entity {
@@ -2591,10 +2591,12 @@ public abstract class EntityLiving extends Entity {
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Item stuck sleep config
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
index 0ea6d243dfafab2184147f365ded3f992d9eda61..a3b0fa6afdc47b1589be58e0ddd2e69455ad31fb 100644
index 747f5085da9dd4c1614d5e9e1ea459b300d025b3..2001e364a2e1d0657cb3395b5a2a56fa5dff6299 100644
--- a/src/main/java/net/minecraft/server/EntityItem.java
+++ b/src/main/java/net/minecraft/server/EntityItem.java
@@ -82,7 +82,7 @@ public class EntityItem extends Entity {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Fix lead fall dmg config
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 119abc84fadb6b011813ae8667a48c87feffcdc4..cc5d3fe169d02216a828a83be0f83f84c117cde9 100644
index d224b1d0e224853e825486559938aed2c56c3981..0bca08dc6ffd367de7cffab0433900d6bfe555cf 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1290,6 +1290,8 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke

View File

@ -55,10 +55,10 @@ index 4094ef76b7b05de1bfcc28aa0ef13033abadeb7e..0224a6d0e47e836fa485b39e7b4ce5b8
Throwable throwable = null;
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index ce7724a1797a992561d074f85c7bdef71b4dbe78..1a61ff4c7d532c39883aedba90f17ef81b1a9409 100644
index d56ca11a30faeb4f1346b853f50c25f46e3bd49e..d52985bc8236ba78b9530b4465e1f6de895f3b72 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -636,6 +636,7 @@ public abstract class PlayerList {
@@ -638,6 +638,7 @@ public abstract class PlayerList {
GameProfileBanEntry gameprofilebanentry;
if (getProfileBans().isBanned(gameprofile) && (gameprofilebanentry = getProfileBans().get(gameprofile)) != null) {
// Paper end
@ -66,7 +66,7 @@ index ce7724a1797a992561d074f85c7bdef71b4dbe78..1a61ff4c7d532c39883aedba90f17ef8
chatmessage = new ChatMessage("multiplayer.disconnect.banned.reason", new Object[]{gameprofilebanentry.getReason()});
if (gameprofilebanentry.getExpires() != null) {
@@ -643,7 +644,11 @@ public abstract class PlayerList {
@@ -645,7 +646,11 @@ public abstract class PlayerList {
}
// return chatmessage;

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Respect PlayerKickEvent leaveMessage
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 81ac7dae3b51c67a1a279fdb96cd1d50dd901f0b..c0fa18179cdd5367a5b346d7f795f969c0a6e2b7 100644
index 10139becc33a483a81858dcad2d07571e48ea43e..c258b5b1cc6d5f7fae49c311865e9506d0164c6a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -323,7 +323,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -17,7 +17,7 @@ index 81ac7dae3b51c67a1a279fdb96cd1d50dd901f0b..c0fa18179cdd5367a5b346d7f795f969
this.networkManager.stopReading();
MinecraftServer minecraftserver = this.minecraftServer;
NetworkManager networkmanager = this.networkManager;
@@ -1681,6 +1681,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1691,6 +1691,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
@Override
public void a(IChatBaseComponent ichatbasecomponent) {
@ -29,7 +29,7 @@ index 81ac7dae3b51c67a1a279fdb96cd1d50dd901f0b..c0fa18179cdd5367a5b346d7f795f969
// CraftBukkit start - Rarely it would send a disconnect line twice
if (this.processedDisconnect) {
return;
@@ -1696,7 +1701,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1706,7 +1711,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
*/
this.player.p();
@ -39,7 +39,7 @@ index 81ac7dae3b51c67a1a279fdb96cd1d50dd901f0b..c0fa18179cdd5367a5b346d7f795f969
this.minecraftServer.getPlayerList().sendMessage(CraftChatMessage.fromString(quitMessage));
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 1a61ff4c7d532c39883aedba90f17ef81b1a9409..0b7dc3d88a34c32e36ebb14f1e8b463664860f95 100644
index d52985bc8236ba78b9530b4465e1f6de895f3b72..6b7209a4a5128a2fa64442365a4e53c7cf866621 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -499,6 +499,11 @@ public abstract class PlayerList {
@ -54,7 +54,7 @@ index 1a61ff4c7d532c39883aedba90f17ef81b1a9409..0b7dc3d88a34c32e36ebb14f1e8b4636
WorldServer worldserver = entityplayer.getWorldServer();
entityplayer.a(StatisticList.LEAVE_GAME);
@@ -587,7 +592,7 @@ public abstract class PlayerList {
@@ -589,7 +594,7 @@ public abstract class PlayerList {
cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
// CraftBukkit end

View File

@ -185,10 +185,10 @@ index 0224a6d0e47e836fa485b39e7b4ce5b83ea554bf..fe578d306575bbdc8ca4a993a648e889
return (String[]) this.d.keySet().toArray(new String[this.d.size()]);
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index eb9d61b5e76c7b40faebfa8308cd3348b7e31fac..ba62404dae5b4c8af41921eb7a3fbcf9b2e0b58e 100644
index e990a39d97cb1427dd2ce43bdc79fb84e93e9c4b..c7031706ea51dd6d8c22c10fab2ce3154daac361 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1967,6 +1967,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1969,6 +1969,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
return new DataPackConfiguration(list, list1);
}

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable flight checks
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index c0fa18179cdd5367a5b346d7f795f969c0a6e2b7..86eb4b768eb52f0ff9371c65260c633f818e91af 100644
index c258b5b1cc6d5f7fae49c311865e9506d0164c6a..687ebda8f3993de460ad3100a0aa7fe648b2582c 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -179,7 +179,7 @@ public class PlayerConnection implements PacketListenerPlayIn {

View File

@ -152,10 +152,10 @@ index 58ecbe1e20581dc9e78cdd2f4ece29cfa014da8a..3da86dc56f33e4f1900f6b4f66ca6696
for (Recipes<?> recipeType : IRegistry.RECIPE_TYPE) {
this.recipes.put(recipeType, new Object2ObjectLinkedOpenHashMap<>());
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 3adb29f004d2fee36f3ee9b21ee5417e84b64837..376ab1d4c4f729639714b5eeedec514a2176531a 100644
index 5a62ac72edc49cd032cd02fa8d007959517d063b..391421214d2fcc0cb38ac42d053cc1c57545fa73 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -570,6 +570,7 @@ public final class ItemStack {
@@ -575,6 +575,7 @@ public final class ItemStack {
return !this.e() ? this.doMaterialsMatch(itemstack) : !itemstack.isEmpty() && this.getItem() == itemstack.getItem();
}

View File

@ -8,10 +8,10 @@ Paper does alleviate this quite well by only firing if plugins are listening, bu
This patch implements a hard toggle for the event.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ba62404dae5b4c8af41921eb7a3fbcf9b2e0b58e..571483166c69079961c3297e1b40265b62f34217 100644
index c7031706ea51dd6d8c22c10fab2ce3154daac361..f4ca05cc77ae5ea47db51770f316413fdf8a728b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1410,7 +1410,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
@@ -1412,7 +1412,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
while (iterator.hasNext()) {
WorldServer worldserver = (WorldServer) iterator.next();

View File

@ -18,7 +18,7 @@ index 0046dedd5e5f503ee680b89ec7e3dca681c26686..4412d465afcab66a1922217c931e73dc
}
}
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 117e32be8c34f264cfeae78081abefb487cab5f3..03b642a40b0082d5c1b852ac34b691f0cace27ba 100644
index 5f0491a7cd6bb7e94cc5652be24d9bc111bb8035..66d3b52837b0512b7277c4d1732105ec407bdfa8 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -176,10 +176,12 @@ public class PurpurWorldConfig {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable movement checks
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 86eb4b768eb52f0ff9371c65260c633f818e91af..7353cf860245dfa051f93a8d32a9c3b14b063af2 100644
index 687ebda8f3993de460ad3100a0aa7fe648b2582c..74ddd98008490ed10952fe3847e83e51aa464132 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -443,7 +443,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@ -26,7 +26,7 @@ index 86eb4b768eb52f0ff9371c65260c633f818e91af..7353cf860245dfa051f93a8d32a9c3b1
flag1 = true;
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), Math.sqrt(d10));
}
@@ -1155,7 +1155,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1165,7 +1165,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean(GameRules.DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isGliding())) {
float f2 = this.player.isGliding() ? 300.0F : 100.0F;
@ -35,7 +35,7 @@ index 86eb4b768eb52f0ff9371c65260c633f818e91af..7353cf860245dfa051f93a8d32a9c3b1
// CraftBukkit end
PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", this.player.getDisplayName().getString(), d7, d8, d9);
this.a(this.player.locX(), this.player.locY(), this.player.locZ(), this.player.yaw, this.player.pitch);
@@ -1221,7 +1221,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
@@ -1231,7 +1231,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
d11 = d7 * d7 + d8 * d8 + d9 * d9;
boolean flag1 = false;

View File

@ -58,7 +58,7 @@ index 38dc6086d18951e065d4048d1d8eee288c5c5fd1..4e094f0e1117cecbd39be645997eb9d3
this.f = ShapeDetectorBuilder.a().a(" ", " ", " ", " # ", " ", " ", " ").a(" ", " ", " ", " # ", " ", " ", " ").a(" ", " ", " ", " # ", " ", " ", " ").a(" ### ", " # # ", "# #", "# # #", "# #", " # # ", " ### ").a(" ", " ### ", " ##### ", " ##### ", " ##### ", " ### ", " ").a('#', ShapeDetectorBlock.a(BlockPredicate.a(Blocks.BEDROCK))).b();
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index cc5d3fe169d02216a828a83be0f83f84c117cde9..2bacecb9cee2f93b142d63b9a79641d7bac8f868 100644
index 0bca08dc6ffd367de7cffab0433900d6bfe555cf..51c4ff1bd6948ab46d723c37af39c76cdf662be5 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -61,7 +61,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -145,7 +145,7 @@ index 9190caed195b9987e3af545f4de63b8d956788a6..178386cfb44152b50757234a624afef0
private final MinecraftServer server;
public final NetworkManager networkManager;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 571483166c69079961c3297e1b40265b62f34217..55d22bfa2f30e2eaaf11836c29c90c86e764a41a 100644
index f4ca05cc77ae5ea47db51770f316413fdf8a728b..b9b9caa0463580b744225beb7133d9282c5899f3 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -197,7 +197,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas

View File

@ -0,0 +1,46 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ivan Pekov <ivan@mrivanplays.com>
Date: Wed, 23 Dec 2020 08:42:18 +0200
Subject: [PATCH] Configurable enchanting table tick
Also don't tick blockentity beehive if there are no bees in it.
This patch is a leftover from the original tile entity optimisations, which was majorly flawed.
diff --git a/src/main/java/net/minecraft/server/TileEntityBeehive.java b/src/main/java/net/minecraft/server/TileEntityBeehive.java
index a60e0872d51aeb330bd5334e35f18ad0ed63834e..70239fa5ac05464606ad917b3c3498156c12c536 100644
--- a/src/main/java/net/minecraft/server/TileEntityBeehive.java
+++ b/src/main/java/net/minecraft/server/TileEntityBeehive.java
@@ -286,6 +286,7 @@ public class TileEntityBeehive extends TileEntity implements ITickable {
@Override
public void tick() {
+ if (this.bees.size() == 0) { return; } // Yatopia - TE optimizations
if (!this.world.isClientSide) {
this.y();
BlockPosition blockposition = this.getPosition();
diff --git a/src/main/java/net/minecraft/server/TileEntityEnchantTable.java b/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
index c9066cb5f51cb2ad078aca3019e1df557062d286..46b18b6364645106b00bd4f1d721b8cd704ecabf 100644
--- a/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
+++ b/src/main/java/net/minecraft/server/TileEntityEnchantTable.java
@@ -43,6 +43,7 @@ public class TileEntityEnchantTable extends TileEntity implements INamableTileEn
@Override
public void tick() {
+ if (!org.yatopiamc.yatopia.server.YatopiaConfig.shouldTickEnchantingTables) { return; } // Yatopia - TE optimizations
this.j = this.i;
this.l = this.k;
EntityHuman entityhuman = this.world.a((double) this.position.getX() + 0.5D, (double) this.position.getY() + 0.5D, (double) this.position.getZ() + 0.5D, 3.0D, false);
diff --git a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
index 34b5a087d1d5d84b193adbd756add060a2d49354..2d4fb0a4664578f8d5c23db854eb8f2764724940 100644
--- a/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
+++ b/src/main/java/org/yatopiamc/yatopia/server/YatopiaConfig.java
@@ -283,4 +283,9 @@ public class YatopiaConfig {
checkVehicleMovedQuickly = getBoolean("settings.checks.vehicle-moved-quickly", checkVehicleMovedQuickly);
checkVehicleMovedWrongly = getBoolean("settings.checks.vehicle-moved-wrongly", checkVehicleMovedWrongly);
}
+
+ public static boolean shouldTickEnchantingTables = false;
+ private static void tickEnchantingTables() {
+ shouldTickEnchantingTables = getBoolean("settings.tick.enchanting-tables", shouldTickEnchantingTables);
+ }
}

View File

@ -0,0 +1,50 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ivan Pekov <ivan@mrivanplays.com>
Date: Wed, 23 Dec 2020 09:55:43 +0200
Subject: [PATCH] Don't unnecessarily copy the passenger list
It is only copied if it's needed, and that is in EntityTrackerEntry, when we've detected a change.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 51c4ff1bd6948ab46d723c37af39c76cdf662be5..a48b56839a3516baa7d3373295b259a24012109e 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -3282,7 +3282,12 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public List<Entity> getPassengers() {
+ // Yatopia start - don't copy passengers list
+ /*
return (List) (this.passengers.isEmpty() ? Collections.emptyList() : Lists.newArrayList(this.passengers));
+ */
+ return this.passengers.isEmpty() ? Collections.emptyList() : this.passengers;
+ // Yatopia end
}
public boolean w(Entity entity) {
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
index 228236bce14bfdf930570b453862dcfaae9e4823..0be11d1263d84b270c25ec8249832164dc75409d 100644
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
@@ -78,7 +78,7 @@ public class EntityTrackerEntry {
List<Entity> list = this.tracker.getPassengers();
if (!list.equals(this.p)) {
- this.p = list;
+ this.p = com.google.common.collect.ImmutableList.copyOf(list); // Yatopia - only copy list if something has changed
this.broadcastIncludingSelf(new PacketPlayOutMount(this.tracker)); // CraftBukkit
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 6c39796e672a6412e85f69a6a3dfdb1037e51d30..eba7a33cb0c2f0bc18eda709dd1c2b341ddb36df 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1430,7 +1430,7 @@ public class WorldServer extends World implements GeneratorAccessSeed {
this.chunkCheck(entity);
} finally { timer.stopTiming(); } // Paper - timings
if (entity.inChunk) {
- Iterator iterator = entity.getPassengers().iterator();
+ Iterator iterator = new java.util.ArrayList<>(entity.getPassengers()).iterator(); // Yatopia - copy the passengers list here too
while (iterator.hasNext()) {
Entity entity1 = (Entity) iterator.next();