mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-12-02 19:32:22 +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") {
|
maven("https://repo.onarandombox.com/multiverse-releases") {
|
||||||
name = "onarandombox"
|
name = "onarandombox"
|
||||||
}
|
}
|
||||||
|
maven(url = "https://central.sonatype.com/repository/maven-snapshots/") {
|
||||||
|
content {
|
||||||
|
includeModule("net.minestom", "minestom")
|
||||||
|
includeModule("net.minestom", "testing")
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
@@ -96,6 +96,6 @@ object Versions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
object Minestom {
|
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
|
@Override
|
||||||
public boolean validatePathIsMember(Path path) {
|
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 {
|
public static class PackLoadFailuresException extends Exception {
|
||||||
|
|||||||
+1
-1
@@ -68,6 +68,6 @@ public class MetaConfigRegistry extends OpenRegistryImpl<MetaPack> implements Ex
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean validatePathIsMember(Path path) {
|
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.annotations.Value;
|
||||||
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
|
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
|
||||||
import net.kyori.adventure.nbt.CompoundBinaryTag;
|
import net.kyori.adventure.nbt.CompoundBinaryTag;
|
||||||
|
import net.kyori.adventure.nbt.StringBinaryTag;
|
||||||
import net.minestom.server.adventure.MinestomAdventure;
|
import net.minestom.server.adventure.MinestomAdventure;
|
||||||
import net.minestom.server.codec.Transcoder;
|
import net.minestom.server.codec.Transcoder;
|
||||||
import net.minestom.server.particle.Particle;
|
import net.minestom.server.particle.Particle;
|
||||||
@@ -51,6 +52,17 @@ public class BiomeParticleConfigTemplate implements ObjectTemplate<AmbientPartic
|
|||||||
nbt = MinestomAdventure.NBT_CODEC.decode(dataString);
|
nbt = MinestomAdventure.NBT_CODEC.decode(dataString);
|
||||||
// transform minecraft:x{a:"b"} into {type:"minecraft:x", a:"b"} as described in Particle.CODEC
|
// transform minecraft:x{a:"b"} into {type:"minecraft:x", a:"b"} as described in Particle.CODEC
|
||||||
nbt = nbt.putString("type", key);
|
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();
|
parsedParticle = Particle.CODEC.decode(Transcoder.NBT, nbt).orElseThrow();
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
String nbtString = "null";
|
String nbtString = "null";
|
||||||
|
|||||||
Reference in new issue
Block a user