Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
The conversation to purpur.yml finally works!
Browse files Browse the repository at this point in the history
  • Loading branch information
Euphillya committed Nov 6, 2023
1 parent d1dceaf commit 80e776c
Show file tree
Hide file tree
Showing 24 changed files with 244 additions and 172 deletions.
29 changes: 0 additions & 29 deletions patches/server/0001-Folia-Pull-Request-Pending-validation.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ index 2f2a8a0c05024115f3b7bd69ae400fadff2f36c5..b62137def6ac3826eb5d9e367d97579b

public SystemReport fillSystemReport(SystemReport details) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 68fa7b36250aa7656f4f553e20e61fbec22097d0..5ff32e5500fecd4c87ef34a2afb2ab11891cb3f3 100644
index a50a9ffda4875061fb8840873115119f334f0519..eb302567a5e6e83ad64547445e0d9e058aacccdc 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -267,7 +267,7 @@ import javax.annotation.Nullable; // Paper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] TenseiMC Config Files

diff --git a/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java b/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..b32c065215c06e82ffe6370dec12f755c5608f2a
index 0000000000000000000000000000000000000000..2cdfb1b060878189ca00923e50574849adb983b8
--- /dev/null
+++ b/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java
@@ -0,0 +1,125 @@
@@ -0,0 +1,129 @@
+package fr.euphilia.tenseimc;
+
+import com.google.common.base.Throwables;
Expand Down Expand Up @@ -134,13 +134,17 @@ index 0000000000000000000000000000000000000000..b32c065215c06e82ffe6370dec12f755
+ }
+ return builder.build();
+ }
+
+ private static void updateConfigVersion() {
+
+ }
+}
diff --git a/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java b/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..ec4112f013033ede28ea75a12f53d6c4218bb9de
index 0000000000000000000000000000000000000000..7c20367b93416b5434bdc29556aeafb21ea5b1c3
--- /dev/null
+++ b/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java
@@ -0,0 +1,67 @@
@@ -0,0 +1,70 @@
+package fr.euphilia.tenseimc;
+
+import org.bukkit.World;
Expand Down Expand Up @@ -207,6 +211,9 @@ index 0000000000000000000000000000000000000000..ec4112f013033ede28ea75a12f53d6c4
+ return value.isEmpty() ? fallback : value;
+ }
+
+ private void updateConfigVersion() {
+
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index a9fe3d1c0fc217bd32e884c9e75c906d8b4bf967..e0caf166ee7888e9a9358fb01736b0eb2ffc0be4 100644
Expand Down Expand Up @@ -248,7 +255,7 @@ index 0ff6764c747ee6258ab9d722b48c24f0ddb2afdf..676293d6977d2403df70a4d26a1a34bb
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 5ff32e5500fecd4c87ef34a2afb2ab11891cb3f3..e54716eb3d916c1db04f76613ac81c5516145d4c 100644
index eb302567a5e6e83ad64547445e0d9e058aacccdc..87a057b94b9743acbb8aaeda7f35528de6ecb93e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1080,6 +1080,7 @@ public final class CraftServer implements Server {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ index 676293d6977d2403df70a4d26a1a34bbf7c2470a..f2d3109eb7d5cda318d568e074c82e47
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e54716eb3d916c1db04f76613ac81c5516145d4c..99e0c374d3495121a08993d2581a2e33b9f98848 100644
index 87a057b94b9743acbb8aaeda7f35528de6ecb93e..945629f5cb74d180b7eab61c550f90b2ffe77408 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1081,6 +1081,7 @@ public final class CraftServer implements Server {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Bierque Jason <bierquejason@gmail.com>
Date: Thu, 3 Aug 2023 09:27:26 +0200
Subject: [PATCH] Unsupported Settings : [PR] Vanilla End Teleportation Source
: https://github.com/PaperMC/Folia/pull/110
Date: Sat, 21 Oct 2023 19:50:16 +0200
Subject: [PATCH] Folia Pull Request Pending validation

https://github.com/PaperMC/Folia/pull/110/commits/34465611d1c6d170ef1a794cd08ed898c4b3a821 Vanilla end teleportation
https://github.com/PaperMC/Folia/pull/164/commits/480ce47ff596e6d95889ee45f8ff5ab27e2ef3b1 Fix command sender check

diff --git a/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java b/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java
index 7922ba7c4175572bd378b50c03725a5b02d2df3f..dbb685483d810b9f130306ed7369907ac00a2147 100644
index 2cdfb1b060878189ca00923e50574849adb983b8..526447c3d298706b7f5c18342562a19a3715cc45 100644
--- a/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java
+++ b/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java
@@ -161,4 +161,9 @@ public class TenseiConfig {
set("settings.blocks.beehive.max-bees-inside", null);
}
@@ -126,4 +126,9 @@ public class TenseiConfig {
private static void updateConfigVersion() {

}
+
+ public static boolean useVanillaEndTeleportation = false;
+ private static void settingsUnsupported() {
+ private static void unsupportedSettings() {
+ useVanillaEndTeleportation = getBoolean("settings.unsupported.pr-folia.vanilla-end-teleportation", useVanillaEndTeleportation);
+ }
}
Expand Down Expand Up @@ -44,3 +45,25 @@ index e1b6673729e71bdc929bc7b76983108a59e55891..c10a8c7b04b8303ad215b68efe59fed3
}
);
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 945629f5cb74d180b7eab61c550f90b2ffe77408..99e0c374d3495121a08993d2581a2e33b9f98848 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -999,7 +999,7 @@ public final class CraftServer implements Server {
null,
1L
);
- } else if (sender instanceof ConsoleCommandSender console) {
+ } else if (sender instanceof ConsoleCommandSender || sender instanceof io.papermc.paper.commands.FeedbackForwardingSender) { // TenseiMC
io.papermc.paper.threadedregions.RegionizedServer.getInstance().addTask(() -> {
CraftServer.this.dispatchCommand(sender, commandLine);
});
@@ -1019,7 +1019,7 @@ public final class CraftServer implements Server {
// Folia start - region threading
if ((sender instanceof Entity entity)) {
io.papermc.paper.util.TickThread.ensureTickThread(((org.bukkit.craftbukkit.entity.CraftEntity)entity).getHandle(), "Dispatching command async");
- } else if (sender instanceof ConsoleCommandSender console) {
+ } else if (sender instanceof ConsoleCommandSender || sender instanceof io.papermc.paper.commands.FeedbackForwardingSender) { // TenseiMC
io.papermc.paper.threadedregions.RegionizedServer.ensureGlobalTickThread("Dispatching command async");
} else {
// huh?
28 changes: 13 additions & 15 deletions patches/server/0005-Purpur-EnderChest-1-to-6-Rows.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,33 @@ Subject: [PATCH] Purpur - EnderChest 1 to 6 Rows


diff --git a/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java b/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java
index b32c065215c06e82ffe6370dec12f755c5608f2a..bf396039ef4fa8dd711918cbcc7c45c991fbf38b 100644
index 526447c3d298706b7f5c18342562a19a3715cc45..9265ca7f76fc3ace51ac69554ea3853ed2042f41 100644
--- a/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java
+++ b/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java
@@ -7,6 +7,7 @@ import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.InvalidConfigurationException;
import org.bukkit.configuration.file.YamlConfiguration;
import org.jetbrains.annotations.NotNull;
+import org.purpurmc.purpur.PurpurConfig;

import java.io.File;
import java.io.IOException;
@@ -122,4 +123,17 @@ public class TenseiConfig {
}
@@ -123,8 +123,22 @@ public class TenseiConfig {
return builder.build();
}
+

- private static void updateConfigVersion() {
+ public static boolean enderChestSixRows = false;
+ public static boolean enderChestPermissionRows = false;
+ private static void blockSettings() {
+ if (version < 2) {
+ enderChestSixRows = getBoolean("settings.blocks.ender_chest.six-rows", enderChestSixRows);
+ set("settings.blocks.ender_chest.six-rows", null);
+ }
+ if (version < 2) {
+ enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
+ set("settings.blocks.ender_chest.use-permissions-for-rows", null);
+ }
+ }
}

+ private static void updateConfigVersion() {
+ if (version >= 2) {
+ set("settings.blocks.ender_chest.six-rows", null);
+ set("settings.blocks.ender_chest.use-permissions-for-rows", null);
+ }
}

public static boolean useVanillaEndTeleportation = false;
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 9da89e8e9569666227081ebc6cb1f0348e1a183d..04823def9d94a2c2d928cd584b35f168cc750022 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
Expand Down
19 changes: 8 additions & 11 deletions patches/server/0007-Add-Option-for-disable-observer-clocks.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,25 @@ Subject: [PATCH] Add Option for disable observer clocks


diff --git a/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java b/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java
index ec4112f013033ede28ea75a12f53d6c4218bb9de..8e4bf4f4e0ce5246763cab693b49db9f5d374ed7 100644
index 7c20367b93416b5434bdc29556aeafb21ea5b1c3..46abe4f55d5ccc21406f3bd3ad5b4e54eedc26c7 100644
--- a/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java
+++ b/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java
@@ -3,6 +3,7 @@ package fr.euphilia.tenseimc;
import org.bukkit.World;
import org.bukkit.configuration.ConfigurationSection;
import org.jetbrains.annotations.NotNull;
+import org.purpurmc.purpur.PurpurWorldConfig;

import java.util.List;
import java.util.Map;
@@ -64,4 +65,11 @@ public class TenseiWorldConfig {
@@ -64,7 +64,15 @@ public class TenseiWorldConfig {
return value.isEmpty() ? fallback : value;
}

+ public boolean disableObserverClocks = false;
+ private void redstoneSettings() {
+ if (TenseiConfig.version < 2) {
+ disableObserverClocks = getBoolean("blocks.observer.disable-clock", disableObserverClocks);
+ set("blocks.observer.disable-clock", null);
+ }
+ }
private void updateConfigVersion() {
-
+ if (TenseiConfig.version >= 2) {
+ set("blocks.observer.disable-clock", null);
+ }
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/ObserverBlock.java b/src/main/java/net/minecraft/world/level/block/ObserverBlock.java
index 7b45d6b9a005036ca5051d089a7be792eb87012f..3836ee4965d9803eea0639aad6bc6473ee1173b9 100644
Expand Down
12 changes: 8 additions & 4 deletions patches/server/0008-Configurable-piston-push-limit.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,28 @@ Subject: [PATCH] Configurable piston push limit


diff --git a/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java b/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java
index 8e4bf4f4e0ce5246763cab693b49db9f5d374ed7..60553c0b74367cab0572ae16dbb035d1b16c9fc2 100644
index 46abe4f55d5ccc21406f3bd3ad5b4e54eedc26c7..181bae070ce354b1e199e644a1089ac758070593 100644
--- a/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java
+++ b/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java
@@ -66,10 +66,15 @@ public class TenseiWorldConfig {
@@ -65,14 +65,19 @@ public class TenseiWorldConfig {
}

public boolean disableObserverClocks = false;
+ public int pistonBlockPushLimit = 12;
private void redstoneSettings() {
if (TenseiConfig.version < 2) {
disableObserverClocks = getBoolean("blocks.observer.disable-clock", disableObserverClocks);
set("blocks.observer.disable-clock", null);
}
+ if (TenseiConfig.version < 2) {
+ pistonBlockPushLimit = getInt("blocks.piston.block-push-limit", pistonBlockPushLimit);
+ set("blocks.piston.block-push-limit", null);
+ }
}
private void updateConfigVersion() {
if (TenseiConfig.version >= 2) {
set("blocks.observer.disable-clock", null);
+ set("blocks.piston.block-push-limit", null);
}
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonStructureResolver.java b/src/main/java/net/minecraft/world/level/block/piston/PistonStructureResolver.java
index 744d91546d1a810f60a43c15ed74b4158f341a4a..e6cb76e2bc25d555db087a986f5a8938af10869b 100644
Expand Down
19 changes: 13 additions & 6 deletions patches/server/0009-Purpur-Barrels-6-rows.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,34 @@ Subject: [PATCH] Purpur - Barrels 6 rows


diff --git a/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java b/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java
index bf396039ef4fa8dd711918cbcc7c45c991fbf38b..909959fe6844227d0251b85663e54bcb21739eb7 100644
index 9265ca7f76fc3ace51ac69554ea3853ed2042f41..bddda44bdab13d455d7a3c415d8b4e8429fa1eff 100644
--- a/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java
+++ b/src/main/java/fr/euphilia/tenseimc/TenseiConfig.java
@@ -126,6 +126,7 @@ public class TenseiConfig {
@@ -125,6 +125,7 @@ public class TenseiConfig {

public static boolean enderChestSixRows = false;
public static boolean enderChestPermissionRows = false;
+ public static int barrelRows = 3;
private static void blockSettings() {
if (version < 2) {
enderChestSixRows = getBoolean("settings.blocks.ender_chest.six-rows", enderChestSixRows);
@@ -135,5 +136,9 @@ public class TenseiConfig {
@@ -132,12 +133,16 @@ public class TenseiConfig {
if (version < 2) {
enderChestPermissionRows = getBoolean("settings.blocks.ender_chest.use-permissions-for-rows", enderChestPermissionRows);
set("settings.blocks.ender_chest.use-permissions-for-rows", null);
}
+ if (version < 2) {
+ barrelRows = getInt("settings.blocks.barrel.rows", barrelRows);
+ set("settings.blocks.barrel.rows", null);
+ }
}
}

private static void updateConfigVersion() {
if (version >= 2) {
set("settings.blocks.ender_chest.six-rows", null);
set("settings.blocks.ender_chest.use-permissions-for-rows", null);
+ set("settings.blocks.barrel.rows", null);
}
}

diff --git a/src/main/java/net/minecraft/world/level/block/entity/BarrelBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
index 416aa989ebb18a8741cc9d605a1180ab830f6643..89c637babe8e0b47ffd86e3a0c239f1691347774 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
Expand Down
22 changes: 15 additions & 7 deletions patches/server/0012-Beacon-Activation-Range-Configurable.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ Subject: [PATCH] Beacon Activation Range Configurable


diff --git a/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java b/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java
index 60553c0b74367cab0572ae16dbb035d1b16c9fc2..76701dafbf60e6b6f965824c89faa092d5ebf0c5 100644
index 181bae070ce354b1e199e644a1089ac758070593..9c33a3cf407d0a014fbc85053a4eafd30d310ff2 100644
--- a/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java
+++ b/src/main/java/fr/euphilia/tenseimc/TenseiWorldConfig.java
@@ -77,4 +77,19 @@ public class TenseiWorldConfig {
set("blocks.piston.block-push-limit", null);
}
@@ -64,6 +64,19 @@ public class TenseiWorldConfig {
return value.isEmpty() ? fallback : value;
}
+
+ public int beaconLevelOne = 20;
+ public int beaconLevelTwo = 30;
+ public int beaconLevelThree = 40;
Expand All @@ -23,10 +22,19 @@ index 60553c0b74367cab0572ae16dbb035d1b16c9fc2..76701dafbf60e6b6f965824c89faa092
+ beaconLevelTwo = getInt("blocks.beacon.effect-range.level-2", beaconLevelTwo);
+ beaconLevelThree = getInt("blocks.beacon.effect-range.level-3", beaconLevelThree);
+ beaconLevelFour = getInt("blocks.beacon.effect-range.level-4", beaconLevelFour);
+ set("blocks.beacon.effect-range", null);
+ }
+
+ }
+
public boolean disableObserverClocks = false;
public int pistonBlockPushLimit = 12;
private void redstoneSettings() {
@@ -78,6 +91,7 @@ public class TenseiWorldConfig {
if (TenseiConfig.version >= 2) {
set("blocks.observer.disable-clock", null);
set("blocks.piston.block-push-limit", null);
+ set("blocks.beacon.effect-range", null);
}
}
}
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
index 9c3a271f98e723f1d8bf3badd3fca7a19fdc6d13..3ff48acdf99e9aca2109f19cd893aece56031f05 100644
Expand Down
Loading

0 comments on commit 80e776c

Please sign in to comment.