Skip to content

Commit

Permalink
Step 2, put Dreeam into ice cream
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreeam-qwq committed Dec 13, 2024
1 parent b2300f0 commit f6287a8
Show file tree
Hide file tree
Showing 15 changed files with 116 additions and 1,933 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ From: nostalgic853 <yuu8583@proton.me>
Date: Tue, 25 Oct 2022 00:57:45 +0800
Subject: [PATCH] Carpet-Fixes: Use optimized RecipeManager

Removed since Leaf / MC 1.21.3

This patch is based on the following mixin:
"carpetfixes/mixins/optimizations/RecipeManager_fasterMixin.java"
By: fxmorin <28154542+fxmorin@users.noreply.github.com>
Expand Down
75 changes: 75 additions & 0 deletions patches/server/0014-Remove-Timings.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Sat, 23 Sep 2023 03:12:14 -0400
Subject: [PATCH] Remove Timings

Completely remove the Timings, since it wastes too much performance. Use Spark instead.

diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java b/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
index 7ce9ebba8ce304d1f3f21d4f15ee5f3560d7700b..a1c9726d25479b5326fe2fa2b0f5a98d6b2da4c5 100644
--- a/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperEventManager.java
@@ -1,6 +1,5 @@
package io.papermc.paper.plugin.manager;

-import co.aikar.timings.TimedEventExecutor;
import com.destroystokyo.paper.event.server.ServerExceptionEvent;
import com.destroystokyo.paper.exception.ServerEventException;
import com.google.common.collect.Sets;
@@ -95,7 +94,6 @@ class PaperEventManager {
throw new IllegalPluginAccessException("Plugin attempted to register " + event + " while not enabled");
}

- executor = new TimedEventExecutor(executor, plugin, null, event);
this.getEventListeners(event).register(new RegisteredListener(listener, executor, priority, plugin, ignoreCancelled));
}

@@ -182,7 +180,7 @@ class PaperEventManager {
}
}

- EventExecutor executor = new TimedEventExecutor(EventExecutor.create(method, eventClass), plugin, method, eventClass);
+ EventExecutor executor = EventExecutor.create(method, eventClass);
eventSet.add(new RegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled()));
}
return ret;
diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java
index 097500a59336db1bbfffcd1aa4cff7a8586e46ec..f06076864582ed153c6154fd7f3e9101bf21c4ac 100644
--- a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java
+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginManagerImpl.java
@@ -232,7 +232,7 @@ public class PaperPluginManagerImpl implements PluginManager, DependencyContext

@Override
public boolean useTimings() {
- return co.aikar.timings.Timings.isTimingsEnabled();
+ return false; // Leaf - Remove Timings
}

@Override
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a7a8273a21434fc04b01d06708b65e80487a95d3..2550e0e4e40eccb6e01cd0b8287358c105abaebf 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -3,7 +3,6 @@ package net.minecraft.server;
import com.google.common.base.Preconditions;
import com.google.common.base.Splitter;
import com.google.common.collect.ImmutableList;
-import co.aikar.timings.Timings;
import com.destroystokyo.paper.event.server.PaperServerListPingEvent;
import com.google.common.base.Stopwatch;
import com.google.common.collect.Lists;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index ef8041877456316fc32a382e28ee81161d962353..b4986e322cb05ad6f98bbf5eee2b571c67e4d9d3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1047,10 +1047,8 @@ public final class CraftServer implements Server {
commands.performCommand(results, commandLine, commandLine, true);
} catch (CommandException ex) {
this.pluginManager.callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper
- //target.timings.stopTiming(); // Spigot // Paper
throw ex;
} catch (Throwable ex) {
- //target.timings.stopTiming(); // Spigot // Paper
String msg = "Unhandled exception executing '" + commandLine + "' in " + target;
this.pluginManager.callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new com.destroystokyo.paper.exception.ServerCommandException(ex, target, sender, args))); // Paper
throw new CommandException(msg, ex);
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,10 @@ Subject: [PATCH] Bump Dependencies
TODO - Dreeam: Bump & test dependencies, impl new features?

