Skip to content
Draft
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ buildNumber.properties

# Common working directory
run/
runs/
bin
build
.gradle
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ modrinth {
// rootProject.layout.buildDirectory.file("libs/${rootProject.name}-${project.version}-sources.jar").get()
//])
gameVersions.addAll(listOf(libs.versions.minecraft.get()))
loaders.addAll(listOf("bukkit", "fabric", /*"forge",*/ "paper", "purpur", "quilt", "spigot", "folia"))
loaders.addAll(listOf("bukkit", "fabric", "neoforge", "paper", "purpur", "quilt", "spigot", "folia"))
changelog = System.getenv("COMMIT_MESSAGE")
dependencies {
required.project("fabric-api")
Expand Down
25 changes: 21 additions & 4 deletions bukkit/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ repositories {
dependencies {
implementation(project(":core", configuration = "shadow"))

implementation(libs.cloudBrigadier)
implementation(libs.cloudPaper)
// implementation(libs.cloudCore)
// implementation(libs.cloudProcessorsConfirmation)
// implementation(libs.cloudMinecraftExtras)
//
// implementation(libs.bundles.adventure)

implementation(libs.adventurePlatformBukkit)
compileOnly(libs.cloudBrigadier)
compileOnly(libs.cloudPaper)

compileOnly(libs.adventurePlatformBukkit)

paperweight.paperDevBundle(libs.versions.bukkit)
}
Expand All @@ -56,6 +62,12 @@ tasks {
shadowJar {
mergeServiceFiles()

// arrayOf(
// "org.incendo",
// "io.leangen.geantyref",
// "net.kyori",
// ).forEach { it -> relocate(it, "libs.$it") }

// this is janky, but it works
manifest {
from(project(":core").tasks.named<Jar>("shadowJar").get().manifest)
Expand All @@ -77,7 +89,12 @@ tasks {
"version" to project.version,
"authors" to project.properties["authors"],
"description" to project.properties["description"],
"website" to project.properties["website"]
"website" to project.properties["website"],
"cloud" to libs.versions.cloud.asProvider().get(),
"cloudProcessors" to libs.versions.cloud.processors.get(),
"cloudMinecraft" to libs.versions.cloud.minecraft.asProvider().get(),
"adventure" to libs.versions.adventure.get(),
"adventureBukkit" to libs.versions.adventureBukkit.get()
))

filesMatching("plugin.yml") {
Expand Down
11 changes: 11 additions & 0 deletions bukkit/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ description: "${description}"
website: "${website}"
folia-supported: true

libraries:
- org.incendo:cloud-core:${cloud}
- org.incendo:cloud-processors-confirmation:${cloudProcessors}
- org.incendo:cloud-minecraft-extras:${cloudMinecraft}
- org.incendo:cloud-brigadier:${cloudMinecraft}
- org.incendo:cloud-paper:${cloudMinecraft}
- net.kyori:adventure-api:${adventure}
- net.kyori:adventure-text-minimessage:${adventure}
- net.kyori:adventure-text-serializer-plain:${adventure}
- net.kyori:adventure-platform-bukkit:${adventureBukkit}

permissions:
pl3xmap.command.map:
description: Gives access to the base command
Expand Down
15 changes: 5 additions & 10 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,12 @@ dependencies {

implementation(libs.undertow)

implementation(libs.cloudCore)
implementation(libs.cloudProcessorsConfirmation)
implementation(libs.cloudMinecraftExtras) {
exclude("net.kyori", "*")
}
compileOnly(libs.cloudCore)
compileOnly(libs.cloudProcessorsConfirmation)
compileOnly(libs.cloudMinecraftExtras)

implementation(libs.bundles.adventure)
implementation(libs.adventurePlatformFacet)
compileOnly(libs.bundles.adventure)
compileOnly(libs.adventurePlatformFacet)

implementation(libs.caffeine)
implementation(libs.querzNbt)
Expand All @@ -76,14 +74,11 @@ tasks {
)

arrayOf(
//"org.incendo", // do not relocate
"com.github.benmanes.caffeine.cache",
"com.github.Carleslc.Simple-YAML",
"com.google.errorprone.annotations",
"com.luciad",
//"io.leangen.geantyref", // do not relocate!
"io.undertow",
//"net.kyori", // do not relocate!
"net.querz",
"net.jpountz",
"org.checkerframework",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private List<Map<String, Object>> parseWorlds() {
ui.put("attribution", config.UI_ATTRIBUTION);

Map<String, Object> settings = new LinkedHashMap<>();
settings.put("name", world.getName().replace(":", "-"));
settings.put("name", world.getName());
settings.put("tileUpdateInterval", 10);
settings.put("spawn", spawn);
settings.put("center", center);
Expand All @@ -135,7 +135,8 @@ private List<Map<String, Object>> parseWorlds() {
});

Map<String, Object> worldsList = new LinkedHashMap<>();
worldsList.put("name", world.getName().replace(":", "-"));
worldsList.put("name", world.getName());
worldsList.put("directoryName", world.getName().replace(":", "-"));
worldsList.put("displayName", config.DISPLAY_NAME
.replace("<world>", world.getName()));
worldsList.put("type", world.getType().toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ public FabricWorld(ServerLevel level, String name) {
// register biomes
Set<Map.Entry<ResourceKey<Biome>, Biome>> entries = level.registryAccess().lookupOrThrow(Registries.BIOME).entrySet();
for (Map.Entry<ResourceKey<Biome>, Biome> entry : entries) {
if (getBiomeRegistry().size() > BiomeRegistry.MAX_INDEX) {
Logger.debug(String.format("Cannot register any more biomes. Registered: %d Unregistered: %d", getBiomeRegistry().size(), entries.size() - getBiomeRegistry().size()));
break;
}

String id = entry.getKey().location().toString();
Biome biome = entry.getValue();
float temperature = Mathf.clamp(0.0F, 1.0F, biome.getBaseTemperature());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@ public int getColorForPower(byte power) {
protected void loadBlocks() {
Set<Map.Entry<ResourceKey<Block>, Block>> entries = this.server.registryAccess().lookupOrThrow(Registries.BLOCK).entrySet();
for (Map.Entry<ResourceKey<Block>, Block> entry : entries) {
if (getBlockRegistry().size() > BlockRegistry.MAX_INDEX) {
Logger.debug(String.format("Cannot register any more blocks. Registered: %d Unregistered: %d", getBlockRegistry().size(), entries.size() - getBlockRegistry().size()));
break;
}

String id = entry.getKey().location().toString();
int color = entry.getValue().defaultMapColor().col;
getBlockRegistry().register(id, color);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
*/
package net.pl3x.map.fabric.server.command;

import com.mojang.brigadier.arguments.StringArgumentType;
import io.leangen.geantyref.TypeToken;
import net.minecraft.commands.arguments.DimensionArgument;
import net.pl3x.map.core.command.CommandHandler;
Expand Down
42 changes: 0 additions & 42 deletions forge/build.gradle

This file was deleted.

This file was deleted.

Loading
Loading