mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-27 02:49:19 +00:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@b0da38c2 Repository details in RuntimeException for MavenLibraryResolver#addRepository (#12939) PaperMC/Paper@1922be90 Update custom tags (#12183) PaperMC/Paper@79cf1353 Ignore HopperInventorySearchEvent when it has no listeners (#13009) PaperMC/Paper@ea014f7a feat: add stuckEntityPoiRetryDelay config (#12949) PaperMC/Paper@a9e76749 Support for showNotification in PlayerRecipeDiscoverEvent (#12992) PaperMC/Paper@5622c9dd Expose attribute sentiment (#12974) PaperMC/Paper@42b653b1 Expose more argument types (#12665) PaperMC/Paper@52d9a221 [ci/skip] Fix typo in Display javadoc (#13010) PaperMC/Paper@614e9acf Improve APIs around riptide tridents (#12996) PaperMC/Paper@51706e5a Fixed DyeItem sheep dye hunk
29 lines
1.6 KiB
Diff
29 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Apehum <apehumchik@gmail.com>
|
|
Date: Thu, 16 Dec 2021 04:23:40 +0800
|
|
Subject: [PATCH] Matter: Secure Seed command
|
|
|
|
Original license: GPLv3
|
|
Original project: https://github.com/plasmoapp/matter
|
|
|
|
diff --git a/net/minecraft/server/commands/SeedCommand.java b/net/minecraft/server/commands/SeedCommand.java
|
|
index 7c1e18d8362be5ae885c32b05e98b9ef45942d93..e54ed64059956555767c0c01057a8319e671b1d2 100644
|
|
--- a/net/minecraft/server/commands/SeedCommand.java
|
|
+++ b/net/minecraft/server/commands/SeedCommand.java
|
|
@@ -12,6 +12,15 @@ public class SeedCommand {
|
|
long seed = commandContext.getSource().getLevel().getSeed();
|
|
Component component = ComponentUtils.copyOnClickText(String.valueOf(seed));
|
|
commandContext.getSource().sendSuccess(() -> Component.translatable("commands.seed.success", component), false);
|
|
+ // Leaf start - Matter - Secure Seed command
|
|
+ if (org.dreeam.leaf.config.modules.misc.SecureSeed.enabled) {
|
|
+ su.plo.matter.Globals.setupGlobals(commandContext.getSource().getLevel());
|
|
+ String seedStr = su.plo.matter.Globals.seedToString(su.plo.matter.Globals.worldSeed);
|
|
+ Component featureSeedComponent = ComponentUtils.copyOnClickText(seedStr);
|
|
+
|
|
+ commandContext.getSource().sendSuccess(() -> Component.translatable(("Feature seed: %s"), featureSeedComponent), false);
|
|
+ }
|
|
+ // Leaf end - Matter - Secure Seed command
|
|
return (int)seed;
|
|
}));
|
|
}
|