Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ public interface SlimeDataConverter {

CompoundBinaryTag convertChunkTo1_13(CompoundBinaryTag globalTag);

CompoundBinaryTag convertChunk(CompoundBinaryTag globalTag, int to);

List<CompoundBinaryTag> convertEntities(List<CompoundBinaryTag> input, int from, int to);
List<CompoundBinaryTag> convertTileEntities(List<CompoundBinaryTag> input, int from, int to);
ListBinaryTag convertBlockPalette(ListBinaryTag input, int from, int to);

int getServerVersion();
}
6 changes: 3 additions & 3 deletions aspaper-api/build.gradle.kts.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
dependencies {
+ api(project(":api")) //ASP
// api dependencies are listed transitively to API consumers
api("com.google.guava:guava:33.3.1-jre")
api("com.google.code.gson:gson:2.11.0")
api("com.google.guava:guava:33.5.0-jre")
api("com.google.code.gson:gson:2.13.2")
@@ -91,7 +_,7 @@
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.junit.platform:junit-platform-launcher:6.0.3")
}

-val generatedDir: java.nio.file.Path = layout.projectDirectory.dir("src/generated/java").asFile.toPath()
Expand Down
25 changes: 15 additions & 10 deletions aspaper-server/build.gradle.kts.patch
Original file line number Diff line number Diff line change
@@ -1,24 +1,29 @@
--- a/paper-server/build.gradle.kts
+++ b/paper-server/build.gradle.kts
@@ -22,6 +_,17 @@
@@ -22,9 +_,20 @@
minecraftVersion = providers.gradleProperty("mcVersion")
gitFilePatches = false

- updatingMinecraft {
- // oldPaperCommit = "7e80cef5198561d0db53406127e5b8bc7af51577"
+ val aspaper = forks.register("aspaper") {
+ upstream.patchDir("paperServer") {
+ upstreamPath = "paper-server"
+ excludes = setOf("src/minecraft", "patches", "build.gradle.kts")
+ patchesDir = rootDirectory.dir("aspaper-server/paper-patches")
+ outputDir = rootDirectory.dir("paper-server")
+ }
+ }
}
+
+ activeFork = aspaper
+
spigot {
enabled = true
buildDataRef = "17f77cee7117ab9d6175f088ae8962bfd04e61a9"
@@ -104,7 +_,19 @@
+// updatingMinecraft {
+// oldPaperCommit = "7e80cef5198561d0db53406127e5b8bc7af51577"
+// }
}

tasks.generateDevelopmentBundle {
@@ -86,7 +_,19 @@
}
}

Expand All @@ -39,17 +44,17 @@
configurations.named(log4jPlugins.compileClasspathConfigurationName) {
extendsFrom(configurations.compileClasspath.get())
}
@@ -127,7 +_,8 @@
@@ -109,7 +_,8 @@
}

