mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-23 00:47:39 +01:00
Tiny cleanup allow it to be disabled via config and add lenis0012 to contributors <3
This commit is contained in:
parent
7b36a9de51
commit
c11ad7930f
@ -40,6 +40,8 @@ Contributors:
|
||||
|
||||
**fillefilip8**
|
||||
|
||||
**lenis0012**
|
||||
|
||||
|
||||
|
||||
Releases / Dev Builds:
|
||||
|
@ -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)");
|
||||
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"))
|
||||
UpdateUtil.sendUpdateMessage(this);
|
||||
|
@ -38,11 +38,6 @@ public class ViaDecodeHandler extends ByteToMessageDecoder {
|
||||
bytebuf.clear();
|
||||
throw e;
|
||||
}
|
||||
|
||||
// Update idle status (player, position, look, positionandlook)
|
||||
if(id == 0x0F || id == 0x0E || id == 0x0D || id == 0x0C) {
|
||||
info.incrementIdlePacket();
|
||||
}
|
||||
}
|
||||
// call minecraft decoder
|
||||
list.addAll(PacketUtil.callDecode(this.minecraftDecoder, ctx, bytebuf));
|
||||
|
@ -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
|
||||
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);
|
||||
if (packet == PacketType.HANDSHAKE) {
|
||||
int protVer = PacketUtil.readVarInt(input);
|
||||
|
@ -16,4 +16,6 @@ shield-blocking: true
|
||||
# If they're in the wrong place enable this
|
||||
hologram-patch: false
|
||||
# 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
|
Loading…
Reference in New Issue
Block a user