Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
java-version: '25'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Configure Git User Details
Expand Down
4 changes: 2 additions & 2 deletions build-data/buildSrc.build.gradle.kts.patch
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
--- a/buildSrc/build.gradle.kts
+++ b/buildSrc/build.gradle.kts
@@ -8,6 +_,7 @@
@@ -9,6 +_,7 @@
mavenLocal()
mavenCentral()
gradlePluginPortal()
+ maven("https://repo.papermc.io/repository/maven-public/")
}

fun convertPlugin(plugin: Provider<PluginDependency>): String {
@@ -22,7 +_,7 @@
@@ -23,7 +_,7 @@
implementation(convertPlugin(libs.plugins.profiles))
implementation(convertPlugin(libs.plugins.kotlin.jvm))
implementation(convertPlugin(libs.plugins.lombok))
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ subprojects {

extensions.configure<JavaPluginExtension> {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
languageVersion = JavaLanguageVersion.of(25)
}
}

Expand All @@ -106,7 +106,7 @@ subprojects {
}
tasks.withType<JavaCompile> {
options.encoding = Charsets.UTF_8.name()
options.release = 21
options.release = 25
options.isFork = true
}
tasks.withType<Javadoc> {
Expand Down
9 changes: 5 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
group=com.legitimoose.legitslimepaper
version=1.21.10-R0.1-SNAPSHOT
mcVersion=1.21.10
version=26.1.2.build.61-stable
mcVersion=26.1.2

#Update with ASP!! (also update gradle/libs.versions.toml)
aspRef=cd28d91fa92818b296ad914b584f9aae911e4045
apiVersion=4.2.0-SNAPSHOT
aspRef=2e69d9f6e20da479e8a3edea0a57ce1a16888fe7
apiVersion=26.1.2
aspApiVersion=4.2.0-SNAPSHOT

org.gradle.caching=true
org.gradle.parallel=true
Expand Down
10 changes: 5 additions & 5 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[versions]
adventure = "4.24.0"
annotations = "26.0.1"
adventure = "4.26.1"
annotations = "1.0.0"
autoservice = "1.1.1"
blossom = "2.1.0"
bstats = "3.1.0"
cloud-core = "2.0.0"
cloud-minecraft = "2.0.0-beta.10"
cloud-minecraft = "2.0.0-SNAPSHOT"
configurate = "4.1.2"
indra-git = "3.1.3"
gradle-profiles = "0.54.0"
Expand All @@ -15,7 +15,7 @@ lettuce = "6.5.1.RELEASE"
lombok = "1.18.36"
lombok-plugin = "8.11"
mongo = "5.2.1"
paperweight = "2.0.0-beta.18"
paperweight = "2.0.0-SNAPSHOT"
plugin-yml-paper = "0.6.0"
shadow = "9.2.2"
slf4j = "2.0.16"
Expand All @@ -33,7 +33,7 @@ shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }

[libraries]
adventure-nbt = { module = "net.kyori:adventure-nbt", version.ref = "adventure" }
annotations = { module = "org.jetbrains:annotations", version.ref = "annotations" }
annotations = { module = "org.jspecify:jspecify", version.ref = "annotations" }
auto-service = { module = "com.google.auto.service:auto-service", version.ref = "autoservice" }
auto-service-annotations = { module = "com.google.auto.service:auto-service-annotations", version.ref = "autoservice" }
bstats = { module = "org.bstats:bstats-bukkit", version.ref = "bstats" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion legitslimepaper-api/build.gradle.kts.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/aspaper-api/build.gradle.kts
+++ b/aspaper-api/build.gradle.kts
@@ -101,17 +_,21 @@
@@ -103,17 +_,21 @@
java {
srcDir(generatedDir)
srcDir(file("../paper-api/src/main/java"))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
--- a/src/main/java/com/infernalsuite/asp/SlimeNMSBridgeImpl.java
+++ b/src/main/java/com/infernalsuite/asp/SlimeNMSBridgeImpl.java
@@ -79,8 +_,10 @@
@@ -80,9 +_,11 @@
// See MinecraftServer loading logic
// Some stuff is needed when loading overworld world
SlimeLevelInstance instance = ((SlimeInMemoryWorld) this.loadInstance(defaultWorld, Level.OVERWORLD)).getInstance();
DimensionDataStorage worldpersistentdata = instance.getDataStorage();
+ instance.getServer().readScoreboard(worldpersistentdata); // Moose
- SavedDataStorage worldpersistentdata = instance.getDataStorage();
+ SavedDataStorage worldpersistentdata = instance.getServer().getDataStorage(); // Moose - Ensure vanilla behavior
+ instance.getServer().getScoreboard().load(worldpersistentdata.computeIfAbsent(net.minecraft.world.scores.ScoreboardSaveData.TYPE).getData()); // Moose
instance.getCraftServer().scoreboardManager = new org.bukkit.craftbukkit.scoreboard.CraftScoreboardManager(instance.getServer(), instance.getScoreboard());
instance.getServer().commandStorage = new CommandStorage(worldpersistentdata);
+ instance.getServer().worldData = instance.serverLevelData; // Moose - Set default spawn location correctly (and prob more)
+// instance.getServer().worldData = instance.serverLevelData; // Moose - Set default spawn location correctly (and prob more)

return true;
}
Original file line number Diff line number Diff line change
@@ -1,40 +1,52 @@
--- a/src/main/java/com/infernalsuite/asp/level/SlimeLevelInstance.java
+++ b/src/main/java/com/infernalsuite/asp/level/SlimeLevelInstance.java
@@ -68,16 +_,10 @@
public static LevelStorageSource CUSTOM_LEVEL_STORAGE;
@@ -46,10 +_,7 @@
import net.minecraft.world.level.gamerules.GameRules;
import net.minecraft.world.level.levelgen.WorldGenSettings;
import net.minecraft.world.level.levelgen.WorldOptions;
-import net.minecraft.world.level.storage.LevelData;
-import net.minecraft.world.level.storage.LevelResource;
-import net.minecraft.world.level.storage.LevelStorageSource;
-import net.minecraft.world.level.storage.PrimaryLevelData;
+import net.minecraft.world.level.storage.*;
import net.minecraft.world.level.validation.DirectoryValidator;
import org.apache.commons.io.FileUtils;
import org.bukkit.Bukkit;
@@ -80,17 +_,9 @@
private static final Logger LOGGER = LogUtils.getClassLogger();

static {
- try {
- Path path = Files.createTempDirectory("swm-" + UUID.randomUUID().toString().substring(0, 5)).toAbsolutePath();
- DirectoryValidator directoryvalidator = LevelStorageSource.parseValidator(path.resolve("allowed_symlinks.txt"));
- CUSTOM_LEVEL_STORAGE = new LevelStorageSource(path, path, directoryvalidator, DataFixers.getDataFixer());
- CUSTOM_LEVEL_STORAGE_ACCESS = new LevelStorageSource(path, path, directoryvalidator, DataFixers.getDataFixer())
- .createAccess("slime");
-
- FileUtils.forceDeleteOnExit(path.toFile());
-
- } catch (IOException ex) {
- throw new IllegalStateException("Couldn't create dummy file directory.", ex);
- }
+ // Moose start
+ Path path = MinecraftServer.getServer().server.getWorldContainer().toPath();
+ CUSTOM_LEVEL_STORAGE = LevelStorageSource.createDefault(path);
+ // Moose start - Ensure the data directory is mapped correctly
+ CUSTOM_LEVEL_STORAGE_ACCESS = MinecraftServer.getServer().storageSource;
+ // Moose end
}

private static final ExecutorService WORLD_SAVER_SERVICE = Executors.newFixedThreadPool(4, new ThreadFactoryBuilder()
@@ -91,7 +_,7 @@
org.bukkit.World.Environment environment) throws IOException {

super(slimeBootstrap, MinecraftServer.getServer(), MinecraftServer.getServer().executor,
- CUSTOM_LEVEL_STORAGE.createAccess(slimeBootstrap.initial().getName() + UUID.randomUUID(), dimensionKey),
+ CUSTOM_LEVEL_STORAGE.createAccess("dat_files", dimensionKey), // Moose
primaryLevelData, worldKey, worldDimension, false, 0,
Collections.emptyList(), true, null, environment, null, null);
@@ -139,7 +_,7 @@
environment,
null,
null,
- new ReadOnlyDimensionDataStorage(CUSTOM_LEVEL_STORAGE_ACCESS.getDimensionPath(dimensionKey), MinecraftServer.getServer().getFixerUpper(), MinecraftServer.getServer().registryAccess()),
+ new SavedDataStorage(CUSTOM_LEVEL_STORAGE_ACCESS.getDimensionPath(dimensionKey), MinecraftServer.getServer().getFixerUpper(), MinecraftServer.getServer().registryAccess()),
data
);
this.slimeInstance = new SlimeInMemoryWorld(slimeBootstrap, this);
@@ -169,6 +_,7 @@
@@ -213,6 +_,7 @@
Bukkit.getPluginManager().callEvent(new WorldSaveEvent(getWorld()));

//this.getChunkSource().save(forceSave);
+ this.getDataStorage().saveAndJoin(); // Moose
this.serverLevelData.setCustomBossEvents(MinecraftServer.getServer().getCustomBossEvents().save(MinecraftServer.getServer().registryAccess()));

+ this.getDataStorage().saveAndJoin();
if (MinecraftServer.getServer().isStopped()) { // Make sure the world gets saved before stopping the server by running it from the main thread
saveInternal().get(); // Async wait for it to finish
} else {
44 changes: 22 additions & 22 deletions legitslimepaper-server/build.gradle.kts.patch
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
--- a/aspaper-server/build.gradle.kts
+++ b/aspaper-server/build.gradle.kts
@@ -32,7 +_,22 @@
@@ -31,7 +_,22 @@
}
}

- activeFork = aspaper
+ val legitslimepaper = forks.register("legitslimepaper") {
+ forks = aspaper
+ upstream.patchRepo("paperServer") {
+ upstreamRepo = aspaper.patchedRepo("paperServer")
+ patchesDir = rootDirectory.dir("legitslimepaper-server/paper-patches")
+ outputDir = rootDirectory.dir("paper-server")
+ }
+ upstream.patchDir("aspaperServer") {
+ upstreamPath = "aspaper-server"
+ excludes = setOf("src/minecraft", "paper-patches", "minecraft-patches", "build.gradle.kts", "build.gradle.kts.patch")
+ patchesDir = rootDirectory.dir("legitslimepaper-server/aspaper-patches")
+ outputDir = rootDirectory.dir("aspaper-server")
+ }
+ }
+ val legitslimepaper = forks.register("legitslimepaper") {
+ forks = aspaper
+ upstream.patchRepo("paperServer") {
+ upstreamRepo = aspaper.patchedRepo("paperServer")
+ patchesDir = rootDirectory.dir("legitslimepaper-server/paper-patches")
+ outputDir = rootDirectory.dir("paper-server")
+ }
+ upstream.patchDir("aspaperServer") {
+ upstreamPath = "aspaper-server"
+ excludes = setOf("src/minecraft", "paper-patches", "minecraft-patches", "build.gradle.kts", "build.gradle.kts.patch")
+ patchesDir = rootDirectory.dir("legitslimepaper-server/aspaper-patches")
+ outputDir = rootDirectory.dir("aspaper-server")
+ }
+ }
+
+ activeFork = legitslimepaper
+ activeFork = legitslimepaper

spigot {
enabled = true
@@ -119,10 +_,14 @@
// updatingMinecraft {
// oldPaperCommit = "7e80cef5198561d0db53406127e5b8bc7af51577"
@@ -101,10 +_,14 @@
main {
java { srcDir("../paper-server/src/main/java") }
resources { srcDir("../paper-server/src/main/resources") }
Expand All @@ -39,16 +39,16 @@
}
}
val log4jPlugins = sourceSets.create("log4jPlugins") {
@@ -150,7 +_,7 @@
@@ -132,7 +_,7 @@
}

dependencies {
- implementation(project(":aspaper-api")) //ASP
+ implementation(project(":legitslimepaper-api")) //ASP + Moose
implementation(project(":core")) //ASP
implementation("ca.spottedleaf:concurrentutil:0.0.7")
implementation("ca.spottedleaf:concurrentutil:0.0.10")
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
@@ -221,14 +_,14 @@
@@ -195,14 +_,14 @@
val gitBranch = git.exec(providers, "rev-parse", "--abbrev-ref", "HEAD").get().trim()
attributes(
"Main-Class" to "org.bukkit.craftbukkit.Main",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
+++ b/ca/spottedleaf/moonrise/patches/chunk_system/level/entity/ChunkEntitySlices.java
@@ -545,6 +_,8 @@
if (entity == null || entity == except || !entity.getBoundingBox().intersects(box)) {
continue;
}
+ if (except instanceof net.minecraft.server.level.ServerPlayer player && !player.getBukkitEntity().canSee(entity.getBukkitEntity())) // Moose - Disable collisions for hidden entities
+ continue;

if (predicate != null && !predicate.test(entity)) {
continue;
Loading
Loading