3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-12-26 16:12:42 +01:00

Tiny cleanup allow it to be disabled via config and add lenis0012 to contributors <3

Dieser Commit ist enthalten in:
Myles 2016-03-09 21:30:43 +00:00
Ursprung 7b36a9de51
Commit c11ad7930f
5 geänderte Dateien mit 12 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -40,6 +40,8 @@ Contributors:
**fillefilip8** **fillefilip8**
**lenis0012**
Releases / Dev Builds: Releases / Dev Builds:

Datei anzeigen

@ -73,7 +73,8 @@ public class ViaVersionPlugin extends JavaPlugin implements ViaVersionAPI {
getLogger().info("ViaVersion " + getDescription().getVersion() + " is now enabled, injecting. (Allows 1.8 to be accessed via 1.9)"); getLogger().info("ViaVersion " + getDescription().getVersion() + " is now enabled, injecting. (Allows 1.8 to be accessed via 1.9)");
injectPacketHandler(); injectPacketHandler();
new ViaIdleThread(portedPlayers).runTaskTimerAsynchronously(this, 1L, 1L); // Updates player's idle status if (getConfig().getBoolean("simulate-pt", true))
new ViaIdleThread(portedPlayers).runTaskTimerAsynchronously(this, 1L, 1L); // Updates player's idle status
if (getConfig().getBoolean("checkforupdates")) if (getConfig().getBoolean("checkforupdates"))
UpdateUtil.sendUpdateMessage(this); UpdateUtil.sendUpdateMessage(this);

Datei anzeigen

@ -38,11 +38,6 @@ public class ViaDecodeHandler extends ByteToMessageDecoder {
bytebuf.clear(); bytebuf.clear();
throw e; throw e;
} }
// Update idle status (player, position, look, positionandlook)
if(id == 0x0F || id == 0x0E || id == 0x0D || id == 0x0C) {
info.incrementIdlePacket();
}
} }
// call minecraft decoder // call minecraft decoder
list.addAll(PacketUtil.callDecode(this.minecraftDecoder, ctx, bytebuf)); list.addAll(PacketUtil.callDecode(this.minecraftDecoder, ctx, bytebuf));

Datei anzeigen

@ -43,6 +43,11 @@ public class IncomingTransformer {
if (packet == PacketType.PLAY_TP_CONFIRM || packet == PacketType.PLAY_VEHICLE_MOVE_REQUEST) { //TODO handle client-sided horse riding if (packet == PacketType.PLAY_TP_CONFIRM || packet == PacketType.PLAY_VEHICLE_MOVE_REQUEST) { //TODO handle client-sided horse riding
throw new CancelException(); throw new CancelException();
} }
// Handle movement increment
// Update idle status (player, position, look, positionandlook)
if(packet == PacketType.PLAY_PLAYER || packet == PacketType.PLAY_PLAYER_POSITION_REQUEST || packet == PacketType.PLAY_PLAYER_LOOK_REQUEST || packet == PacketType.PLAY_PLAYER_POSITION_LOOK_REQUEST) {
info.incrementIdlePacket();
}
PacketUtil.writeVarInt(packetID, output); PacketUtil.writeVarInt(packetID, output);
if (packet == PacketType.HANDSHAKE) { if (packet == PacketType.HANDSHAKE) {
int protVer = PacketUtil.readVarInt(input); int protVer = PacketUtil.readVarInt(input);

Datei anzeigen

@ -17,3 +17,5 @@ shield-blocking: true
hologram-patch: false hologram-patch: false
# This is the offset, should work as default when enabled. # This is the offset, should work as default when enabled.
hologram-y: -1 hologram-y: -1
# Enable player tick simulation, this fixes eating, drinking, nether portals.
simulate-pt: true