Skip to content

Commit

Permalink
Update gradle and paperweight, change group name
Browse files Browse the repository at this point in the history
  • Loading branch information
RealTriassic committed Oct 13, 2024
1 parent ea372a9 commit 45a5229
Show file tree
Hide file tree
Showing 12 changed files with 83 additions and 78 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Plugin developers need to manually update their plugins to support Linear.
## Compiling
1. #### Clone LinearPaper
```sh
git clone https://github.com/StupidCraft/LinearPaper.git
git clone https://github.com/RealTriassic/LinearPaper.git
```
2. #### Change directory to LinearPaper
```sh
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
java
`maven-publish`
id("io.papermc.paperweight.patcher") version "1.7.2"
id("io.papermc.paperweight.patcher") version "1.7.3"
}

allprojects {
Expand Down Expand Up @@ -86,7 +86,7 @@ paperweight {
}

tasks.generateDevelopmentBundle {
apiCoordinates = "org.stupidcraft.linearpaper:linearpaper-api"
apiCoordinates = "com.triassic.linearpaper:linearpaper-api"
libraryRepositories = listOf(
"https://repo.maven.apache.org/maven2/",
paperMavenPublicUrl,
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
group = org.stupidcraft.linearpaper
group = com.triassic.linearpaper
version = 1.21.1-R0.1-SNAPSHOT

mcVersion = 1.21.1
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
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.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
5 changes: 4 additions & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -84,7 +86,8 @@ done
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down
2 changes: 2 additions & 0 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down
10 changes: 5 additions & 5 deletions patches/server/0001-Rebrand.patch
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ index 421f6b3dc8890d63d2e7aa774d0bf8f7e15890ab..da156e89cc7f325d267ad5b47c77e065
- "Specification-Vendor" to "Paper Team",
- "Brand-Id" to "papermc:paper",
- "Brand-Name" to "Paper",
+ "Specification-Vendor" to "StupidCraft Team", // LinearPaper
+ "Brand-Id" to "stupidcraft:linearpaper", // LinearPaper
+ "Specification-Vendor" to "Triassic", // LinearPaper
+ "Brand-Id" to "triassic:linearpaper", // LinearPaper
+ "Brand-Name" to "LinearPaper", // LinearPaper
"Build-Number" to (build ?: ""),
"Build-Time" to Instant.now().toString(),
Expand All @@ -46,7 +46,7 @@ index 532306cacd52579cdf37e4aca25887b1ed3ba6a1..c6514ebc545a051e7090e600ab62dbed
private static final int DISTANCE_ERROR = -1;
private static final int DISTANCE_UNKNOWN = -2;
- private static final String DOWNLOAD_PAGE = "https://papermc.io/downloads/paper";
+ private static final String DOWNLOAD_PAGE = "https://github.com/StupidCraft/LinearPaper"; // LinearPaper
+ private static final String DOWNLOAD_PAGE = "https://github.com/RealTriassic/LinearPaper"; // LinearPaper

@Override
public long getCacheTime() {
Expand All @@ -55,7 +55,7 @@ index 532306cacd52579cdf37e4aca25887b1ed3ba6a1..c6514ebc545a051e7090e600ab62dbed
updateMessage = text("You are running a development version without access to version information", color(0xFF5300));
} else {
- updateMessage = getUpdateStatusMessage("PaperMC/Paper", build);
+ updateMessage = getUpdateStatusMessage("StupidCraft/LinearPaper", build); // LinearPaper
+ updateMessage = getUpdateStatusMessage("RealTriassic/LinearPaper", build); // LinearPaper
}
final @Nullable Component history = this.getHistory();

Expand All @@ -68,7 +68,7 @@ index 774556a62eb240da42e84db4502e2ed43495be17..de4febc4bc24230f5bd051293030eb41
String result = "Unknown-Version";

- InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/io.papermc.paper/paper-api/pom.properties");
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/org.stupidcraft.linearpaper/linearpaper-api/pom.properties"); // LinearPaper
+ InputStream stream = Bukkit.class.getClassLoader().getResourceAsStream("META-INF/maven/com.triassic.linearpaper/linearpaper-api/pom.properties"); // LinearPaper
Properties properties = new Properties();

if (stream != null) {
26 changes: 13 additions & 13 deletions patches/server/0002-Empty-configuration.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ index dd56c8e041116ef3602a9f89c998c8208ab89b51..d0dbad852d4ea26a023ae6b94d41f61c
this.paperConfigurations.initializeWorldDefaultsConfiguration(this.registryAccess());
// Paper end - initialize global and world-defaults configuration
this.server.spark.enableEarlyIfRequested(); // Paper - spark
+ org.stupidcraft.linearpaper.LinearConfig.init((java.io.File) this.options.valueOf("linear-settings")); // LinearPaper
+ com.triassic.linearpaper.LinearConfig.init((java.io.File) this.options.valueOf("linear-settings")); // LinearPaper
// Paper start - fix converting txt to json file; convert old users earlier after PlayerList creation but before file load/save
if (this.convertOldUsers()) {
this.getProfileCache().save(false); // Paper
Expand All @@ -24,15 +24,15 @@ index e2a0487089eb5a7bdc1433e4c75f69d8e9f9d5f9..5661d122a105223e2e40a89f04eb26be
return this.paperConfig;
}
// Paper end - add paper world config
+ public final org.stupidcraft.linearpaper.LinearWorldConfig linearConfig; // LinearPaper
+ public final com.triassic.linearpaper.LinearWorldConfig linearConfig; // LinearPaper

public final com.destroystokyo.paper.antixray.ChunkPacketBlockController chunkPacketBlockController; // Paper - Anti-Xray
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
@@ -687,6 +688,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env, java.util.function.Function<org.spigotmc.SpigotWorldConfig, io.papermc.paper.configuration.WorldConfiguration> paperWorldConfigCreator, java.util.concurrent.Executor executor) { // Paper - create paper world config & Anti-Xray
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // Spigot
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
+ this.linearConfig = new org.stupidcraft.linearpaper.LinearWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // LinearPaper
+ this.linearConfig = new com.triassic.linearpaper.LinearWorldConfig(((net.minecraft.world.level.storage.PrimaryLevelData) worlddatamutable).getLevelName()); // LinearPaper
this.generator = gen;
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);

Expand All @@ -44,7 +44,7 @@ index b7af2d4300facf41a025c8ca322bf6541949b3ab..aa6e819cdb7bfb219764def341dc14d1

org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
+ org.stupidcraft.linearpaper.LinearConfig.init((File) console.options.valueOf("linear-settings")); // LinearPaper
+ com.triassic.linearpaper.LinearConfig.init((File) console.options.valueOf("linear-settings")); // LinearPaper
for (ServerLevel world : this.console.getAllLevels()) {
// world.serverLevelData.setDifficulty(config.difficulty); // Paper - per level difficulty
world.setSpawnSettings(world.serverLevelData.getDifficulty() != Difficulty.PEACEFUL && config.spawnMonsters, config.spawnAnimals); // Paper - per level difficulty (from MinecraftServer#setDifficulty(ServerLevel, Difficulty, boolean))
Expand All @@ -63,7 +63,7 @@ index b7af2d4300facf41a025c8ca322bf6541949b3ab..aa6e819cdb7bfb219764def341dc14d1
+ @Override
+ public YamlConfiguration getLinearConfig()
+ {
+ return org.stupidcraft.linearpaper.LinearConfig.config;
+ return com.triassic.linearpaper.LinearConfig.config;
+ }
+
@Override
Expand All @@ -88,13 +88,13 @@ index c1e88c31910e96ef07cece05046c0b55e708b52d..c2cd67260a0c954fe59e3c330e6efce3
}
};

diff --git a/src/main/java/org/stupidcraft/linearpaper/LinearConfig.java b/src/main/java/org/stupidcraft/linearpaper/LinearConfig.java
diff --git a/src/main/java/com/triassic/linearpaper/LinearConfig.java b/src/main/java/com/triassic/linearpaper/LinearConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..0c58b470a16f0705c17d1fb7d8108e2f73e5f9bd
--- /dev/null
+++ b/src/main/java/org/stupidcraft/linearpaper/LinearConfig.java
+++ b/src/main/java/com/triassic/linearpaper/LinearConfig.java
@@ -0,0 +1,173 @@
+package org.stupidcraft.linearpaper;
+package com.triassic.linearpaper;
+
+import com.google.common.collect.ImmutableMap;
+import java.io.File;
Expand Down Expand Up @@ -122,7 +122,7 @@ index 0000000000000000000000000000000000000000..0c58b470a16f0705c17d1fb7d8108e2f
+ "to always keep and create backups, even if not using Linear.",
+ "",
+ "Report any issues on our GitHub repository:",
+ "https://github.com/StupidCraft/LinearPaper"
+ "https://github.com/RealTriassic/LinearPaper"
+ );
+
+ public static YamlConfiguration config;
Expand Down Expand Up @@ -267,21 +267,21 @@ index 0000000000000000000000000000000000000000..0c58b470a16f0705c17d1fb7d8108e2f
+ return builder.build();
+ }
+}
diff --git a/src/main/java/org/stupidcraft/linearpaper/LinearWorldConfig.java b/src/main/java/org/stupidcraft/linearpaper/LinearWorldConfig.java
diff --git a/src/main/java/com/triassic/linearpaper/LinearWorldConfig.java b/src/main/java/com/triassic/linearpaper/LinearWorldConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..4e4bafaec9b8d40ba9252d53167e34e8f684c5b8
--- /dev/null
+++ b/src/main/java/org/stupidcraft/linearpaper/LinearWorldConfig.java
+++ b/src/main/java/com/triassic/linearpaper/LinearWorldConfig.java
@@ -0,0 +1,113 @@
+package org.stupidcraft.linearpaper;
+package com.triassic.linearpaper;
+
+import java.util.List;
+import java.util.Map;
+import java.util.function.Predicate;
+import org.apache.commons.lang.BooleanUtils;
+import org.bukkit.configuration.ConfigurationSection;
+
+import static org.stupidcraft.linearpaper.LinearConfig.log;
+import static com.triassic.linearpaper.LinearConfig.log;
+
+@SuppressWarnings("unused")
+public class LinearWorldConfig {
Expand Down
24 changes: 12 additions & 12 deletions patches/server/0003-Region-format-configuration.patch
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ index 696d075ca2883f3c37e35f983c4d020e5db89d16..f75e1e6e3d68e4156fd9723aa96dba4e
}

return flag3;
diff --git a/src/main/java/org/stupidcraft/linearpaper/LinearConfig.java b/src/main/java/org/stupidcraft/linearpaper/LinearConfig.java
diff --git a/src/main/java/com/triassic/linearpaper/LinearConfig.java b/src/main/java/com/triassic/linearpaper/LinearConfig.java
index 0c58b470a16f0705c17d1fb7d8108e2f73e5f9bd..65b823390d0a8ee79c2b8e576c670b195a70827e 100644
--- a/src/main/java/org/stupidcraft/linearpaper/LinearConfig.java
+++ b/src/main/java/org/stupidcraft/linearpaper/LinearConfig.java
--- a/src/main/java/com/triassic/linearpaper/LinearConfig.java
+++ b/src/main/java/com/triassic/linearpaper/LinearConfig.java
@@ -170,4 +170,17 @@ public class LinearConfig {
}
return builder.build();
Expand All @@ -43,20 +43,20 @@ index 0c58b470a16f0705c17d1fb7d8108e2f73e5f9bd..65b823390d0a8ee79c2b8e576c670b19
+ linearFlushThreads = Math.max(linearFlushThreads, 1);
+ }
}
diff --git a/src/main/java/org/stupidcraft/linearpaper/LinearWorldConfig.java b/src/main/java/org/stupidcraft/linearpaper/LinearWorldConfig.java
diff --git a/src/main/java/com/triassic/linearpaper/LinearWorldConfig.java b/src/main/java/com/triassic/linearpaper/LinearWorldConfig.java
index 4e4bafaec9b8d40ba9252d53167e34e8f684c5b8..267474bdf5969b8028a3b4573828ebd47e60d378 100644
--- a/src/main/java/org/stupidcraft/linearpaper/LinearWorldConfig.java
+++ b/src/main/java/org/stupidcraft/linearpaper/LinearWorldConfig.java
@@ -3,8 +3,10 @@ package org.stupidcraft.linearpaper;
--- a/src/main/java/com/triassic/linearpaper/LinearWorldConfig.java
+++ b/src/main/java/com/triassic/linearpaper/LinearWorldConfig.java
@@ -3,8 +3,10 @@ package com.triassic.linearpaper;
import java.util.List;
import java.util.Map;
import java.util.function.Predicate;
+import java.util.logging.Level;
import org.apache.commons.lang.BooleanUtils;
import org.bukkit.configuration.ConfigurationSection;
+import org.stupidcraft.linearpaper.region.RegionFileFormat;
+import com.triassic.linearpaper.region.RegionFileFormat;

import static org.stupidcraft.linearpaper.LinearConfig.log;
import static com.triassic.linearpaper.LinearConfig.log;

@@ -110,4 +112,23 @@ public class LinearWorldConfig {
final Map<String, Object> value = getMap("world-settings." + worldName + "." + path, null);
Expand All @@ -82,13 +82,13 @@ index 4e4bafaec9b8d40ba9252d53167e34e8f684c5b8..267474bdf5969b8028a3b4573828ebd4
+ }
+ }
}
diff --git a/src/main/java/org/stupidcraft/linearpaper/region/RegionFileFormat.java b/src/main/java/org/stupidcraft/linearpaper/region/RegionFileFormat.java
diff --git a/src/main/java/com/triassic/linearpaper/region/RegionFileFormat.java b/src/main/java/com/triassic/linearpaper/region/RegionFileFormat.java
new file mode 100644
index 0000000000000000000000000000000000000000..64831ea14eef5cd7a9c3bcf87517ea8dd7d26795
--- /dev/null
+++ b/src/main/java/org/stupidcraft/linearpaper/region/RegionFileFormat.java
+++ b/src/main/java/com/triassic/linearpaper/region/RegionFileFormat.java
@@ -0,0 +1,16 @@
+package org.stupidcraft.linearpaper.region;
+package com.triassic.linearpaper.region;
+
+public enum RegionFileFormat {
+ ANVIL,
Expand Down
Loading

0 comments on commit 45a5229

Please sign in to comment.