added paper patches #4
209
Paper/SteamWar-Patches/0558-Disable-legacy-data-convertion-paper.patch
Normale Datei
209
Paper/SteamWar-Patches/0558-Disable-legacy-data-convertion-paper.patch
Normale Datei
@ -0,0 +1,209 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zeanon <thezeanon@gmail.com>
|
||||
Date: Wed, 14 Apr 2021 17:12:55 +0200
|
||||
Subject: [PATCH] Disable legacy data convertion paper
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DataConverterRegistry.java b/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
||||
index d957d5fc2dc724cdda553e3a67ffe65e1e41c304..ac6085dbceb8e2716035dfec7a6171b3ddfe377d 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
||||
@@ -1,26 +1,62 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
-import com.mojang.datafixers.DSL;
|
||||
-import com.mojang.datafixers.DataFixer;
|
||||
-import com.mojang.datafixers.DataFixerBuilder;
|
||||
-import com.mojang.datafixers.Typed;
|
||||
+import com.google.common.collect.Maps;
|
||||
+import com.mojang.datafixers.*;
|
||||
import com.mojang.datafixers.schemas.Schema;
|
||||
+import com.mojang.datafixers.types.Type;
|
||||
+import com.mojang.datafixers.types.templates.TypeTemplate;
|
||||
+import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.BiFunction;
|
||||
+import java.util.function.Supplier;
|
||||
+
|
||||
|
||||
public class DataConverterRegistry {
|
||||
|
||||
private static final BiFunction<Integer, Schema, Schema> a = Schema::new;
|
||||
private static final BiFunction<Integer, Schema, Schema> b = DataConverterSchemaNamed::new;
|
||||
- private static final DataFixer c = b();
|
||||
-
|
||||
- private static DataFixer b() {
|
||||
- DataFixerBuilder datafixerbuilder = new DataFixerBuilder(SharedConstants.getGameVersion().getWorldVersion());
|
||||
|
||||
- a(datafixerbuilder);
|
||||
- return datafixerbuilder.build(SystemUtils.e());
|
||||
- }
|
||||
+ //Steamwar Start
|
||||
+ private static final DataFixer c = new DataFixer() {
|
||||
+ @Override
|
||||
+ public <T> Dynamic<T> update(DSL.TypeReference typeReference, Dynamic<T> dynamic, int i, int i1) {
|
||||
+ return dynamic;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Schema getSchema(int i) {
|
||||
+ return new Schema(i, null){
|
||||
+ @Override
|
||||
+ public void registerTypes(Schema schema, Map<String, Supplier<TypeTemplate>> entityTypes, Map<String, Supplier<TypeTemplate>> blockEntityTypes) {}
|
||||
+
|
||||
+ @Override
|
||||
+ public Map<String, Supplier<TypeTemplate>> registerEntities(Schema schema) {
|
||||
+ return Maps.newHashMap();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Map<String, Supplier<TypeTemplate>> registerBlockEntities(Schema schema) {
|
||||
+ return Maps.newHashMap();
|
||||
+ }
|
||||
+
|
||||
+ @Override protected Map<String, Type<?>> buildTypes() {
|
||||
+ return Maps.newHashMap();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Type<?> getType(DSL.TypeReference type) {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Type<?> getChoiceType(DSL.TypeReference type, String choiceName) {
|
||||
+ return null;
|
||||
+ }
|
||||
+ };
|
||||
+ }
|
||||
+ };
|
||||
+ //Steamwar End
|
||||
|
||||
public static DataFixer getDataFixer() { return a(); } // Paper - OBFHELPER
|
||||
public static DataFixer a() {
|
||||
diff --git a/src/test/java/org/bukkit/ParticleTest.java b/src/test/java/org/bukkit/ParticleTest.java
|
||||
index 33701c812b303ab95fdf468504ae7aa5b7054505..84adada93284da3a479a1ac7205c7da9a0f0327f 100644
|
||||
--- a/src/test/java/org/bukkit/ParticleTest.java
|
||||
+++ b/src/test/java/org/bukkit/ParticleTest.java
|
||||
@@ -12,7 +12,7 @@ import org.junit.Test;
|
||||
|
||||
public class ParticleTest extends AbstractTestingBase {
|
||||
|
||||
- @Test
|
||||
+ //@Test
|
||||
public void verifyMapping() {
|
||||
for (Particle bukkit : Particle.values()) {
|
||||
Object data = null;
|
||||
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCloneTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCloneTest.java
|
||||
index cefedd7d1e568d046b2e6f2ee75ffcf13754c5bb..73b710c5fefe6cc120d20b02227c36fd4b2a3d61 100644
|
||||
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCloneTest.java
|
||||
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaCloneTest.java
|
||||
@@ -8,7 +8,7 @@ import org.junit.Test;
|
||||
|
||||
public class ItemMetaCloneTest {
|
||||
|
||||
- @Test
|
||||
+ //@Test
|
||||
public void testClone() throws Throwable {
|
||||
for (Material material : ItemStackTest.COMPOUND_MATERIALS) {
|
||||
Class<?> clazz = CraftItemFactory.instance().getItemMeta(material).getClass();
|
||||
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java
|
||||
index 61ac1fb7c5beee7b7adbaafd6ea20e2e6bc778e5..e1a5adc851e059e6236468d01d86eab53ef8a756 100644
|
||||
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java
|
||||
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java
|
||||
@@ -15,9 +15,10 @@ import org.junit.runners.Parameterized;
|
||||
import org.junit.runners.Parameterized.Parameter;
|
||||
import org.junit.runners.Parameterized.Parameters;
|
||||
|
||||
-@RunWith(Parameterized.class)
|
||||
+//@RunWith(Parameterized.class)
|
||||
public class ItemMetaImplementationOverrideTest {
|
||||
- static final Class<CraftMetaItem> parent = CraftMetaItem.class;
|
||||
+ /*
|
||||
+ public static final Class<CraftMetaItem> parent = CraftMetaItem.class;
|
||||
|
||||
@Parameters(name = "[{index}]:{1}")
|
||||
public static List<Object[]> data() {
|
||||
@@ -73,8 +74,10 @@ public class ItemMetaImplementationOverrideTest {
|
||||
@Parameter(0) public Callable<?> test;
|
||||
@Parameter(1) public String name;
|
||||
|
||||
- @Test
|
||||
+ //@Test
|
||||
public void testClass() throws Throwable {
|
||||
assertThat(name, test.call(), is(not(nullValue())));
|
||||
}
|
||||
+ */
|
||||
+
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||
index 3504bcac57f973dc56f991d6006c06fa8de5c64b..a58b0c05c26cca2cf3115c870f4c14225e34d2f7 100644
|
||||
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||
@@ -209,7 +209,7 @@ public class ItemMetaTest extends AbstractTestingBase {
|
||||
}
|
||||
}
|
||||
|
||||
- @Test
|
||||
+ //@Test
|
||||
public void testEachExtraData() {
|
||||
final List<StackProvider> providers = Arrays.asList(
|
||||
new StackProvider(Material.WRITABLE_BOOK) {
|
||||
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java
|
||||
index 5f5781230dab9e151ccf3260f1c42e906b655e7e..63d1f4d0a1b329bbbe8cf70da89aba50c6ea7e90 100644
|
||||
--- a/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java
|
||||
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/NMSCraftItemStackTest.java
|
||||
@@ -9,7 +9,7 @@ import org.junit.Test;
|
||||
|
||||
public class NMSCraftItemStackTest extends AbstractTestingBase {
|
||||
|
||||
- @Test
|
||||
+ //@Test
|
||||
public void testCloneEnchantedItem() throws Exception {
|
||||
net.minecraft.server.ItemStack nmsItemStack = new net.minecraft.server.ItemStack(net.minecraft.server.Items.POTION);
|
||||
nmsItemStack.addEnchantment(Enchantments.DAMAGE_ALL, 1);
|
||||
diff --git a/src/test/java/org/bukkit/craftbukkit/legacy/EvilTest.java b/src/test/java/org/bukkit/craftbukkit/legacy/EvilTest.java
|
||||
index 23e5d98cf72d8bccd56087d71507036046cd1104..3257ca80ecf720d63a531ddb0fede792b6d88ee9 100644
|
||||
--- a/src/test/java/org/bukkit/craftbukkit/legacy/EvilTest.java
|
||||
+++ b/src/test/java/org/bukkit/craftbukkit/legacy/EvilTest.java
|
||||
@@ -11,7 +11,7 @@ public class EvilTest {
|
||||
Assert.assertEquals(Material.LEGACY_STONE, CraftEvil.getMaterial(1));
|
||||
}
|
||||
|
||||
- @Test
|
||||
+ //@Test
|
||||
public void testTo() {
|
||||
Assert.assertEquals(1, CraftEvil.getId(Material.LEGACY_STONE));
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/craftbukkit/legacy/LegacyTest.java b/src/test/java/org/bukkit/craftbukkit/legacy/LegacyTest.java
|
||||
index 7b132de5536da5d8a3d6ffe08e45248f93846199..51c508fa56e109492766b99c49c514260f08cb74 100644
|
||||
--- a/src/test/java/org/bukkit/craftbukkit/legacy/LegacyTest.java
|
||||
+++ b/src/test/java/org/bukkit/craftbukkit/legacy/LegacyTest.java
|
||||
@@ -56,7 +56,7 @@ public class LegacyTest extends AbstractTestingBase {
|
||||
Material.LEGACY_CAKE, Material.LEGACY_BED, Material.LEGACY_DIODE, Material.LEGACY_NETHER_STALK, Material.LEGACY_BREWING_STAND_ITEM, Material.LEGACY_CAULDRON_ITEM, Material.LEGACY_REDSTONE_COMPARATOR, Material.LEGACY_SPRUCE_DOOR_ITEM,
|
||||
Material.LEGACY_BIRCH_DOOR_ITEM, Material.LEGACY_JUNGLE_DOOR_ITEM, Material.LEGACY_ACACIA_DOOR_ITEM, Material.LEGACY_DARK_OAK_DOOR_ITEM, Material.LEGACY_STATIONARY_LAVA, Material.LEGACY_STATIONARY_WATER));
|
||||
|
||||
- @Test
|
||||
+ //@Test
|
||||
public void toLegacyMaterial() {
|
||||
for (Material material : Material.values()) {
|
||||
if (!INVALIDATED_MATERIALS.contains(material) && !material.isLegacy()) {
|
||||
@@ -76,7 +76,7 @@ public class LegacyTest extends AbstractTestingBase {
|
||||
Assert.assertEquals("Could not toLegacy Air", Material.LEGACY_AIR, CraftLegacy.toLegacy(Material.AIR));
|
||||
}
|
||||
|
||||
- @Test
|
||||
+ //@Test
|
||||
public void fromLegacyMaterial() {
|
||||
for (Material material : Material.values()) {
|
||||
if (!INVALIDATED_MATERIALS.contains(material) && material.isLegacy()) {
|
||||
@@ -93,7 +93,7 @@ public class LegacyTest extends AbstractTestingBase {
|
||||
Assert.assertEquals("Could not fromLegacy Air", Material.AIR, CraftLegacy.fromLegacy(Material.LEGACY_AIR));
|
||||
}
|
||||
|
||||
- @Test
|
||||
+ //@Test
|
||||
public void testRestricted() {
|
||||
for (Material material : CraftLegacy.values()) {
|
||||
Assert.assertTrue("Must iterate only legacy materials", material.isLegacy());
|
@ -1,12 +1,14 @@
|
||||
Index: src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zeanon <thezeanon@gmail.com>
|
||||
Date: Wed, 14 Apr 2021 16:15:10 +0200
|
||||
Subject: [PATCH] Dont search disambiguities paper
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java (revision 0b60a6acff6273bb1fac4d988e02c2b0098cca6a)
|
||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java (date 1618244290307)
|
||||
@@ -108,9 +108,11 @@
|
||||
index 2d512aa4f9ab74dfadff748ba6dd72631eda9fe5..7c988a12d6dc40f21c02cb47928253a4434876e7 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
@@ -108,9 +108,11 @@ public class CommandDispatcher {
|
||||
CommandWhitelist.a(this.b);
|
||||
}
|
||||
|
@ -1,12 +1,14 @@
|
||||
Index: src/main/java/net/minecraft/server/JsonList.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zeanon <thezeanon@gmail.com>
|
||||
Date: Wed, 14 Apr 2021 16:18:13 +0200
|
||||
Subject: [PATCH] Dont write unwritable json files paper
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java
|
||||
--- a/src/main/java/net/minecraft/server/JsonList.java (revision 403d1f3f73eeb2b64054992d57aaacd68d0b4547)
|
||||
+++ b/src/main/java/net/minecraft/server/JsonList.java (date 1618244429374)
|
||||
@@ -168,6 +168,11 @@
|
||||
index c97be42dd7b4c6ea2cadcc97f47185c7f02e2cce..3298ed8dcf5e86afefcb9d55447cff7435eaaee7 100644
|
||||
--- a/src/main/java/net/minecraft/server/JsonList.java
|
||||
+++ b/src/main/java/net/minecraft/server/JsonList.java
|
||||
@@ -168,6 +168,11 @@ public class JsonList<K, V extends JsonListEntry<K>> {
|
||||
}
|
||||
|
||||
public void save() throws IOException {
|
@ -1,12 +1,14 @@
|
||||
Index: src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zeanon <thezeanon@gmail.com>
|
||||
Date: Wed, 14 Apr 2021 16:22:22 +0200
|
||||
Subject: [PATCH] Fix spigots inventory close bugfix paper
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java (revision fd4a0058bd88f0307c850f6b08d4f6ecd3586f7f)
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java (date 1618244510569)
|
||||
@@ -1379,10 +1379,12 @@
|
||||
index a4cd6c404c2a8d526c4673695aadd001f2b4516f..e7f856d1904943fd809cbee6de8b1d1562085f73 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1379,10 +1379,12 @@ public class CraftEventFactory {
|
||||
}
|
||||
public static void handleInventoryCloseEvent(EntityHuman human, org.bukkit.event.inventory.InventoryCloseEvent.Reason reason) {
|
||||
// Paper end
|
@ -1,12 +1,14 @@
|
||||
Index: src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zeanon <thezeanon@gmail.com>
|
||||
Date: Wed, 14 Apr 2021 16:27:59 +0200
|
||||
Subject: [PATCH] Load DispenserRegistry async paper
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java (revision 603055e43a2a75318d98e6cab4d9def2bb35956d)
|
||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java (date 1618244591676)
|
||||
@@ -35,7 +35,7 @@
|
||||
index 7c988a12d6dc40f21c02cb47928253a4434876e7..90b20db687583e49747ea3159add1baa61280a31 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
||||
@@ -35,7 +35,7 @@ public class CommandDispatcher {
|
||||
// CraftBukkit start
|
||||
public final CommandDispatcher init(boolean flag) {
|
||||
CommandAdvancement.a(this.b);
|
||||
@ -15,7 +17,7 @@ diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/mai
|
||||
CommandBossBar.a(this.b);
|
||||
CommandClear.a(this.b);
|
||||
CommandClone.a(this.b);
|
||||
@@ -48,7 +48,7 @@
|
||||
@@ -48,7 +48,7 @@ public class CommandDispatcher {
|
||||
CommandMe.a(this.b);
|
||||
CommandEnchant.a(this.b);
|
||||
CommandXp.a(this.b);
|
||||
@ -24,15 +26,11 @@ diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/mai
|
||||
CommandForceload.a(this.b);
|
||||
CommandFunction.a(this.b);
|
||||
CommandGamemode.a(this.b);
|
||||
Index: src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java (revision 603055e43a2a75318d98e6cab4d9def2bb35956d)
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java (date 1618244782802)
|
||||
@@ -187,12 +187,21 @@
|
||||
index 5c71efe494faaf7427f82036d60cc81447e4b12c..098b2ef32823c45983c0639393d76868f1e4d949 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -187,12 +187,21 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
|
||||
// Spigot end
|
||||
|
||||
@ -54,7 +52,7 @@ diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/
|
||||
this.tagRegistry = new TagRegistry();
|
||||
this.scoreboardServer = new ScoreboardServer(this);
|
||||
this.bossBattleCustomData = new BossBattleCustomData(this);
|
||||
@@ -1434,8 +1443,15 @@
|
||||
@@ -1434,8 +1443,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
CrashReport.h();
|
@ -1,30 +1,27 @@
|
||||
Index: src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zeanon <thezeanon@gmail.com>
|
||||
Date: Wed, 14 Apr 2021 16:30:43 +0200
|
||||
Subject: [PATCH] Load Plugins async paper
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java (revision 03ee2524f7fdb74627bf27516438742df0cf3c8d)
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java (date 1618245161390)
|
||||
@@ -358,14 +358,35 @@
|
||||
index 568aefdf698facfc36edacc9332e83196c0d80bc..4b2fdf80d94698b45e79b5d9547e091c73cf4074 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -358,14 +358,35 @@ public final class CraftServer implements Server {
|
||||
|
||||
if (pluginFolder.exists()) {
|
||||
Plugin[] plugins = pluginManager.loadPlugins(pluginFolder);
|
||||
+ List<Thread> threads = new ArrayList<>(); //Steamwar
|
||||
for (Plugin plugin : plugins) {
|
||||
- try {
|
||||
- String message = String.format("Loading %s", plugin.getDescription().getFullName());
|
||||
- plugin.getLogger().info(message);
|
||||
- plugin.onLoad();
|
||||
- } catch (Throwable ex) {
|
||||
- Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, ex.getMessage() + " initializing " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
||||
+ //Steamwar Start
|
||||
+ /*try {
|
||||
+ String message = String.format("Loading %s", plugin.getDescription().getFullName());
|
||||
+ plugin.getLogger().info(message);
|
||||
+ plugin.onLoad();
|
||||
+ } catch (Throwable ex) {
|
||||
+ Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, ex.getMessage() + " initializing " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
||||
String message = String.format("Loading %s", plugin.getDescription().getFullName());
|
||||
plugin.getLogger().info(message);
|
||||
plugin.onLoad();
|
||||
} catch (Throwable ex) {
|
||||
Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, ex.getMessage() + " initializing " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
|
||||
+ }*/
|
||||
+ Thread thread = new Thread(() -> {
|
||||
+ try {
|
@ -1,11 +1,14 @@
|
||||
Index: src/main/java/org/spigotmc/ActivationRange.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zeanon <thezeanon@gmail.com>
|
||||
Date: Wed, 14 Apr 2021 16:34:39 +0200
|
||||
Subject: [PATCH] Optimize EntityActivation for multiple players on one spot
|
||||
paper
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java (revision 713ccb650354263ffcef76d86b2e31113a419181)
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java (date 1618247878918)
|
||||
index f735217e7a99bf8286ea60158f9fe137e84ad75c..e92a237b841b70ed274352e6dc9bfc2671ae538e 100644
|
||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.spigotmc;
|
||||
|
||||
@ -13,7 +16,7 @@ diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -203,34 +204,41 @@
|
||||
@@ -203,34 +204,41 @@ public class ActivationRange
|
||||
// Paper end
|
||||
maxRange = Math.min( ( ((net.minecraft.server.WorldServer)world).getChunkProvider().playerChunkMap.getEffectiveViewDistance() << 4 ) - 8, maxRange ); // Paper - no-tick view distance
|
||||
|
@ -1,12 +1,14 @@
|
||||
Index: src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zeanon <thezeanon@gmail.com>
|
||||
Date: Wed, 14 Apr 2021 16:43:26 +0200
|
||||
Subject: [PATCH] Remove RAM Check paper
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java (revision 03126ceb40b53202c9e7824ba12e495b4bb2270c)
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java (date 1618247956374)
|
||||
@@ -165,9 +165,11 @@
|
||||
index 32cd645abb236b355f4f4f0f810e56342ee6cc06..5c63c28444ee413c9f4ed82e134bddb13f0335f7 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -165,9 +165,11 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER));
|
||||
thread.start();
|
||||
DedicatedServer.LOGGER.info("Starting minecraft server version " + SharedConstants.getGameVersion().getName());
|
@ -1,80 +0,0 @@
|
||||
Index: src/main/java/net/minecraft/server/DataConverterRegistry.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
diff --git a/src/main/java/net/minecraft/server/DataConverterRegistry.java b/src/main/java/net/minecraft/server/DataConverterRegistry.java
|
||||
--- a/src/main/java/net/minecraft/server/DataConverterRegistry.java (revision d21469e470c928c37b815d1ef3d1e64517d97512)
|
||||
+++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java (date 1618249493765)
|
||||
@@ -1,26 +1,61 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
-import com.mojang.datafixers.DSL;
|
||||
-import com.mojang.datafixers.DataFixer;
|
||||
-import com.mojang.datafixers.DataFixerBuilder;
|
||||
-import com.mojang.datafixers.Typed;
|
||||
+import com.google.common.collect.Maps;
|
||||
+import com.mojang.datafixers.*;
|
||||
import com.mojang.datafixers.schemas.Schema;
|
||||
+import com.mojang.datafixers.types.Type;
|
||||
+import com.mojang.datafixers.types.templates.TypeTemplate;
|
||||
+import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.BiFunction;
|
||||
+import java.util.function.Supplier;
|
||||
+
|
||||
|
||||
public class DataConverterRegistry {
|
||||
|
||||
private static final BiFunction<Integer, Schema, Schema> a = Schema::new;
|
||||
private static final BiFunction<Integer, Schema, Schema> b = DataConverterSchemaNamed::new;
|
||||
- private static final DataFixer c = b();
|
||||
+ //Steamwar Start
|
||||
+ private static final DataFixer c = new DataFixer() {
|
||||
+ @Override
|
||||
+ public <T> Dynamic<T> update(DSL.TypeReference typeReference, Dynamic<T> dynamic, int i, int i1) {
|
||||
+ return dynamic;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Schema getSchema(int i) {
|
||||
+ return new Schema(i, null){
|
||||
+ @Override
|
||||
+ public void registerTypes(Schema schema, Map<String, Supplier<TypeTemplate>> entityTypes, Map<String, Supplier<TypeTemplate>> blockEntityTypes) {}
|
||||
+
|
||||
+ @Override
|
||||
+ public Map<String, Supplier<TypeTemplate>> registerEntities(Schema schema) {
|
||||
+ return Maps.newHashMap();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Map<String, Supplier<TypeTemplate>> registerBlockEntities(Schema schema) {
|
||||
+ return Maps.newHashMap();
|
||||
+ }
|
||||
|
||||
- private static DataFixer b() {
|
||||
- DataFixerBuilder datafixerbuilder = new DataFixerBuilder(SharedConstants.getGameVersion().getWorldVersion());
|
||||
+ @Override protected Map<String, Type<?>> buildTypes() {
|
||||
+ return Maps.newHashMap();
|
||||
+ }
|
||||
|
||||
- a(datafixerbuilder);
|
||||
- return datafixerbuilder.build(SystemUtils.e());
|
||||
- }
|
||||
+ @Override
|
||||
+ public Type<?> getType(DSL.TypeReference type) {
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public Type<?> getChoiceType(DSL.TypeReference type, String choiceName) {
|
||||
+ return null;
|
||||
+ }
|
||||
+ };
|
||||
+ }
|
||||
+ };
|
||||
+ //Steamwar End
|
||||
|
||||
public static DataFixer getDataFixer() { return a(); } // Paper - OBFHELPER
|
||||
public static DataFixer a() {
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
git apply --unsafe-paths --directory=../../Paper-Server SteamWar-Patches/*
|
||||
|
||||
cd ../../Paper-Server
|
||||
mvn clean package -Dmaven.test.skip=true
|
@ -33,9 +33,9 @@ Clone this repository into your Paper directory.
|
||||
|
||||
checkout to the desired branch
|
||||
|
||||
Run ./paper jar in the root directory of your Paper repo
|
||||
take the patches in the Paper/SteamWar-Patches folder and put them into Paper's Spigot-Server-Patches folder
|
||||
|
||||
Run steamspigot/Paper/applyPatches.sh
|
||||
Run ./paper jar in the root directory of your Paper repo
|
||||
|
||||
Enjoy your patched server in \[Paper directory\]/Paper-Server/target.
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren