Skip to content
Merged
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
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
group=com.legitimoose.legitslimepaper
version=1.21.8-R0.1-SNAPSHOT
mcVersion=1.21.8
version=1.21.10-R0.1-SNAPSHOT
mcVersion=1.21.10

#Update with ASP!! (also update gradle/libs.versions.toml)
aspRef=6e2b4ea58f6686dd7b2601d0c83012537d9db29d
aspRef=8ff5a5f93c921c668a937e2d864a00634cc964f2
apiVersion=4.2.0-SNAPSHOT

org.gradle.caching=true
Expand Down
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
adventure = "4.23.0"
adventure = "4.24.0"
annotations = "26.0.1"
autoservice = "1.1.1"
blossom = "2.1.0"
Expand All @@ -15,9 +15,9 @@ lettuce = "6.5.1.RELEASE"
lombok = "1.18.36"
lombok-plugin = "8.11"
mongo = "5.2.1"
paperweight = "2.0.0-beta.17"
paperweight = "2.0.0-beta.18"
plugin-yml-paper = "0.6.0"
shadow = "8.3.5"
shadow = "9.2.2"
slf4j = "2.0.16"
zstd = "1.5.6-8"

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
@@ -102,17 +_,21 @@
@@ -101,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,6 +1,6 @@
--- a/src/main/java/com/infernalsuite/asp/SlimeNMSBridgeImpl.java
+++ b/src/main/java/com/infernalsuite/asp/SlimeNMSBridgeImpl.java
@@ -82,6 +_,7 @@
@@ -79,6 +_,7 @@
// Some stuff is needed when loading overworld world
SlimeLevelInstance instance = ((SlimeInMemoryWorld) this.loadInstance(defaultWorld, Level.OVERWORLD)).getInstance();
DimensionDataStorage worldpersistentdata = instance.getDataStorage();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/src/main/java/com/infernalsuite/asp/level/SlimeLevelInstance.java
+++ b/src/main/java/com/infernalsuite/asp/level/SlimeLevelInstance.java
@@ -57,16 +_,10 @@
@@ -68,16 +_,10 @@
public static LevelStorageSource CUSTOM_LEVEL_STORAGE;

static {
Expand All @@ -21,20 +21,20 @@
}

private static final ExecutorService WORLD_SAVER_SERVICE = Executors.newFixedThreadPool(4, new ThreadFactoryBuilder()
@@ -80,7 +_,7 @@
@@ -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,
MinecraftServer.getServer().progressListenerFactory.create(11), false, 0,
primaryLevelData, worldKey, worldDimension, false, 0,
Collections.emptyList(), true, null, environment, null, null);
@@ -132,6 +_,7 @@
this.slimeInstance = new SlimeInMemoryWorld(slimeBootstrap, this);
@@ -169,6 +_,7 @@
Bukkit.getPluginManager().callEvent(new WorldSaveEvent(getWorld()));

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

if (MinecraftServer.getServer().isStopped()) { // Make sure the world gets saved before stopping the server by running it from the main thread
28 changes: 14 additions & 14 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
@@ -35,7 +_,22 @@
@@ -32,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")
+ }
+ 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")
+ }
+ 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

spigot {
enabled = true
@@ -122,10 +_,14 @@
@@ -119,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") {
@@ -152,7 +_,7 @@
@@ -150,7 +_,7 @@
}

dependencies {
- implementation(project(":aspaper-api")) //ASP
+ implementation(project(":legitslimepaper-api")) //ASP + Moose
implementation(project(":core")) //ASP
implementation("ca.spottedleaf:concurrentutil:0.0.3")
implementation("ca.spottedleaf:concurrentutil:0.0.7")
implementation("org.jline:jline-terminal-ffm:3.27.1") // use ffm on java 22+
@@ -224,14 +_,14 @@
@@ -221,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
Expand Up @@ -28,23 +28,23 @@
import net.minecraft.network.chat.HoverEvent;
import net.minecraft.network.chat.MutableComponent;
import net.minecraft.network.protocol.game.ClientboundCommandsPacket;
@@ -143,6 +_,7 @@
@@ -145,6 +_,7 @@
import net.minecraft.util.profiling.jfr.JvmProfiler;
import net.minecraft.world.flag.FeatureFlagSet;
import net.minecraft.world.flag.FeatureFlags;
+import net.minecraft.world.level.BaseCommandBlock;
import net.minecraft.world.level.GameRules;
import org.slf4j.Logger;

@@ -175,6 +_,7 @@
@@ -177,6 +_,7 @@
}
};
private final CommandDispatcher<CommandSourceStack> dispatcher = new CommandDispatcher<>();
+ public static CommandDispatcher<CommandSourceStack> vanillaCommands = new CommandDispatcher<>(); // Moose

public Commands(Commands.CommandSelection selection, CommandBuildContext context) {
// Paper start - Brigadier API - modern minecraft overloads that do not use redirects but are copies instead
@@ -286,6 +_,25 @@
@@ -293,6 +_,25 @@
PublishCommand.register(this.dispatcher);
}

