mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 03:55:14 +01:00
Fix VanillaGoals when in reobfuscated environment (#6580)
This commit is contained in:
parent
c3d50184eb
commit
1b383d7e9b
@ -29,10 +29,10 @@ index 0000000000000000000000000000000000000000..2d5494d2813b773e60ddba6790b750a9
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 9111d3fb84ca4a7dc881e1326ac0c93a81ec7f58..f15cb87d96b3f5028ab6ceba1e9026525cdecbee 100644
|
||||
index 2e8892211dd3eb4cac27bcb3b302a25d833e2626..99555bb8b6f5b8c2bb9a15ee469fe2dd3b980f67 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -937,6 +937,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -936,6 +936,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
private boolean hasStopped = false;
|
||||
public volatile boolean hasFullyShutdown = false; // Paper
|
||||
@ -40,7 +40,7 @@ index 9111d3fb84ca4a7dc881e1326ac0c93a81ec7f58..f15cb87d96b3f5028ab6ceba1e902652
|
||||
private final Object stopLock = new Object();
|
||||
public final boolean hasStopped() {
|
||||
synchronized (this.stopLock) {
|
||||
@@ -951,6 +952,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -950,6 +951,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
@ -48,7 +48,7 @@ index 9111d3fb84ca4a7dc881e1326ac0c93a81ec7f58..f15cb87d96b3f5028ab6ceba1e902652
|
||||
// Paper start - kill main thread, and kill it hard
|
||||
shutdownThread = Thread.currentThread();
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper
|
||||
@@ -1061,6 +1063,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1060,6 +1062,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
public void safeShutdown(boolean flag, boolean isRestarting) {
|
||||
this.isRestarting = isRestarting;
|
||||
@ -58,10 +58,10 @@ index 9111d3fb84ca4a7dc881e1326ac0c93a81ec7f58..f15cb87d96b3f5028ab6ceba1e902652
|
||||
this.running = false;
|
||||
if (flag) {
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 7da88bc52161dc32da22451077a4dfd8facb2de1..f4cff18afa816aa7efb2f80e0af51216129963a4 100644
|
||||
index bd1203a5b58bac7cccf1f81337fa2967a0e9eb40..6468a675862ee2956308b760012fe25cf505563f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -200,6 +200,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
@@ -207,6 +207,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
TranslatableComponent chatmessage = new TranslatableComponent("multiplayer.disconnect.invalid_player_data");
|
||||
@ -74,10 +74,10 @@ index 7da88bc52161dc32da22451077a4dfd8facb2de1..f4cff18afa816aa7efb2f80e0af51216
|
||||
this.connection.send(new ClientboundDisconnectPacket(chatmessage));
|
||||
this.connection.disconnect(chatmessage);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5cda9f21219decf6e4b9e5cc6e83b4749066f20f..5b95bb1d1361740f5605873fb707980bb911e6a3 100644
|
||||
index 72640c2dd945a22e8e562ee6901c9f70ae786816..59a12fe5d4d2504d99e26c6faaa095d5227cf446 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -946,6 +946,7 @@ public final class CraftServer implements Server {
|
||||
@@ -939,6 +939,7 @@ public final class CraftServer implements Server {
|
||||
plugin.getDescription().getName(),
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
@ -6,7 +6,7 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 5ee1e44647cfd7dff08ba7ce17d4b04246b7ab57..dc17410ac88e9f069a48ce7eb94b7cbec8e61c74 100644
|
||||
index eea412347cef390555166a988058ae877afdfa4a..b35e54380cb23758a813fa24d13b888f36906c23 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -1,8 +1,12 @@
|
||||
@ -37,16 +37,16 @@ index 5ee1e44647cfd7dff08ba7ce17d4b04246b7ab57..dc17410ac88e9f069a48ce7eb94b7cbe
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -49,6 +61,8 @@ dependencies {
|
||||
@@ -48,6 +60,8 @@ dependencies {
|
||||
implementation("co.aikar:cleaner:1.0-SNAPSHOT") // Paper
|
||||
implementation("io.netty:netty-all:4.1.65.Final") // Paper
|
||||
|
||||
+ implementation("org.quiltmc:tiny-mappings-parser:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation
|
||||
+
|
||||
testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
|
||||
testImplementation("junit:junit:4.13.1")
|
||||
testImplementation("org.hamcrest:hamcrest-library:1.3")
|
||||
@@ -143,6 +157,44 @@ tasks.shadowJar {
|
||||
}
|
||||
@@ -141,6 +155,44 @@ tasks.shadowJar {
|
||||
transform(ModifiedLog4j2PluginsCacheFileTransformer::class.java)
|
||||
}
|
||||
|
||||
@ -92,21 +92,19 @@ index 5ee1e44647cfd7dff08ba7ce17d4b04246b7ab57..dc17410ac88e9f069a48ce7eb94b7cbe
|
||||
exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
|
||||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 14841f1df5fa8970b132eb5e8fc24069f687dd6a..9d31f1f1a224d1442cb7915df514c0522a4b876b 100644
|
||||
index f1034cfb63ea37c22e67b5d4a18214774f208de2..a8740f03a7feef40490e9f5be610c2c835114f08 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -504,6 +504,11 @@ public class PaperConfig {
|
||||
enableBrigadierConsoleCompletions = getBoolean("settings.console.enable-brigadier-completions", enableBrigadierConsoleCompletions);
|
||||
@@ -433,4 +433,9 @@ public class PaperConfig {
|
||||
log("Async Chunks: Enabled - Chunks will be loaded much faster, without lag.");
|
||||
}
|
||||
|
||||
}
|
||||
+
|
||||
+ public static boolean deobfuscateStacktraces = true;
|
||||
+ private static void loggerSettings() {
|
||||
+ deobfuscateStacktraces = getBoolean("settings.loggers.deobfuscate-stacktraces", deobfuscateStacktraces);
|
||||
+ }
|
||||
+
|
||||
public static int itemValidationDisplayNameLength = 8192;
|
||||
public static int itemValidationLocNameLength = 8192;
|
||||
public static int itemValidationLoreLineLength = 8192;
|
||||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java b/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
||||
index 0bb4aaa546939b67a5d22865190f30478a9337c1..d3e619655382e50e9ac9323ed942502d85c9599c 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/io/SyncLoadFinder.java
|
||||
@ -159,7 +157,7 @@ index 0000000000000000000000000000000000000000..d019802a36dbaca4bf299a55d28381e4
|
||||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/util/ObfHelper.java b/src/main/java/io/papermc/paper/util/ObfHelper.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e9082fa4e04c88fe53429af77b1c23a03aeafc2d
|
||||
index 0000000000000000000000000000000000000000..5ee513c0e2436e6afa3432f9f835d4028b37aed0
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/util/ObfHelper.java
|
||||
@@ -0,0 +1,141 @@
|
||||
@ -253,7 +251,7 @@ index 0000000000000000000000000000000000000000..e9082fa4e04c88fe53429af77b1c23a0
|
||||
+ }
|
||||
+
|
||||
+ private static @Nullable Set<ClassMapping> loadMappingsIfPresent() {
|
||||
+ try (final @Nullable InputStream mappingsInputStream = StacktraceDeobfuscator.class.getClassLoader().getResourceAsStream("META-INF/mappings/reobf.tiny")) {
|
||||
+ try (final @Nullable InputStream mappingsInputStream = ObfHelper.class.getClassLoader().getResourceAsStream("META-INF/mappings/reobf.tiny")) {
|
||||
+ if (mappingsInputStream == null) {
|
||||
+ return null;
|
||||
+ }
|
||||
@ -513,13 +511,13 @@ index 3941e14d1c3e6e688e28904948039c8b2200de5f..a4fda4a3bae9ce600e778b44cd3ef432
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index db0110120f88bc06954fa8c44b2a45f0c8229574..7b6c547e71230fbb3733f99a4597b3f5b51547b8 100644
|
||||
index a335d48467d1730bfed25eb5fd9046e115f23ed0..8098875a5c4146dec81f5daed0e34ddfe17a26c6 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -221,6 +221,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -214,6 +214,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
}
|
||||
com.destroystokyo.paper.PaperConfig.registerCommands();
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
|
||||
io.papermc.paper.brigadier.PaperBrigadierProviderImpl.INSTANCE.getClass(); // init PaperBrigadierProvider
|
||||
+ io.papermc.paper.util.ObfHelper.INSTANCE.getClass(); // load mappings for stacktrace deobf and etc.
|
||||
// Paper end
|
||||
|
||||
@ -547,7 +545,7 @@ index 4d271cae88c16ed2419f896c728fdff612540500..dcfbe77bdb25d9c58ffb7b75c48bdb58
|
||||
log.log( Level.SEVERE, "\t\t" + stack );
|
||||
}
|
||||
diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml
|
||||
index 7484c52761d4d8da827cd7693cf8e14519c35a9b..2e421eaac80cf251b32e0bb504dd54a73edf4986 100644
|
||||
index d285dbec16272db6b8a71865e05924ad66087407..1a05d23ff886b015fb9396f119822c678a47ec6f 100644
|
||||
--- a/src/main/resources/log4j2.xml
|
||||
+++ b/src/main/resources/log4j2.xml
|
||||
@@ -30,10 +30,14 @@
|
@ -5,12 +5,12 @@ Subject: [PATCH] Implement Mob Goal API
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index eea412347cef390555166a988058ae877afdfa4a..81d507895572e9c0ec3c87d3745f95067922093a 100644
|
||||
index b35e54380cb23758a813fa24d13b888f36906c23..12c2681e0abef8ea4981deec431a9269df6cea54 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -48,6 +48,7 @@ dependencies {
|
||||
implementation("co.aikar:cleaner:1.0-SNAPSHOT") // Paper
|
||||
implementation("io.netty:netty-all:4.1.65.Final") // Paper
|
||||
@@ -62,6 +62,7 @@ dependencies {
|
||||
|
||||
implementation("org.quiltmc:tiny-mappings-parser:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation
|
||||
|
||||
+ testImplementation("io.github.classgraph:classgraph:4.8.47") // Paper - mob goal test
|
||||
testImplementation("junit:junit:4.13.1")
|
||||
@ -18,16 +18,17 @@ index eea412347cef390555166a988058ae877afdfa4a..81d507895572e9c0ec3c87d3745f9506
|
||||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..79006251a707dd94099db26fbb503f8699b7a8b5
|
||||
index 0000000000000000000000000000000000000000..181abe014baba9ac51064c003381281a8fa43fe4
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/MobGoalHelper.java
|
||||
@@ -0,0 +1,467 @@
|
||||
@@ -0,0 +1,367 @@
|
||||
+package com.destroystokyo.paper.entity.ai;
|
||||
+
|
||||
+import com.destroystokyo.paper.entity.RangedEntity;
|
||||
+import com.destroystokyo.paper.util.set.OptimizedSmallEnumSet;
|
||||
+import com.google.common.collect.BiMap;
|
||||
+import com.google.common.collect.HashBiMap;
|
||||
+import io.papermc.paper.util.ObfHelper;
|
||||
+import java.lang.reflect.Constructor;
|
||||
+import java.util.EnumSet;
|
||||
+import java.util.HashMap;
|
||||
@ -157,107 +158,7 @@ index 0000000000000000000000000000000000000000..79006251a707dd94099db26fbb503f86
|
||||
+
|
||||
+ static {
|
||||
+ // TODO these kinda should be checked on each release, in case obfuscation changes
|
||||
+ deobfuscationMap.put("bee_b", "bee_attack");
|
||||
+ deobfuscationMap.put("bee_c", "bee_become_angry");
|
||||
+ deobfuscationMap.put("bee_d", "bee_enter_hive");
|
||||
+ deobfuscationMap.put("bee_e", "bee_go_to_hive");
|
||||
+ deobfuscationMap.put("bee_f", "bee_go_to_known_flower");
|
||||
+ deobfuscationMap.put("bee_g", "bee_grow_crop");
|
||||
+ deobfuscationMap.put("bee_h", "bee_hurt_by_other");
|
||||
+ deobfuscationMap.put("bee_i", "bee_locate_hive");
|
||||
+ deobfuscationMap.put("bee_k", "bee_pollinate");
|
||||
+ deobfuscationMap.put("bee_l", "bee_wander");
|
||||
+ deobfuscationMap.put("cat_a", "cat_avoid_entity");
|
||||
+ deobfuscationMap.put("cat_b", "cat_relax_on_owner");
|
||||
+ deobfuscationMap.put("dolphin_b", "dolphin_swim_to_treasure");
|
||||
+ deobfuscationMap.put("dolphin_c", "dolphin_swim_with_player");
|
||||
+ deobfuscationMap.put("dolphin_d", "dolphin_play_with_items");
|
||||
+ deobfuscationMap.put("drowned_a", "drowned_attack");
|
||||
+ deobfuscationMap.put("drowned_b", "drowned_goto_beach");
|
||||
+ deobfuscationMap.put("drowned_c", "drowned_goto_water");
|
||||
+ deobfuscationMap.put("drowned_e", "drowned_swim_up");
|
||||
+ deobfuscationMap.put("drowned_f", "drowned_trident_attack");
|
||||
+ deobfuscationMap.put("enderman_a", "enderman_freeze_when_looked_at");
|
||||
+ deobfuscationMap.put("evoker_a", "evoker_attack_spell");
|
||||
+ deobfuscationMap.put("evoker_b", "evoker_cast_spell");
|
||||
+ deobfuscationMap.put("evoker_c", "evoker_summon_spell");
|
||||
+ deobfuscationMap.put("evoker_d", "evoker_wololo_spell");
|
||||
+ deobfuscationMap.put("fish_b", "fish_swim");
|
||||
+ deobfuscationMap.put("fox_a", "fox_defend_trusted");
|
||||
+ deobfuscationMap.put("fox_b", "fox_faceplant");
|
||||
+ deobfuscationMap.put("fox_e", "fox_breed");
|
||||
+ deobfuscationMap.put("fox_f", "fox_eat_berries");
|
||||
+ deobfuscationMap.put("fox_g", "fox_float");
|
||||
+ deobfuscationMap.put("fox_h", "fox_follow_parent");
|
||||
+ deobfuscationMap.put("fox_j", "fox_look_at_player");
|
||||
+ deobfuscationMap.put("fox_l", "fox_melee_attack");
|
||||
+ deobfuscationMap.put("fox_n", "fox_panic");
|
||||
+ deobfuscationMap.put("fox_o", "fox_pounce");
|
||||
+ deobfuscationMap.put("fox_p", "fox_search_for_items");
|
||||
+ deobfuscationMap.put("fox_q", "fox_stroll_through_village");
|
||||
+ deobfuscationMap.put("fox_r", "fox_perch_and_search");
|
||||
+ deobfuscationMap.put("fox_s", "fox_seek_shelter");
|
||||
+ deobfuscationMap.put("fox_t", "fox_sleep");
|
||||
+ deobfuscationMap.put("fox_u", "fox_stalk_prey");
|
||||
+ deobfuscationMap.put("illager_abstract_b", "raider_open_door");
|
||||
+ deobfuscationMap.put("illager_illusioner_a", "illusioner_blindness_spell");
|
||||
+ deobfuscationMap.put("illager_illusioner_b", "illusioner_mirror_spell");
|
||||
+ deobfuscationMap.put("illager_wizard_b", "spellcaster_cast_spell");
|
||||
+ deobfuscationMap.put("llama_a", "llama_attack_wolf");
|
||||
+ deobfuscationMap.put("llama_c", "llama_hurt_by");
|
||||
+ deobfuscationMap.put("llama_trader_a", "llamatrader_defended_wandering_trader");
|
||||
+ deobfuscationMap.put("monster_patrolling_a", "long_distance_patrol");
|
||||
+ deobfuscationMap.put("ocelot_a", "ocelot_avoid_entity");
|
||||
+ deobfuscationMap.put("ocelot_b", "ocelot_tempt");
|
||||
+ deobfuscationMap.put("panda_b", "panda_attack");
|
||||
+ deobfuscationMap.put("panda_c", "panda_avoid");
|
||||
+ deobfuscationMap.put("panda_d", "panda_breed");
|
||||
+ deobfuscationMap.put("panda_e", "panda_hurt_by_target");
|
||||
+ deobfuscationMap.put("panda_f", "panda_lie_on_back");
|
||||
+ deobfuscationMap.put("panda_g", "panda_look_at_player");
|
||||
+ deobfuscationMap.put("panda_i", "panda_panic");
|
||||
+ deobfuscationMap.put("panda_j", "panda_roll");
|
||||
+ deobfuscationMap.put("panda_k", "panda_sit");
|
||||
+ deobfuscationMap.put("panda_l", "panda_sneeze");
|
||||
+ deobfuscationMap.put("phantom_b", "phantom_attack_player");
|
||||
+ deobfuscationMap.put("phantom_c", "phantom_attack_strategy");
|
||||
+ deobfuscationMap.put("phantom_e", "phantom_circle_around_anchor");
|
||||
+ deobfuscationMap.put("phantom_i", "phantom_sweep_attack");
|
||||
+ deobfuscationMap.put("polar_bear_a", "polarbear_attack_players");
|
||||
+ deobfuscationMap.put("polar_bear_b", "polarbear_hurt_by");
|
||||
+ deobfuscationMap.put("polar_bear_c", "polarbear_melee");
|
||||
+ deobfuscationMap.put("polar_bear_d", "polarbear_panic");
|
||||
+ deobfuscationMap.put("puffer_fish_a", "pufferfish_puff");
|
||||
+ deobfuscationMap.put("raider_a", "raider_hold_ground");
|
||||
+ deobfuscationMap.put("raider_b", "raider_obtain_banner");
|
||||
+ deobfuscationMap.put("raider_c", "raider_celebration");
|
||||
+ deobfuscationMap.put("raider_d", "raider_move_through_village");
|
||||
+ deobfuscationMap.put("ravager_a", "ravager_melee_attack");
|
||||
+ deobfuscationMap.put("shulker_a", "shulker_attack");
|
||||
+ deobfuscationMap.put("shulker_c", "shulker_defense");
|
||||
+ deobfuscationMap.put("shulker_d", "shulker_nearest");
|
||||
+ deobfuscationMap.put("shulker_e", "shulker_peek");
|
||||
+ deobfuscationMap.put("squid_a", "squid_flee");
|
||||
+ deobfuscationMap.put("abstract_skeleton_1", "abstract_skeleton_melee");
|
||||
+ deobfuscationMap.put("strider_a", "strider_go_to_lava");
|
||||
+ deobfuscationMap.put("turtle_a", "turtle_breed");
|
||||
+ deobfuscationMap.put("turtle_b", "turtle_go_home");
|
||||
+ deobfuscationMap.put("turtle_c", "turtle_goto_water");
|
||||
+ deobfuscationMap.put("turtle_d", "turtle_lay_egg");
|
||||
+ deobfuscationMap.put("turtle_f", "turtle_panic");
|
||||
+ deobfuscationMap.put("turtle_h", "turtle_random_stroll");
|
||||
+ deobfuscationMap.put("turtle_i", "turtle_tempt");
|
||||
+ deobfuscationMap.put("turtle_j", "turtle_travel");
|
||||
+ deobfuscationMap.put("vex_a", "vex_charge_attack");
|
||||
+ deobfuscationMap.put("vex_b", "vex_copy_target_of_owner");
|
||||
+ deobfuscationMap.put("vex_d", "vex_random_move");
|
||||
+ deobfuscationMap.put("villager_trader_a", "villagertrader_wander_to_position");
|
||||
+ deobfuscationMap.put("vindicator_a", "vindicator_break_door");
|
||||
+ deobfuscationMap.put("vindicator_b", "vindicator_johnny_attack");
|
||||
+ deobfuscationMap.put("vindicator_c", "vindicator_melee_attack");
|
||||
+ deobfuscationMap.put("wither_a", "wither_do_nothing");
|
||||
+ deobfuscationMap.put("wolf_a", "wolf_avoid_entity");
|
||||
+ deobfuscationMap.put("zombie_a", "zombie_attack_turtle_egg");
|
||||
+
|
||||
+ ignored.add("goal_selector_1");
|
||||
+ ignored.add("goal_selector_2");
|
||||
@ -362,9 +263,8 @@ index 0000000000000000000000000000000000000000..79006251a707dd94099db26fbb503f86
|
||||
+ bukkitMap.put(net.minecraft.world.entity.animal.goat.Goat.class, org.bukkit.entity.Goat.class);
|
||||
+ }
|
||||
+
|
||||
+ // TODO: FIX THIS
|
||||
+ public static String getUsableName(Class<?> clazz) {
|
||||
+ String name = clazz.getName();
|
||||
+ String name = ObfHelper.INSTANCE.deobfClassName(clazz.getName());
|
||||
+ name = name.substring(name.lastIndexOf(".") + 1);
|
||||
+ boolean flag = false;
|
||||
+ // inner classes
|
||||
@ -899,10 +799,10 @@ index 8c2ec30a35e86f2b30863045b586a67e485c624b..848cac4426346b6d2ed575f33bf01c0e
|
||||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 72640c2dd945a22e8e562ee6901c9f70ae786816..f4c055e7e2d10756262386c8fb34996c4a38ee3f 100644
|
||||
index 59a12fe5d4d2504d99e26c6faaa095d5227cf446..63c20c0364b39bef033ed1df4278a64dc739995e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2533,5 +2533,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2534,5 +2534,11 @@ public final class CraftServer implements Server {
|
||||
public boolean isStopping() {
|
||||
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
||||
}
|
@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns
|
||||
if any are still running after that delay just as reload does.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 2e8892211dd3eb4cac27bcb3b302a25d833e2626..8e6938b76ff62f81f868ca0f6badce081263a300 100644
|
||||
index 99555bb8b6f5b8c2bb9a15ee469fe2dd3b980f67..f5ef6219b20d5b7af81537dab8d9815d74d1560a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -969,6 +969,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -971,6 +971,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
@ -22,10 +22,10 @@ index 2e8892211dd3eb4cac27bcb3b302a25d833e2626..8e6938b76ff62f81f868ca0f6badce08
|
||||
// CraftBukkit end
|
||||
if (this.getConnection() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f4c055e7e2d10756262386c8fb34996c4a38ee3f..5aeca3ab0c28b4d8b174d1376dc76cc1704fd169 100644
|
||||
index 63c20c0364b39bef033ed1df4278a64dc739995e..b39db457d459e048962712aa2173b3e8b608b37f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -947,6 +947,35 @@ public final class CraftServer implements Server {
|
||||
@@ -948,6 +948,35 @@ public final class CraftServer implements Server {
|
||||
org.spigotmc.WatchdogThread.hasStarted = true; // Paper - Disable watchdog early timeout on reload
|
||||
}
|
||||
|
@ -13,12 +13,12 @@ A config is provided if you rather let players use these exploits, and let
|
||||
them destroy the worlds End Portals and get on top of the nether easy.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index f1034cfb63ea37c22e67b5d4a18214774f208de2..eea3035bcc7f10480beccb6b090b3624b3dbbec3 100644
|
||||
index a8740f03a7feef40490e9f5be610c2c835114f08..155fa55eb859da90d59d01b21ae422bf99ccfa87 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -433,4 +433,16 @@ public class PaperConfig {
|
||||
log("Async Chunks: Enabled - Chunks will be loaded much faster, without lag.");
|
||||
}
|
||||
@@ -438,4 +438,15 @@ public class PaperConfig {
|
||||
private static void loggerSettings() {
|
||||
deobfuscateStacktraces = getBoolean("settings.loggers.deobfuscate-stacktraces", deobfuscateStacktraces);
|
||||
}
|
||||
+
|
||||
+ public static boolean allowBlockPermanentBreakingExploits = false;
|
||||
@ -30,7 +30,6 @@ index f1034cfb63ea37c22e67b5d4a18214774f208de2..eea3035bcc7f10480beccb6b090b3624
|
||||
+
|
||||
+ config.set("settings.unsupported-settings.allow-permanent-block-break-exploits-readme", "This setting controls if players should be able to break bedrock, end portals and other intended to be permanent blocks.");
|
||||
+ allowBlockPermanentBreakingExploits = getBoolean("settings.unsupported-settings.allow-permanent-block-break-exploits", allowBlockPermanentBreakingExploits);
|
||||
+
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
@ -5,12 +5,12 @@ Subject: [PATCH] Add option for console having all permissions
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index eea3035bcc7f10480beccb6b090b3624b3dbbec3..203834e28309387f04314b97da078ae1e0ed0638 100644
|
||||
index 155fa55eb859da90d59d01b21ae422bf99ccfa87..ddf9b5592e2203315d239ab28a338633600c69fc 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -445,4 +445,9 @@ public class PaperConfig {
|
||||
@@ -449,4 +449,9 @@ public class PaperConfig {
|
||||
config.set("settings.unsupported-settings.allow-permanent-block-break-exploits-readme", "This setting controls if players should be able to break bedrock, end portals and other intended to be permanent blocks.");
|
||||
allowBlockPermanentBreakingExploits = getBoolean("settings.unsupported-settings.allow-permanent-block-break-exploits", allowBlockPermanentBreakingExploits);
|
||||
|
||||
}
|
||||
+
|
||||
+ public static boolean consoleHasAllPermissions = false;
|
@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead
|
||||
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5aeca3ab0c28b4d8b174d1376dc76cc1704fd169..c5fdc37664b748d3daa8d29c57121fe5a2bf7e07 100644
|
||||
index b39db457d459e048962712aa2173b3e8b608b37f..3a0338f3f02686f6497b5bf7156131c54d8fd2cd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -360,7 +360,7 @@ public final class CraftServer implements Server {
|
@ -31,7 +31,7 @@ index 3984d85f1e1833ec199fde1ba64d9c83376b1819..144a8d424cd4f953b1471f20d1521ed1
|
||||
config.addDefault("world-settings.default." + path, def);
|
||||
return config.getBoolean("world-settings." + worldName + "." + path, config.getBoolean("world-settings.default." + path));
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8e6938b76ff62f81f868ca0f6badce081263a300..5beed1f7a96df3dfcee236077c34a56c57d78c51 100644
|
||||
index f5ef6219b20d5b7af81537dab8d9815d74d1560a..f3a1af9299f3c0b03309b838b00d3eca7caf5966 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -298,6 +298,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -42,7 +42,7 @@ index 8e6938b76ff62f81f868ca0f6badce081263a300..5beed1f7a96df3dfcee236077c34a56c
|
||||
public Commands vanillaCommandDispatcher;
|
||||
public boolean forceTicks; // Paper
|
||||
// CraftBukkit end
|
||||
@@ -1411,14 +1412,23 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1415,14 +1416,23 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.status.getPlayers().setSample(agameprofile);
|
||||
}
|
||||
|
@ -32,10 +32,10 @@ This patch fixes https://bugs.mojang.com/browse/MC-188840
|
||||
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
|
||||
index 203834e28309387f04314b97da078ae1e0ed0638..9a17483c4c44e5022fccfe42845e4060c1703119 100644
|
||||
index ddf9b5592e2203315d239ab28a338633600c69fc..0ff0a71fe5dc53fa5fb81edffabc69790e3bcd1e 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -450,4 +450,12 @@ public class PaperConfig {
|
||||
@@ -454,4 +454,12 @@ public class PaperConfig {
|
||||
private static void consoleHasAllPermissions() {
|
||||
consoleHasAllPermissions = getBoolean("settings.console-has-all-permissions", consoleHasAllPermissions);
|
||||
}
|
@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead
|
||||
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
|
||||
index 5beed1f7a96df3dfcee236077c34a56c57d78c51..c5f7510056cf4f0889d5470b1f1a444555c6ed75 100644
|
||||
index f3a1af9299f3c0b03309b838b00d3eca7caf5966..186193d1d652876e9ad7cdf5223ec2c6f5c65779 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1722,11 +1722,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1726,11 +1726,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,10 +50,10 @@ index 33c859df0b669d0c3e97ccba29f17c1ba2166a27..9f03b738aea623fe409ca176397f48be
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index a335d48467d1730bfed25eb5fd9046e115f23ed0..0a930147663850dc2ea7ffe9ced5611d5bab7c6d 100644
|
||||
index 8098875a5c4146dec81f5daed0e34ddfe17a26c6..286863b7eb9ee0389154304e61942dd68f978ff1 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -369,7 +369,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@@ -370,7 +370,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
|
||||
@Override
|
||||
public void forceDifficulty() {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c5fdc37664b748d3daa8d29c57121fe5a2bf7e07..bfdfbc550306484290989329878e33adbf3f37cd 100644
|
||||
index 3a0338f3f02686f6497b5bf7156131c54d8fd2cd..31007c49f0fd627024307fd67b121e9a1f657aa2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2175,6 +2175,32 @@ public final class CraftServer implements Server {
|
||||
@@ -2176,6 +2176,32 @@ public final class CraftServer implements Server {
|
||||
return new OldCraftChunkData(world);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Incremental player saving
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 9a17483c4c44e5022fccfe42845e4060c1703119..154222698ba1855283f8378b996cbfcc8bbdf81c 100644
|
||||
index 0ff0a71fe5dc53fa5fb81edffabc69790e3bcd1e..d74f0bdabd64976bf8608f2a5d8f2dc6118a35f2 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -458,4 +458,14 @@ public class PaperConfig {
|
||||
@@ -462,4 +462,14 @@ public class PaperConfig {
|
||||
set("settings.unsupported-settings.allow-tnt-duplication", null);
|
||||
}
|
||||
|
||||
@ -24,10 +24,10 @@ index 9a17483c4c44e5022fccfe42845e4060c1703119..154222698ba1855283f8378b996cbfcc
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c5f7510056cf4f0889d5470b1f1a444555c6ed75..47fbfe7cc1261d65264bb1897c57f72a7b4df46e 100644
|
||||
index 186193d1d652876e9ad7cdf5223ec2c6f5c65779..5595fc75df984b3d21f78759cb76f5b4018ff550 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -979,7 +979,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -981,7 +981,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
if (this.playerList != null) {
|
||||
MinecraftServer.LOGGER.info("Saving players");
|
||||
@ -35,7 +35,7 @@ index c5f7510056cf4f0889d5470b1f1a444555c6ed75..47fbfe7cc1261d65264bb1897c57f72a
|
||||
this.playerList.removeAll(this.isRestarting); // Paper
|
||||
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
||||
}
|
||||
@@ -1415,9 +1414,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1419,9 +1418,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// if (this.autosavePeriod > 0 && this.tickCount % this.autosavePeriod == 0) { // CraftBukkit // Paper - move down
|
||||
// MinecraftServer.LOGGER.debug("Autosave started"); // Paper
|
||||
serverAutoSave = (autosavePeriod > 0 && this.tickCount % autosavePeriod == 0); // Paper
|
@ -18,7 +18,7 @@ index 9a73364f4d56f3a7cecb27bc8034166b8f5731b9..4d1d5dacb175e7059a6af036432ef891
|
||||
private boolean allowCheatsForAllPlayers;
|
||||
private static final boolean ALLOW_LOGOUTIVATOR = false;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index bfdfbc550306484290989329878e33adbf3f37cd..c1ea62a2c65fb2cbb79c967cfb8fd2bb9cbba7a2 100644
|
||||
index 31007c49f0fd627024307fd67b121e9a1f657aa2..ff10c186939e4d77e7efdbd469531a1b00698508 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -627,6 +627,13 @@ public final class CraftServer implements Server {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent headless pistons from being created
|
||||
Prevent headless pistons from being created by explosions or tree/mushroom growth.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 154222698ba1855283f8378b996cbfcc8bbdf81c..7fb9135d35ff8746044d1e94915c1cc9b11af86f 100644
|
||||
index d74f0bdabd64976bf8608f2a5d8f2dc6118a35f2..c59a881632810da1408e74493bafcd4e6b01d975 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -458,6 +458,12 @@ public class PaperConfig {
|
||||
@@ -462,6 +462,12 @@ public class PaperConfig {
|
||||
set("settings.unsupported-settings.allow-tnt-duplication", null);
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ the world per tick, this attempts to reduce the impact that join floods
|
||||
has on the server
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 7fb9135d35ff8746044d1e94915c1cc9b11af86f..40b93af871b66bae3498c6e9738eaa5debe90d42 100644
|
||||
index c59a881632810da1408e74493bafcd4e6b01d975..07eeb01c95a04299fab2daddfdaf5d1a96495ef0 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -474,4 +474,9 @@ public class PaperConfig {
|
||||
@@ -478,4 +478,9 @@ public class PaperConfig {
|
||||
maxPlayerAutoSavePerTick = (playerAutoSaveRate == -1 || playerAutoSaveRate > 100) ? 10 : 20;
|
||||
}
|
||||
}
|
@ -43,7 +43,7 @@ index c09d3cdb3acb04b6a833c30a619ff2af5e8b6b18..2384ae5082afd01c4f28fe2f3f782cdc
|
||||
this.connection.disconnect(chatmessage);
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index bd1203a5b58bac7cccf1f81337fa2967a0e9eb40..7da88bc52161dc32da22451077a4dfd8facb2de1 100644
|
||||
index 6468a675862ee2956308b760012fe25cf505563f..f4cff18afa816aa7efb2f80e0af51216129963a4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -106,14 +106,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 47fbfe7cc1261d65264bb1897c57f72a7b4df46e..79975b851f73ab308e9f5b295a85327bb62dee29 100644
|
||||
index 5595fc75df984b3d21f78759cb76f5b4018ff550..3116ecf53e801347cde74753f0edb8d37ee1c117 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2038,6 +2038,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2042,6 +2042,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().reloadResources();
|
||||
this.functionManager.replaceLibrary(this.resources.getFunctionLibrary());
|
||||
this.structureManager.onResourceManagerReload(this.resources.getResourceManager());
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user