mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-11-27 16:35:31 +00:00
feat: update to minestom 26_3
This commit is contained in:
5 files changed
+21
-3
No files matched your search
@@ -60,6 +60,12 @@ fun Project.configureDependencies() {
|
||||
maven("https://repo.onarandombox.com/multiverse-releases") {
|
||||
name = "onarandombox"
|
||||
}
|
||||
maven(url = "https://central.sonatype.com/repository/maven-snapshots/") {
|
||||
content {
|
||||
includeModule("net.minestom", "minestom")
|
||||
includeModule("net.minestom", "testing")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -96,6 +96,6 @@ object Versions {
|
||||
}
|
||||
|
||||
object Minestom {
|
||||
const val minestom = "2025.12.20c-1.21.11"
|
||||
const val minestom = "26_3-SNAPSHOT"
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -68,7 +68,7 @@ public class ConfigRegistry extends OpenRegistryImpl<ConfigPack> implements Exte
|
||||
|
||||
@Override
|
||||
public boolean validatePathIsMember(Path path) {
|
||||
return Files.isDirectory(path)|| path.getFileName().endsWith(".zip");
|
||||
return Files.isDirectory(path)|| path.getFileName().toString().endsWith(".zip");
|
||||
}
|
||||
|
||||
public static class PackLoadFailuresException extends Exception {
|
||||
|
||||
+1
-1
@@ -68,6 +68,6 @@ public class MetaConfigRegistry extends OpenRegistryImpl<MetaPack> implements Ex
|
||||
|
||||
@Override
|
||||
public boolean validatePathIsMember(Path path) {
|
||||
return Files.isDirectory(path) || path.getFileName().endsWith(".zip");
|
||||
return Files.isDirectory(path) || path.getFileName().toString().endsWith(".zip");
|
||||
}
|
||||
}
|
||||
+12
@@ -4,6 +4,7 @@ import com.dfsek.tectonic.api.config.template.annotations.Default;
|
||||
import com.dfsek.tectonic.api.config.template.annotations.Value;
|
||||
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
|
||||
import net.kyori.adventure.nbt.CompoundBinaryTag;
|
||||
import net.kyori.adventure.nbt.StringBinaryTag;
|
||||
import net.minestom.server.adventure.MinestomAdventure;
|
||||
import net.minestom.server.codec.Transcoder;
|
||||
import net.minestom.server.particle.Particle;
|
||||
@@ -51,6 +52,17 @@ public class BiomeParticleConfigTemplate implements ObjectTemplate<AmbientPartic
|
||||
nbt = MinestomAdventure.NBT_CODEC.decode(dataString);
|
||||
// transform minecraft:x{a:"b"} into {type:"minecraft:x", a:"b"} as described in Particle.CODEC
|
||||
nbt = nbt.putString("type", key);
|
||||
|
||||
// TODO fix this
|
||||
CompoundBinaryTag blockState = nbt.getCompound("block_state", null);
|
||||
if (blockState != null) {
|
||||
String name = blockState.getString("Name", null);
|
||||
if (name != null) {
|
||||
blockState = blockState.put("id", StringBinaryTag.stringBinaryTag(name));
|
||||
nbt = nbt.put("block_state", blockState);
|
||||
}
|
||||
}
|
||||
|
||||
parsedParticle = Particle.CODEC.decode(Transcoder.NBT, nbt).orElseThrow();
|
||||
} catch(Exception e) {
|
||||
String nbtString = "null";
|
||||
|
||||
Reference in new issue
Block a user