13
0
geforkt von Mirrors/Paper

Merge pull request 'Deoptimize Paper to fix everything' (#18) from update into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #18
Dieser Commit ist enthalten in:
Lixfel 2024-12-01 21:47:00 +01:00
Commit fba0c98991
3 geänderte Dateien mit 4 neuen und 90 gelöschten Zeilen

Datei anzeigen

@ -1,59 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lixfel <agga-games@gmx.de>
Date: Sat, 27 Aug 2022 09:00:08 +0200
Subject: [PATCH] SW Initialisation improvements
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 7e4f7cb2afbc145e532285c793573ad107bc3033..d5931454d3022b2e55e2e0f4f66edd470d24a3ee 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -205,47 +205,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
Class<?> result = classes.get(name);
if (result == null) {
- String path = name.replace('.', '/').concat(".class");
- JarEntry entry = jar.getJarEntry(path);
-
- if (entry != null) {
- byte[] classBytes;
-
- try (InputStream is = jar.getInputStream(entry)) {
- classBytes = ByteStreams.toByteArray(is);
- } catch (IOException ex) {
- throw new ClassNotFoundException(name, ex);
- }
-
- classBytes = org.bukkit.Bukkit.getServer().getUnsafe().processClass(description, path, classBytes); // Paper
-
- int dot = name.lastIndexOf('.');
- if (dot != -1) {
- String pkgName = name.substring(0, dot);
- if (getPackage(pkgName) == null) {
- try {
- if (manifest != null) {
- definePackage(pkgName, manifest, url);
- } else {
- definePackage(pkgName, null, null, null, null, null, null, null);
- }
- } catch (IllegalArgumentException ex) {
- if (getPackage(pkgName) == null) {
- throw new IllegalStateException("Cannot find package " + pkgName);
- }
- }
- }
- }
-
- CodeSigner[] signers = entry.getCodeSigners();
- CodeSource source = new CodeSource(url, signers);
-
- result = defineClass(name, classBytes, 0, classBytes.length, source);
- }
-
- if (result == null) {
- result = super.findClass(name);
- }
+ result = super.findClass(name);
classes.put(name, result);
this.setClass(name, result); // Paper

Datei anzeigen

@ -76,10 +76,10 @@ index c038da20b76c0b7b1c18471b20be01e849d29f3a..f5611bf250aaa2851ca8873291c7f4b6
try {
StoredUserList.GSON.toJson(jsonarray, StoredUserList.GSON.newJsonWriter(bufferedwriter));
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index cac8592e3a2f438fe9ca167a4fdcd65152bbb2de..0e6589655d6a6c5e0fd1f96735803c386bebe3b0 100644
index ac8af406180bc680d46e8edc3da0fc2e5211345a..63752016506cd84bad39eaec14a7756bf06f608b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -505,7 +505,7 @@ public final class CraftServer implements Server {
@@ -517,7 +517,7 @@ public final class CraftServer implements Server {
try {
this.configuration.save(this.getConfigFile());
} catch (IOException ex) {
@ -88,7 +88,7 @@ index cac8592e3a2f438fe9ca167a4fdcd65152bbb2de..0e6589655d6a6c5e0fd1f96735803c38
}
}
@@ -513,7 +513,7 @@ public final class CraftServer implements Server {
@@ -525,7 +525,7 @@ public final class CraftServer implements Server {
try {
this.commandsConfiguration.save(this.getCommandsConfigFile());
} catch (IOException ex) {
@ -97,7 +97,7 @@ index cac8592e3a2f438fe9ca167a4fdcd65152bbb2de..0e6589655d6a6c5e0fd1f96735803c38
}
}
@@ -603,7 +603,7 @@ public final class CraftServer implements Server {
@@ -615,7 +615,7 @@ public final class CraftServer implements Server {
DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions();
if (!io.papermc.paper.configuration.GlobalConfiguration.get().misc.loadPermissionsYmlBeforePlugins) this.loadCustomPermissions(); // Paper

Datei anzeigen

@ -4,33 +4,6 @@ Date: Tue, 13 Aug 2024 11:45:21 +0200
Subject: [PATCH] SW optimized Blocks cache
diff --git a/src/main/java/net/minecraft/world/level/block/Blocks.java b/src/main/java/net/minecraft/world/level/block/Blocks.java
index 66a07f7cbf1c1d6ecbe055cbf4f63eb07d93e90c..7c575af374aff20e7fc4ca2aaf2bdf25dbd4526b 100644
--- a/src/main/java/net/minecraft/world/level/block/Blocks.java
+++ b/src/main/java/net/minecraft/world/level/block/Blocks.java
@@ -1,7 +1,10 @@
package net.minecraft.world.level.block;
+import java.util.concurrent.ExecutorService;
import java.util.function.Function;
import java.util.function.ToIntFunction;
+import net.minecraft.Util;
+import javax.annotation.Nullable;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.core.Registry;
@@ -6897,8 +6900,10 @@ public class Blocks {
for (Block block : BuiltInRegistries.BLOCK) {
for (BlockState blockState : block.getStateDefinition().getPossibleStates()) {
Block.BLOCK_STATE_REGISTRY.add(blockState);
- blockState.initCache();
+ //blockState.initCache();
}
+
+ //block.getLootTable();
}
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
index 99fd67a78539133adf78d65e2c520ff3dd260301..0f077ce5b3ce5a5c9fa149a9bce6035070eb98dd 100644
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java