3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-19 22:40:18 +01:00

Remove unnecessary code/debugs

Dieser Commit ist enthalten in:
EOT3000 2020-04-15 10:25:40 -04:00
Ursprung fa1e3aa4b0
Commit 1a194dbce8
3 geänderte Dateien mit 2 neuen und 4 gelöschten Zeilen

Datei anzeigen

@ -63,8 +63,6 @@ public class GeyserConnector {
public static final String NAME = "Geyser"; public static final String NAME = "Geyser";
public static final String VERSION = "1.0-SNAPSHOT"; public static final String VERSION = "1.0-SNAPSHOT";
//Change this on every game version
public static final String GAME_VERSION = "1.14.0";
private final Map<InetSocketAddress, GeyserSession> players = new HashMap<>(); private final Map<InetSocketAddress, GeyserSession> players = new HashMap<>();

Datei anzeigen

@ -74,7 +74,6 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
@Override @Override
public boolean handle(ResourcePackClientResponsePacket packet) { public boolean handle(ResourcePackClientResponsePacket packet) {
System.out.println(packet.getStatus());
switch (packet.getStatus()) { switch (packet.getStatus()) {
case COMPLETED: case COMPLETED:
session.connect(connector.getRemoteServer()); session.connect(connector.getRemoteServer());
@ -102,7 +101,7 @@ public class UpstreamPacketHandler extends LoggingPacketHandler {
stackPacket.setExperimental(false); stackPacket.setExperimental(false);
stackPacket.setForcedToAccept(true); stackPacket.setForcedToAccept(true);
stackPacket.setGameVersion(GeyserConnector.GAME_VERSION); stackPacket.setGameVersion(GeyserConnector.BEDROCK_PACKET_CODEC.getMinecraftVersion());
for(ResourcePack pack : ResourcePack.PACKS.values()) { for(ResourcePack pack : ResourcePack.PACKS.values()) {
ResourcePackManifest.Header header = pack.getManifest().getHeader(); ResourcePackManifest.Header header = pack.getManifest().getHeader();
String version = header.getVersion()[0] + "." + header.getVersion()[1] + "." + header.getVersion()[2]; String version = header.getVersion()[0] + "." + header.getVersion()[1] + "." + header.getVersion()[2];

Datei anzeigen

@ -77,6 +77,7 @@ public class ResourcePack {
bytes.writeBytes(Files.readAllBytes(file.toPath())); bytes.writeBytes(Files.readAllBytes(file.toPath()));
hash.update(bytes); hash.update(bytes);
sha256 = hash.digest(); sha256 = hash.digest();
hashed = true;
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException("Could not calculate pack hash", e); throw new RuntimeException("Could not calculate pack hash", e);
} finally { } finally {