Expand All @@ -70,7 +70,7 @@
// Paper start - Vanilla command permission fixes
for (final CommandNode<CommandSourceStack> node : this.dispatcher.getRoot().getChildren()) {
if (node.getRequirement() == com.mojang.brigadier.builder.ArgumentBuilder.<CommandSourceStack>defaultRequirement()) {
@@ -353,6 +_,15 @@
@@ -360,6 +_,15 @@
ContextChain<CommandSourceStack> contextChain = finishParsing(parseResults, command, commandSourceStack);

try {
Expand All @@ -86,7 +86,7 @@
if (contextChain != null) {
executeCommandInContext(
commandSourceStack,
@@ -363,7 +_,7 @@
@@ -370,7 +_,7 @@
}
// Paper start
} catch (Throwable var12) { // always gracefully handle it, no matter how bad:tm:
Expand All @@ -95,7 +95,7 @@
// Paper end
MutableComponent mutableComponent = Component.literal(var12.getMessage() == null ? var12.getClass().getName() : var12.getMessage());
LOGGER.error("Command exception: /{}", command, var12); // Paper - always show execution exception in console log
@@ -494,12 +_,27 @@
@@ -501,12 +_,27 @@
for (CommandNode node : rootCommandNode.getChildren()) {
bukkit.add(node.getName());
}
Expand Down Expand Up @@ -123,7 +123,7 @@

private void runSync(ServerPlayer player, java.util.Collection<String> bukkit, RootCommandNode<CommandSourceStack> rootCommandNode) {
// Paper end - Perf: Async command map building
@@ -514,6 +_,15 @@
@@ -521,6 +_,15 @@
}
}
// CraftBukkit end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
+++ b/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
@@ -341,7 +_,7 @@
@@ -345,7 +_,7 @@
boolean var9;
try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(entity.problemPath(), LOGGER)) {
TagValueOutput tagValueOutput = TagValueOutput.createWithContext(scopedCollector, entity.registryAccess());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
@@ -88,7 +_,20 @@
@@ -86,7 +_,20 @@
this.underlined = underlined;
this.strikethrough = strikethrough;
this.obfuscated = obfuscated;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import net.minecraft.SharedConstants;
import net.minecraft.SuppressForbidden;
import net.minecraft.Util;
@@ -54,11 +_,7 @@
@@ -52,11 +_,7 @@
import net.minecraft.world.level.levelgen.WorldDimensions;
import net.minecraft.world.level.levelgen.WorldOptions;
import net.minecraft.world.level.levelgen.presets.WorldPresets;
Expand All @@ -35,7 +35,7 @@
import org.slf4j.Logger;

public class Main {
@@ -141,6 +_,8 @@
@@ -139,6 +_,8 @@
return;
}

Expand All @@ -44,7 +44,7 @@
// Spigot start
boolean eulaAgreed = Boolean.getBoolean("com.mojang.eula.agree");
if (eulaAgreed) {
@@ -230,7 +_,7 @@
@@ -228,7 +_,7 @@
LOGGER.warn("Safe mode active, only vanilla datapack will be loaded");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import net.minecraft.commands.functions.CommandFunction;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.Registries;
@@ -89,7 +_,7 @@
@@ -90,7 +_,7 @@
ResourceLocation resourceLocation1 = LISTER.fileToId(resourceLocation);
map1.put(resourceLocation1, CompletableFuture.supplyAsync(() -> {
List<String> lines = readLines(entry.getValue());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/server/level/ServerPlayer.java
+++ b/net/minecraft/server/level/ServerPlayer.java
@@ -565,8 +_,8 @@
@@ -535,8 +_,8 @@
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1361,7 +_,7 @@
@@ -1366,7 +_,7 @@
@Override
public void handleEntityTagQuery(ServerboundEntityTagQueryPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level());
Expand All @@ -9,7 +9,7 @@
Entity entity = this.player.level().getEntity(packet.getEntityId());
if (entity != null) {
try (ProblemReporter.ScopedCollector scopedCollector = new ProblemReporter.ScopedCollector(entity.problemPath(), LOGGER)) {
@@ -1387,7 +_,7 @@
@@ -1392,7 +_,7 @@
@Override
public void handleBlockEntityTagQuery(ServerboundBlockEntityTagQueryPacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level());
Expand All @@ -18,12 +18,12 @@
BlockEntity blockEntity = this.player.level().getBlockEntity(packet.getPos());
CompoundTag compoundTag = blockEntity != null ? blockEntity.saveWithoutMetadata(this.player.registryAccess()) : null;
this.send(new ClientboundTagQueryPacket(packet.getTransactionId(), compoundTag));
@@ -3492,7 +_,7 @@
@@ -3508,7 +_,7 @@
@Override
public void handleChangeGameMode(ServerboundChangeGameModePacket packet) {
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level());
- if (!this.player.hasPermissions(2)) {
+ if (!this.player.hasPermissions(2) && !this.player.getBukkitEntity().hasPermission("minecraft.gamemodeswitcher")) { // Moose: Added a permission to allow players to change their own gamemode with F3 shortcut
LOGGER.warn(
"Player {} tried to change game mode to {} without required permissions",
this.player.getGameProfile().getName(),
this.player.getGameProfile().name(),
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/net/minecraft/world/entity/player/Player.java
+++ b/net/minecraft/world/entity/player/Player.java
@@ -834,7 +_,7 @@
@@ -694,7 +_,7 @@
}

@Override
Expand All @@ -9,17 +9,17 @@
super.addAdditionalSaveData(output);
NbtUtils.addCurrentDataVersion(output);
this.inventory.save(output.list("Inventory", ItemStackWithSlot.CODEC));
@@ -847,7 +_,8 @@
@@ -707,7 +_,8 @@
output.putInt("Score", this.getScore());
this.foodData.addAdditionalSaveData(output);
output.store("abilities", Abilities.Packed.CODEC, this.abilities.pack());
- this.enderChestInventory.storeAsSlots(output.list("EnderItems", ItemStackWithSlot.CODEC));
+ if (includeAll) // Moose - Disable enderchest serializing in nbt selectors
+ this.enderChestInventory.storeAsSlots(output.list("EnderItems", ItemStackWithSlot.CODEC));
if (!this.getShoulderEntityLeft().isEmpty()) {
output.store("ShoulderEntityLeft", CompoundTag.CODEC, this.getShoulderEntityLeft());
}
@@ -2105,7 +_,7 @@
this.lastDeathLocation.ifPresent(globalPos -> output.store("LastDeathLocation", GlobalPos.CODEC, globalPos));
output.storeNullable("current_explosion_impact_pos", Vec3.CODEC, this.currentImpulseImpactPos);
output.putBoolean("ignore_fall_damage_from_current_explosion", this.ignoreFallDamageFromCurrentImpulse);
@@ -1890,7 +_,7 @@
}

public boolean canUseGameMasterBlocks() {
Expand Down