Archived
0

разделили сетевые пакеты по java пакетам

This commit is contained in:
2019-01-29 22:36:22 +03:00
parent 0e6fd75900
commit 06b1b5aeae
39 changed files with 45 additions and 119 deletions

View File

@@ -15,7 +15,7 @@ import mc.core.eventbus.EventBus;
import mc.core.network.Server;
import mc.core.network.StartServerException;
import mc.core.network.proto_1_12_2.State;
import mc.core.network.proto_1_12_2.packets.StatusResponsePacket;
import mc.core.network.proto_1_12_2.packets.serverside.StatusResponsePacket;
import mc.core.player.Player;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;

View File

@@ -47,7 +47,7 @@ public class PacketDecoder extends ReplayingDecoder<CSPacket> {
Class<? extends CSPacket> packetClass = state.getClientSidePacket(packetId);
if (packetClass == null) {
log.warn("Unknown packet: {}:0x{}", state.name(), hexPacketId);
log.warn("Unknown packet: {}:0x{}", state.name(), hexPacketId); //TODO
in.skipBytes(leftDataPacket);
} else {
netStream.setDataSize(leftDataPacket);

View File

@@ -7,9 +7,9 @@ import mc.core.eventbus.events.SC_ChunkUnloadEvent;
import mc.core.eventbus.events.SC_PlayerMoveEvent;
import mc.core.network.NetChannel;
import mc.core.network.proto_1_12_2.TeleportManager;
import mc.core.network.proto_1_12_2.packets.ChunkDataPacket;
import mc.core.network.proto_1_12_2.packets.serverside.ChunkDataPacket;
import mc.core.network.proto_1_12_2.packets.PlayerPositionAndLookPacket;
import mc.core.network.proto_1_12_2.packets.UnloadChunkPacket;
import mc.core.network.proto_1_12_2.packets.serverside.UnloadChunkPacket;
import mc.core.utils.CompactedCoords;
import mc.core.world.chunk.Chunk;

View File

@@ -7,7 +7,7 @@ package mc.core.network.proto_1_12_2.netty.handlers;
import io.netty.channel.Channel;
import lombok.extern.slf4j.Slf4j;
import mc.core.network.proto_1_12_2.State;
import mc.core.network.proto_1_12_2.packets.HandshakePacket;
import mc.core.network.proto_1_12_2.packets.clientside.HandshakePacket;
import org.springframework.stereotype.Component;
import static mc.core.network.proto_1_12_2.netty.NettyServer.ATTR_STATE;

View File

@@ -9,6 +9,8 @@ import mc.core.network.proto_1_12_2.TeleportManager;
import mc.core.network.proto_1_12_2.netty.KeepAliveThread;
import mc.core.network.proto_1_12_2.netty.wrappers.WrapperNetChannel;
import mc.core.network.proto_1_12_2.packets.*;
import mc.core.network.proto_1_12_2.packets.clientside.LoginStartPacket;
import mc.core.network.proto_1_12_2.packets.serverside.*;
import mc.core.player.Player;
import mc.core.player.PlayerManager;
import mc.core.player.PlayerMode;

View File

@@ -8,6 +8,7 @@ import mc.core.eventbus.EventBus;
import mc.core.eventbus.events.CS_PlayerMoveEvent;
import mc.core.network.proto_1_12_2.TeleportManager;
import mc.core.network.proto_1_12_2.packets.*;
import mc.core.network.proto_1_12_2.packets.clientside.*;
import mc.core.player.Player;
import mc.core.player.PlayerSettings;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -7,8 +7,8 @@ package mc.core.network.proto_1_12_2.netty.handlers;
import io.netty.channel.Channel;
import mc.core.Config;
import mc.core.network.proto_1_12_2.packets.PingPacket;
import mc.core.network.proto_1_12_2.packets.StatusRequestPacket;
import mc.core.network.proto_1_12_2.packets.StatusResponsePacket;
import mc.core.network.proto_1_12_2.packets.clientside.StatusRequestPacket;
import mc.core.network.proto_1_12_2.packets.serverside.StatusResponsePacket;
import mc.core.player.PlayerManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

View File

@@ -9,9 +9,9 @@ import lombok.RequiredArgsConstructor;
import mc.core.chat.MessageType;
import mc.core.network.NetChannel;
import mc.core.network.SCPacket;
import mc.core.network.proto_1_12_2.packets.ChatMessageServerPacket;
import mc.core.network.proto_1_12_2.packets.TimeUpdatePacket;
import mc.core.network.proto_1_12_2.packets.TitlePacket;
import mc.core.network.proto_1_12_2.packets.serverside.ChatMessageServerPacket;
import mc.core.network.proto_1_12_2.packets.serverside.TimeUpdatePacket;
import mc.core.network.proto_1_12_2.packets.serverside.TitlePacket;
import mc.core.text.Text;
import mc.core.text.Title;