public Protocol16Handler(TcpClient Client, int ProtocolVersion, IMinecraftComHandler Handler) { ConsoleIO.SetAutoCompleteEngine(this); if (protocolversion >= 72) { ChatParser.InitTranslations(); } this.c = Client; this.protocolversion = ProtocolVersion; this.handler = Handler; if (Handler.GetTerrainEnabled()) { ConsoleIO.WriteLineFormatted("§8Terrain & Movements currently not handled for that MC version."); Handler.SetTerrainEnabled(false); } if (handler.GetInventoryEnabled()) { ConsoleIO.WriteLineFormatted("§8Inventories are currently not handled for that MC version."); handler.SetInventoryEnabled(false); } if (handler.GetEntityHandlingEnabled()) { ConsoleIO.WriteLineFormatted("§8Entities are currently not handled for that MC version."); handler.SetEntityHandlingEnabled(false); } }
public Protocol16Handler(TcpClient Client, int ProtocolVersion, IMinecraftComHandler Handler) { ConsoleIO.SetAutoCompleteEngine(this); if (protocolversion >= 72) { ChatParser.InitTranslations(); } this.c = Client; this.protocolversion = ProtocolVersion; this.handler = Handler; if (Handler.GetTerrainEnabled()) { Translations.WriteLineFormatted("extra.terrainandmovement_disabled"); Handler.SetTerrainEnabled(false); } if (handler.GetInventoryEnabled()) { Translations.WriteLineFormatted("extra.inventory_disabled"); handler.SetInventoryEnabled(false); } if (handler.GetEntityHandlingEnabled()) { Translations.WriteLineFormatted("extra.entity_disabled"); handler.SetEntityHandlingEnabled(false); } }
public Protocol16Handler(TcpClient Client, int ProtocolVersion, IMinecraftComHandler Handler) { ConsoleIO.SetAutoCompleteEngine(this); if (protocolversion >= 72) { ChatParser.InitTranslations(); } this.c = Client; this.protocolversion = ProtocolVersion; this.handler = Handler; if (Handler.GetTerrainEnabled()) { ConsoleIO.WriteLineFormatted("§e[错误]§c世界交互 暂不支持此版本"); Handler.SetTerrainEnabled(false); } if (handler.GetInventoryEnabled()) { ConsoleIO.WriteLineFormatted("§e[错误]§c物品栏交互暂不支持此版本"); handler.SetInventoryEnabled(false); } if (handler.GetEntityHandlingEnabled()) { ConsoleIO.WriteLineFormatted("§e[错误]§c实体交互暂不支持此版本"); handler.SetEntityHandlingEnabled(false); } }
public Protocol18Handler(TcpClient Client, int protocolVersion, IMinecraftComHandler handler, ForgeInfo forgeInfo) { ConsoleIO.SetAutoCompleteEngine(this); ChatParser.InitTranslations(); this.socketWrapper = new SocketWrapper(Client); this.dataTypes = new DataTypes(protocolVersion); this.protocolversion = protocolVersion; this.handler = handler; this.pForge = new Protocol18Forge(forgeInfo, protocolVersion, dataTypes, this, handler); this.pTerrain = new Protocol18Terrain(protocolVersion, dataTypes, handler); if (handler.GetTerrainEnabled() && protocolversion > MC1142Version) { ConsoleIO.WriteLineFormatted("§8Terrain & Movements currently not handled for that MC version."); handler.SetTerrainEnabled(false); } if (handler.GetInventoryEnabled() && protocolversion > MC114Version) { ConsoleIO.WriteLineFormatted("§8Inventories are currently not handled for that MC version."); handler.SetInventoryEnabled(false); } if (protocolversion >= MC113Version) { if (protocolVersion > MC1142Version && handler.GetTerrainEnabled()) { throw new NotImplementedException("Please update block types handling for this Minecraft version. See Material.cs"); } if (protocolVersion >= MC114Version) { Block.Palette = new Palette114(); } else { Block.Palette = new Palette113(); } } else { Block.Palette = new Palette112(); } }