diff --git a/build.gradle.kts b/build.gradle.kts
index d1bcbd39120480b2e1e402040d20b8567019a4b0..47ade0d7de17d2ad306b1f872d9399edcc295cf2 100644
index 3b0cd45cb07d9563c84901729f1f7edc498653bd..c35ffb8565218d9368cc583ae96ea86424184eed 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -22,7 +22,7 @@ dependencies {
// Leaf end - Leaf Config

// Paper start
- implementation("org.jline:jline-terminal-jansi:3.21.0")
+ implementation("org.jline:jline-terminal-jansi:3.27.1") // Leaf - Bump Dependencies
implementation("net.minecrell:terminalconsoleappender:1.3.0")
implementation("net.kyori:adventure-text-serializer-ansi:4.17.0") // Keep in sync with adventureVersion from Paper-API build file
/*
@@ -31,28 +31,32 @@ dependencies {
@@ -44,28 +44,32 @@ dependencies {
all its classes to check if they are plugins.
Scanning takes about 1-2 seconds so adding this speeds up the server start.
*/
Expand All @@ -38,12 +29,11 @@ index d1bcbd39120480b2e1e402040d20b8567019a4b0..47ade0d7de17d2ad306b1f872d9399ed
implementation("org.ow2.asm:asm-commons:9.7.1")
implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
implementation("commons-lang:commons-lang:2.6")
- runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
- runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
- runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
- runtimeOnly("org.xerial:sqlite-jdbc:3.46.1.3")
+ runtimeOnly("org.xerial:sqlite-jdbc:3.47.1.0") // Leaf - Bump Dependencies
+ runtimeOnly("com.mysql:mysql-connector-j:9.1.0") // Leaf - Bump Dependencies
+ runtimeOnly("com.lmax:disruptor:3.4.4") // Paper // Leaf - Bump Dependencies // Dreeam TODO - Waiting Log4j 3.x to support disruptor 4.0.0
runtimeOnly("com.mysql:mysql-connector-j:9.1.0")
- runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
+ runtimeOnly("com.lmax:disruptor:3.4.4") // Paper // Dreeam TODO - Waiting Log4j 3.x to support disruptor 4.0.0
// Paper start - Use Velocity cipher
- implementation("com.velocitypowered:velocity-native:3.3.0-SNAPSHOT") {
+ implementation("com.velocitypowered:velocity-native:3.4.0-SNAPSHOT") { // Leaf - Bump Dependencies
Expand All @@ -62,7 +52,7 @@ index d1bcbd39120480b2e1e402040d20b8567019a4b0..47ade0d7de17d2ad306b1f872d9399ed

// Purpur start
implementation("org.mozilla:rhino-runtime:1.7.15")
@@ -60,13 +64,13 @@ dependencies {
@@ -73,14 +77,16 @@ dependencies {
implementation("dev.omega24:upnp4j:1.0")
// Purpur end

Expand All @@ -71,18 +61,22 @@ index d1bcbd39120480b2e1e402040d20b8567019a4b0..47ade0d7de17d2ad306b1f872d9399ed
- testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0")
- testImplementation("org.hamcrest:hamcrest:2.2")
- testImplementation("org.mockito:mockito-core:5.14.1")
+ testImplementation("io.github.classgraph:classgraph:4.8.179") // Paper - mob goal test // Leaf - Bump Dependencies
+ testImplementation("org.junit.jupiter:junit-jupiter:5.11.3") // Leaf - Bump Dependencies
+ testImplementation("org.junit.platform:junit-platform-suite-engine:1.11.3") // Leaf - Bump Dependencies
- mockitoAgent("org.mockito:mockito-core:5.14.1") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions
+ // Leaf start - Bump Dependencies
+ testImplementation("io.github.classgraph:classgraph:4.8.179") // Paper - mob goal test
+ testImplementation("org.junit.jupiter:junit-jupiter:5.11.3")
+ testImplementation("org.junit.platform:junit-platform-suite-engine:1.11.3")
+ testImplementation("org.hamcrest:hamcrest:3.0")
+ testImplementation("org.mockito:mockito-core:5.14.2") // Leaf - Bump Dependencies
+ testImplementation("org.mockito:mockito-core:5.14.2")
+ mockitoAgent("org.mockito:mockito-core:5.14.2") { isTransitive = false } // Paper - configure mockito agent that is needed in newer java versions
testImplementation("org.ow2.asm:asm-tree:9.7.1")
- testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
+ testImplementation("org.junit-pioneer:junit-pioneer:2.3.0") // Paper - CartesianTest // Leaf - Bump Dependencies
+ testImplementation("org.junit-pioneer:junit-pioneer:2.3.0") // Paper - CartesianTest
+ // Leaf end - Bump Dependencies
implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling
implementation("net.neoforged:AutoRenamingTool:2.0.3") // Paper - remap plugins
// Paper start - Remap reflection
@@ -79,6 +83,8 @@ dependencies {
@@ -93,6 +99,8 @@ dependencies {
implementation("me.lucko:spark-api:0.1-20240720.200737-2")
implementation("me.lucko:spark-paper:1.10.119-SNAPSHOT")
// Paper end - spark
Expand All @@ -91,7 +85,7 @@ index d1bcbd39120480b2e1e402040d20b8567019a4b0..47ade0d7de17d2ad306b1f872d9399ed
}

paperweight {
@@ -276,3 +282,8 @@ sourceSets {
@@ -295,3 +303,8 @@ sourceSets {
}
}
// Gale end - package license into jar
Expand Down
Loading

0 comments on commit f6287a8

Please sign in to comment.