mirror of
https://github.com/AtlasMediaGroup/Scissors.git
synced 2024-11-27 07:05:39 +00:00
Update Paper
This commit is contained in:
parent
291a7fa852
commit
0ef1c4d8a8
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,4 +1,4 @@
|
||||
[submodule "submodules/AdvancedSlimePaper"]
|
||||
path = submodules/AdvancedSlimePaper
|
||||
url = https://github.com/InfernalSuite/AdvancedSlimePaper.git
|
||||
branch = paper_upstream-fixes
|
||||
branch = main
|
||||
|
@ -2,7 +2,7 @@ group=me.totalfreedom.scissors
|
||||
version=1.20.2-R0.1-SNAPSHOT
|
||||
|
||||
mcVersion=1.20.2
|
||||
paperRef=c1ac98328c3b4dc2834497aae70020af7b3c7d04
|
||||
paperRef=1865625d958b94d82e0bd601d6d860318980c4c4
|
||||
|
||||
org.gradle.caching=true
|
||||
org.gradle.parallel=true
|
||||
|
@ -1948,7 +1948,7 @@ index 7e8dc9e8f381abfdcce2746edc93122d623622d1..12aadf4c981cdb1a6405de99016f4b40
|
||||
public FullChunkStatus status;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 97745f0bab8d82d397c6c2a5775aed92bca0a034..7a9373df55bdbd01eb30ac9c623561087bd6b43e 100644
|
||||
index 8f31413c939cc2b0454ad3d9a1b618dbae449d00..3d5d79e428a7b0f1aa7d0d3911e6d61b9537e8a0 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -268,7 +268,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -2217,7 +2217,7 @@ index 97745f0bab8d82d397c6c2a5775aed92bca0a034..7a9373df55bdbd01eb30ac9c62356108
|
||||
public ChatDecorator getChatDecorator() {
|
||||
// Paper start - moved to ChatPreviewProcessor
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index 17b6925b46f8386dcfc561483693de516465ec12..ebba74b64206722b3514797ef512ee591b4a3d60 100644
|
||||
index 8c33a12ca879c46893150d6adfb8aa4d397c6b4c..fb07f7f530a02820732b18c69ef54789707bdc8b 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -167,7 +167,11 @@ public class ServerChunkCache extends ChunkSource {
|
||||
@ -2358,7 +2358,7 @@ index 17b6925b46f8386dcfc561483693de516465ec12..ebba74b64206722b3514797ef512ee59
|
||||
gameprofilerfiller.pop();
|
||||
gameprofilerfiller.pop();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 17610196db7a1c6feb2cf74a02479a8691aa323f..3f26fdcc5cbf0a684ad724ab8c042d0053cc187e 100644
|
||||
index 584a768f2ce1c98a1de7749060c47f21721f9055..529b7caf18443b23422402ba62747b788ade69f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -317,7 +317,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -2581,7 +2581,7 @@ index 17610196db7a1c6feb2cf74a02479a8691aa323f..3f26fdcc5cbf0a684ad724ab8c042d00
|
||||
passenger.stopRiding();
|
||||
@@ -1495,18 +1515,18 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
if (!savingDisabled) {
|
||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
|
||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
|
||||
try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper
|
||||
- if (progressListener != null) {
|
||||
- progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
|
||||
|
@ -123,18 +123,18 @@ index 081691f9710ff1115e4308f79ed49fbc38941193..c29dfd15e147d5c4d9c9584ff7803c2a
|
||||
this.lootTableSeed = nbt.getLong("LootTableSeed");
|
||||
return false; // Paper - always load the items, table may still remain
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
||||
index 5b9ccbd767630abfee648a4653f33d8ac625bd0c..05830258ba0f7d19b1d86c0d8c85df8ffc94dfce 100644
|
||||
index f6942cb3ef1f9ef03708d4bc932ea9aeb1c13894..8b32864bafb3c1948993688be8f639dd6492057e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
||||
@@ -34,8 +34,14 @@ public abstract class CraftLootable<T extends RandomizableContainerBlockEntity>
|
||||
return null;
|
||||
}
|
||||
|
||||
- ResourceLocation key = getSnapshot().lootTable;
|
||||
- ResourceLocation key = this.getSnapshot().lootTable;
|
||||
- return Bukkit.getLootTable(CraftNamespacedKey.fromMinecraft(key));
|
||||
+ // Scissors start - Return a null loot table if the specified loot table is not valid
|
||||
+ try {
|
||||
+ ResourceLocation key = getSnapshot().lootTable;
|
||||
+ ResourceLocation key = this.getSnapshot().lootTable;
|
||||
+ return Bukkit.getLootTable(CraftNamespacedKey.fromMinecraft(key));
|
||||
+ } catch (Exception ex) {
|
||||
+ return null;
|
||||
@ -144,7 +144,7 @@ index 5b9ccbd767630abfee648a4653f33d8ac625bd0c..05830258ba0f7d19b1d86c0d8c85df8f
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
|
||||
index 0dd0ce9a9b3253e87eda12354249ec2fd2a33cf2..b6920f9432ca1736afbe775186fbbcf11cf046fb 100644
|
||||
index 313ee5c8737b2e57f9b5db6512c1871766b2ccd4..aa7fa17b9fb8519d8b57e27a5b422249b9b875d8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
|
||||
@@ -33,8 +33,14 @@ public abstract class CraftMinecartContainer extends CraftMinecart implements Lo
|
||||
@ -165,7 +165,7 @@ index 0dd0ce9a9b3253e87eda12354249ec2fd2a33cf2..b6920f9432ca1736afbe775186fbbcf1
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
index 153e4c88c168097eb4a78650e7c9c120bec202a3..4d6af55197bb6933daac50fc638f9c23fe652f39 100644
|
||||
index b4e45d8e9851552f30c9c29d3d9671e1e9094c38..4e8e1a6b718d9ec8720efb648ab023e9e39f67e3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
@@ -80,8 +80,14 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||
|
@ -426,7 +426,7 @@ index ec268189b19b6fa5c4521f96ce211a531db35ec5..343cb72710ef100cf7e4de1e081cfdc2
|
||||
|
||||
if (optionset.has("initSettings")) { // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index dbccbcb9b44e4efacdf53c2d161115cc20b36cff..c3eb9eef724fa04ede965c5875b948c829fafb5d 100644
|
||||
index 2b5d82fbf4e7ec32d0c53dd3e8207b1dba708bbd..84102c09874e6fc070050fb8b89b99fb28578af0 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -222,6 +222,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -447,13 +447,13 @@ index dbccbcb9b44e4efacdf53c2d161115cc20b36cff..c3eb9eef724fa04ede965c5875b948c8
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
this.setMotd(dedicatedserverproperties.motd);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f7c3b65e0d6c76189aea00232b33722c4363d7dd..8b872a406752a72d49ff029e2586d4ac17d7be1f 100644
|
||||
index 2c3dbeb929c9ec110aee390299f13006f0a4ec66..3708b9c68300694a377001fa17b87d6cf5c59779 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1038,6 +1038,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
||||
+ me.totalfreedom.scissors.ScissorsConfig.init(((File) console.options.valueOf("scissors-settings"))); // Scissors
|
||||
this.console.paperConfigurations.reloadConfigs(this.console);
|
||||
for (ServerLevel world : this.console.getAllLevels()) {
|
||||
@ -466,7 +466,7 @@ index f7c3b65e0d6c76189aea00232b33722c4363d7dd..8b872a406752a72d49ff029e2586d4ac
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2914,6 +2916,14 @@ public final class CraftServer implements Server {
|
||||
@@ -2915,6 +2917,14 @@ public final class CraftServer implements Server {
|
||||
return CraftServer.this.console.paperConfigurations.createLegacyObject(CraftServer.this.console);
|
||||
}
|
||||
|
||||
@ -482,7 +482,7 @@ index f7c3b65e0d6c76189aea00232b33722c4363d7dd..8b872a406752a72d49ff029e2586d4ac
|
||||
public void restart() {
|
||||
org.spigotmc.RestartCommand.restart();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index ebec18e919885f9220693a8a419d239e8cddd567..544698c044d9eef57abccfbd41cbfdd6873e4f55 100644
|
||||
index 9838e5cb3da6b668653378cb2f5f620de1c2aaba..0ca722589a7e6fe83174c0c3e6aa31b841232efe 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -180,6 +180,20 @@ public class Main {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Prevent attributes with invalid namespaces from being applied
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 5bd581c1a82236359c810037333590d0d9741587..35d640654ec483b98eeddb4887107a07f93f57aa 100644
|
||||
index ed6e5060901c348c4f56a573c23e2000d8f2fb72..5cdf1e6fcdc9e2bd821f40ec9bf95cf03f03179a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -46,6 +46,7 @@ import net.minecraft.nbt.NbtIo;
|
||||
@ -20,7 +20,7 @@ index 5bd581c1a82236359c810037333590d0d9741587..35d640654ec483b98eeddb4887107a07
|
||||
@@ -487,7 +488,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier);
|
||||
|
||||
String attributeName = CraftAttributeMap.convertIfNeeded(entry.getString(ATTRIBUTES_IDENTIFIER.NBT)); // Paper
|
||||
String attributeName = CraftAttributeMap.convertIfNeeded(entry.getString(CraftMetaItem.ATTRIBUTES_IDENTIFIER.NBT)); // Paper
|
||||
- if (attributeName == null || attributeName.isEmpty()) {
|
||||
+ if (attributeName == null || attributeName.isEmpty() || attributeName.length() > 256 || !ResourceLocation.isValidResourceLocation(attributeName)) { // Scissors
|
||||
continue;
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit dcbbf985e0796b8ae96c22dedd18ee393b8e9a04
|
||||
Subproject commit 0ecbd018a033ddd98c3cd60fd094965db8a3774c
|
Loading…
Reference in New Issue
Block a user