dependencies {
- implementation(project(":paper-api"))
+ implementation(project(":aspaper-api")) //ASP
+ implementation(project(":core")) //ASP
implementation("ca.spottedleaf:concurrentutil:0.0.8")
implementation("ca.spottedleaf:concurrentutil:0.0.10")
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
implementation("org.jline:jline-terminal-jni:3.27.1") // fall back to jni on java 21
@@ -198,14 +_,14 @@
@@ -171,14 +_,14 @@
val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim()
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
Expand All @@ -69,7 +74,7 @@
"Build-Number" to (build ?: ""),
"Build-Time" to buildTime.toString(),
"Git-Branch" to gitBranch,
@@ -264,7 +_,7 @@
@@ -237,7 +_,7 @@
jvmArgumentProviders.add(provider)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,27 @@ Subject: [PATCH] Disable dragon battle


diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 24d3b1161cf45a915b37f510645500c5a45350eb..cd7aca9f76aef0824d94c73373a8f4536d05c4e8 100644
index c5415bcc157219d452e15e80d569df5df3043ba5..785e7784c8f6e2c29c7f363dd700e2bbd0fe15f4 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -715,7 +715,13 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
@@ -2,6 +2,7 @@ package net.minecraft.server.level;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Lists;
+import com.infernalsuite.asp.api.world.properties.SlimeProperty;
import com.mojang.datafixers.DataFixer;
import com.mojang.datafixers.util.Pair;
import com.mojang.logging.LogUtils;
@@ -741,7 +742,11 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
);
this.structureManager = new StructureManager(this, this.serverLevelData.worldGenOptions(), this.structureCheck); // CraftBukkit
if (this.dimension() == Level.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END) || env == org.bukkit.World.Environment.THE_END) { // CraftBukkit - Allow to create EnderDragonBattle in default and custom END
- this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenOptions().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit
+ // ASP START
+ if (bootstrap == null || bootstrap.initial().getPropertyMap().getValue(com.infernalsuite.asp.api.world.properties.SlimeProperties.DRAGON_BATTLE)) {
+ this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenOptions().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit
this.structureManager = new StructureManager(this, options, this.structureCheck);
if (this.dimensionType().hasEnderDragonFight()) {
- this.dragonFight = this.getDataStorage().computeIfAbsent(EnderDragonFight.TYPE);
+ if(bootstrap == null || bootstrap.initial().getPropertyMap().getValue(com.infernalsuite.asp.api.world.properties.SlimeProperties.DRAGON_BATTLE)) { // ASP - only create dragon fight if property is enabled)
+ this.dragonFight = this.getDataStorage().computeIfAbsent(EnderDragonFight.TYPE);
+ } else {
+ this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenOptions().seed(), new EndDragonFight.Data(false, true, true, false,Optional.empty(),Optional.empty(),Optional.empty())); // ASP - disable dragon
+ this.dragonFight = new EnderDragonFight(false, true, true, Optional.empty(), 0,Optional.empty(),Optional.empty(), List.of(), List.of());
+ }
+ // ASP END
} else {
this.dragonFight = null;
this.dragonFight.init(this, seed, BlockPos.ZERO);
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: David Mayr <davidliebtkekse@gmail.com>
Date: Wed, 12 Mar 2025 21:14:56 +0100
Subject: [PATCH] Prevent config disk io on world load


diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
index 58ed69b501daa445747050ae3c2532292bf2c386..c0873f9cec8b5877157b7f8803b617465cb0876b 100644
--- a/net/minecraft/server/level/ServerLevel.java
+++ b/net/minecraft/server/level/ServerLevel.java
@@ -659,7 +659,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ServerEntityGet
savedDataStorage.set(io.papermc.paper.world.saveddata.PaperWorldPDC.TYPE, loadedWorldData.pdc() == null ? io.papermc.paper.world.saveddata.PaperWorldPDC.TYPE.constructor().get() : loadedWorldData.pdc());
final GameRules gameRules = new GameRules(server.getWorldData().enabledFeatures(), savedDataStorage.computeIfAbsent(net.minecraft.world.level.gamerules.GameRuleMap.TYPE));
this.gameRules = gameRules;
- super(levelData, dimension, server.registryAccess(), levelStem.type(), false, isDebug, biomeZoomSeed, server.getMaxChainedNeighborUpdates(), loadedWorldData.bukkitName(), gen, biomeProvider, env, spigotConfig -> server.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(server.storageSource.getDimensionPath(dimension), dimension.identifier(), spigotConfig, server.registryAccess(), gameRules)), executor); // Paper - create paper world configs // Paper - Anti-Xray - Pass executor
+ super(levelData, dimension, server.registryAccess(), levelStem.type(), false, isDebug, biomeZoomSeed, server.getMaxChainedNeighborUpdates(), loadedWorldData.bukkitName(), gen, biomeProvider, env, spigotConfig -> bootstrap != null ? com.infernalsuite.asp.config.SlimePaperWorldConfig.initializeOrGet() : server.paperConfigurations.createWorldConfig(io.papermc.paper.configuration.PaperConfigurations.createWorldContextMap(server.storageSource.getDimensionPath(dimension), dimension.identifier(), spigotConfig, server.registryAccess(), gameRules)), executor); // Paper - create paper world configs // Paper - Anti-Xray - Pass executor //ASP - Optimize world config
this.weatherData = savedDataStorage.computeIfAbsent(WeatherData.TYPE);
this.weatherData.setLevel(this);
this.typeKey = typeKey;
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
index e34e901dce06c6bc6060418593010dcfb38e9396..e1fd30fc9b17d241c421c66114c9611b2979053e 100644
--- a/net/minecraft/world/level/Level.java
+++ b/net/minecraft/world/level/Level.java
@@ -849,7 +849,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
this.maxSectionY = this.maxY >> 4;
this.sectionsCount = this.maxSectionY - this.minSectionY + 1;
// Paper end - getblock optimisations - cache world height/sections
final org.bukkit.NamespacedKey worldKey = CraftNamespacedKey.fromMinecraft(dimension.identifier()); // Paper
- this.spigotConfig = new org.spigotmc.SpigotWorldConfig(bukkitName, worldKey); // Spigot
+ this.spigotConfig = new org.spigotmc.SpigotWorldConfig(bukkitName, CraftNamespacedKey.fromMinecraft(dimension.identifier()), !(this instanceof com.infernalsuite.asp.level.SlimeLevelInstance)); // Spigot //ASP - Improve Slime IO
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
this.generator = generator;
this.world = new CraftWorld((ServerLevel) this, generator, biomeProvider, environment);

This file was deleted.

This file was deleted.

Loading