mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-14 05:20:12 +02:00
Fixed for 1.17 support
This commit is contained in:
parent
e45834c3bc
commit
73f1045a76
@ -16,7 +16,7 @@ dependencies {
|
||||
|
||||
implementation 'org.spongepowered:configurate-yaml:4.1.2'
|
||||
implementation 'io.netty:netty-all:4.1.54.Final'
|
||||
implementation 'net.kyori:adventure-nbt:4.1.1'
|
||||
implementation 'net.kyori:adventure-nbt:4.9.2'
|
||||
}
|
||||
|
||||
jar {
|
||||
|
@ -56,6 +56,10 @@ public class PacketPlayerPositionAndLook implements PacketOut {
|
||||
msg.writeByte(flags);
|
||||
msg.writeVarInt(teleportId);
|
||||
}
|
||||
|
||||
if (version.moreOrEqual(Version.V1_17)) {
|
||||
msg.writeBoolean(false); // Dismount vehicle
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
package ru.nanit.limbo.world;
|
||||
|
||||
import net.kyori.adventure.nbt.BinaryTagIO;
|
||||
import net.kyori.adventure.nbt.CompoundBinaryTag;
|
||||
import net.kyori.adventure.nbt.ListBinaryTag;
|
||||
import net.kyori.adventure.nbt.TagStringIO;
|
||||
import ru.nanit.limbo.server.LimboServer;
|
||||
import ru.nanit.limbo.util.Logger;
|
||||
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public final class DimensionRegistry {
|
||||
|
||||
@ -25,12 +25,16 @@ public final class DimensionRegistry {
|
||||
}
|
||||
|
||||
public void load(LimboServer server, String def) throws IOException {
|
||||
InputStream in = server.getClass().getResourceAsStream("/dimension_registry.nbt");
|
||||
InputStream in = server.getClass().getResourceAsStream("/dimension_codec.snbt");
|
||||
|
||||
if(in == null)
|
||||
throw new FileNotFoundException("Cannot find dimension registry file");
|
||||
|
||||
codec = BinaryTagIO.readCompressedInputStream(in);
|
||||
String data = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8))
|
||||
.lines()
|
||||
.collect(Collectors.joining("\n"));
|
||||
|
||||
codec = TagStringIO.get().asCompound(data);
|
||||
ListBinaryTag dimensions = codec.getCompound("minecraft:dimension_type").getList("value");
|
||||
|
||||
CompoundBinaryTag overWorld = (CompoundBinaryTag) ((CompoundBinaryTag) dimensions.get(0)).get("element");
|
||||
|
2093
src/main/resources/dimension_codec.snbt
Normal file
2093
src/main/resources/dimension_codec.snbt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user