mirror of
https://github.com/Nan1t/NanoLimbo.git
synced 2025-07-14 13:20:12 +02:00
Removed unused code
This commit is contained in:
parent
511ce43ada
commit
ff5b605ee3
@ -234,10 +234,6 @@ public class ClientConnection extends ChannelInboundHandlerAdapter {
|
|||||||
if (isConnected()) channel.write(packet, channel.voidPromise());
|
if (isConnected()) channel.write(packet, channel.voidPromise());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void flushPackets() {
|
|
||||||
if (isConnected()) channel.flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isConnected() {
|
public boolean isConnected() {
|
||||||
return channel.isActive();
|
return channel.isActive();
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import net.kyori.adventure.nbt.ListBinaryTag;
|
|||||||
import ru.nanit.limbo.server.LimboServer;
|
import ru.nanit.limbo.server.LimboServer;
|
||||||
import ru.nanit.limbo.util.Logger;
|
import ru.nanit.limbo.util.Logger;
|
||||||
|
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
|
||||||
@ -14,9 +15,6 @@ public final class DimensionRegistry {
|
|||||||
private CompoundBinaryTag defaultDimension;
|
private CompoundBinaryTag defaultDimension;
|
||||||
|
|
||||||
private CompoundBinaryTag codec;
|
private CompoundBinaryTag codec;
|
||||||
private CompoundBinaryTag overWorld;
|
|
||||||
private CompoundBinaryTag theEnd;
|
|
||||||
private CompoundBinaryTag nether;
|
|
||||||
|
|
||||||
public CompoundBinaryTag getCodec() {
|
public CompoundBinaryTag getCodec() {
|
||||||
return codec;
|
return codec;
|
||||||
@ -26,26 +24,18 @@ public final class DimensionRegistry {
|
|||||||
return defaultDimension;
|
return defaultDimension;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CompoundBinaryTag getOverWorld() {
|
|
||||||
return overWorld;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CompoundBinaryTag getTheEnd() {
|
|
||||||
return theEnd;
|
|
||||||
}
|
|
||||||
|
|
||||||
public CompoundBinaryTag getNether() {
|
|
||||||
return nether;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void load(LimboServer server, String def) throws IOException {
|
public void load(LimboServer server, String def) throws IOException {
|
||||||
InputStream in = server.getClass().getResourceAsStream("/dimension_registry.nbt");
|
InputStream in = server.getClass().getResourceAsStream("/dimension_registry.nbt");
|
||||||
|
|
||||||
|
if(in == null)
|
||||||
|
throw new FileNotFoundException("Cannot find dimension registry file");
|
||||||
|
|
||||||
codec = BinaryTagIO.readCompressedInputStream(in);
|
codec = BinaryTagIO.readCompressedInputStream(in);
|
||||||
ListBinaryTag dimensions = codec.getCompound("minecraft:dimension_type").getList("value");
|
ListBinaryTag dimensions = codec.getCompound("minecraft:dimension_type").getList("value");
|
||||||
|
|
||||||
overWorld = (CompoundBinaryTag) ((CompoundBinaryTag) dimensions.get(0)).get("element");
|
CompoundBinaryTag overWorld = (CompoundBinaryTag) ((CompoundBinaryTag) dimensions.get(0)).get("element");
|
||||||
nether = (CompoundBinaryTag) ((CompoundBinaryTag) dimensions.get(2)).get("element");
|
CompoundBinaryTag nether = (CompoundBinaryTag) ((CompoundBinaryTag) dimensions.get(2)).get("element");
|
||||||
theEnd = (CompoundBinaryTag) ((CompoundBinaryTag) dimensions.get(3)).get("element");
|
CompoundBinaryTag theEnd = (CompoundBinaryTag) ((CompoundBinaryTag) dimensions.get(3)).get("element");
|
||||||
|
|
||||||
switch (def.toLowerCase()) {
|
switch (def.toLowerCase()) {
|
||||||
case "overworld":
|
case "overworld":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user