mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
1.19.3 entity & inventory & terrain support
This commit is contained in:
parent
b4d7d64cdd
commit
957054eb12
8 changed files with 3052 additions and 14 deletions
1204
MinecraftClient/Inventory/ItemPalettes/ItemPalette1193.cs
Normal file
1204
MinecraftClient/Inventory/ItemPalettes/ItemPalette1193.cs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -20,6 +20,7 @@
|
|||
AcaciaDoor,
|
||||
AcaciaFence,
|
||||
AcaciaFenceGate,
|
||||
AcaciaHangingSign,
|
||||
AcaciaLeaves,
|
||||
AcaciaLog,
|
||||
AcaciaPlanks,
|
||||
|
|
@ -53,6 +54,23 @@
|
|||
AzureBluet,
|
||||
BakedPotato,
|
||||
Bamboo,
|
||||
BambooBlock,
|
||||
BambooButton,
|
||||
BambooChestRaft,
|
||||
BambooDoor,
|
||||
BambooFence,
|
||||
BambooFenceGate,
|
||||
BambooHangingSign,
|
||||
BambooMosaic,
|
||||
BambooMosaicSlab,
|
||||
BambooMosaicStairs,
|
||||
BambooPlanks,
|
||||
BambooPressurePlate,
|
||||
BambooRaft,
|
||||
BambooSign,
|
||||
BambooSlab,
|
||||
BambooStairs,
|
||||
BambooTrapdoor,
|
||||
Barrel,
|
||||
Barrier,
|
||||
Basalt,
|
||||
|
|
@ -74,6 +92,7 @@
|
|||
BirchDoor,
|
||||
BirchFence,
|
||||
BirchFenceGate,
|
||||
BirchHangingSign,
|
||||
BirchLeaves,
|
||||
BirchLog,
|
||||
BirchPlanks,
|
||||
|
|
@ -161,6 +180,7 @@
|
|||
Cactus,
|
||||
Cake,
|
||||
Calcite,
|
||||
CamelSpawnEgg,
|
||||
Campfire,
|
||||
Candle,
|
||||
Carrot,
|
||||
|
|
@ -182,6 +202,7 @@
|
|||
Chicken,
|
||||
ChickenSpawnEgg,
|
||||
ChippedAnvil,
|
||||
ChiseledBookshelf,
|
||||
ChiseledDeepslate,
|
||||
ChiseledNetherBricks,
|
||||
ChiseledPolishedBlackstone,
|
||||
|
|
@ -245,6 +266,7 @@
|
|||
CrimsonFence,
|
||||
CrimsonFenceGate,
|
||||
CrimsonFungus,
|
||||
CrimsonHangingSign,
|
||||
CrimsonHyphae,
|
||||
CrimsonNylium,
|
||||
CrimsonPlanks,
|
||||
|
|
@ -285,6 +307,7 @@
|
|||
DarkOakDoor,
|
||||
DarkOakFence,
|
||||
DarkOakFenceGate,
|
||||
DarkOakHangingSign,
|
||||
DarkOakLeaves,
|
||||
DarkOakLog,
|
||||
DarkOakPlanks,
|
||||
|
|
@ -384,6 +407,7 @@
|
|||
EndStoneBrickWall,
|
||||
EndStoneBricks,
|
||||
EnderChest,
|
||||
EnderDragonSpawnEgg,
|
||||
EnderEye,
|
||||
EnderPearl,
|
||||
EndermanSpawnEgg,
|
||||
|
|
@ -518,6 +542,7 @@
|
|||
IronBoots,
|
||||
IronChestplate,
|
||||
IronDoor,
|
||||
IronGolemSpawnEgg,
|
||||
IronHelmet,
|
||||
IronHoe,
|
||||
IronHorseArmor,
|
||||
|
|
@ -539,6 +564,7 @@
|
|||
JungleDoor,
|
||||
JungleFence,
|
||||
JungleFenceGate,
|
||||
JungleHangingSign,
|
||||
JungleLeaves,
|
||||
JungleLog,
|
||||
JunglePlanks,
|
||||
|
|
@ -639,6 +665,7 @@
|
|||
MangroveDoor,
|
||||
MangroveFence,
|
||||
MangroveFenceGate,
|
||||
MangroveHangingSign,
|
||||
MangroveLeaves,
|
||||
MangroveLog,
|
||||
MangrovePlanks,
|
||||
|
|
@ -729,6 +756,7 @@
|
|||
OakDoor,
|
||||
OakFence,
|
||||
OakFenceGate,
|
||||
OakHangingSign,
|
||||
OakLeaves,
|
||||
OakLog,
|
||||
OakPlanks,
|
||||
|
|
@ -776,6 +804,7 @@
|
|||
PigSpawnEgg,
|
||||
PiglinBannerPattern,
|
||||
PiglinBruteSpawnEgg,
|
||||
PiglinHead,
|
||||
PiglinSpawnEgg,
|
||||
PillagerSpawnEgg,
|
||||
PinkBanner,
|
||||
|
|
@ -970,6 +999,7 @@
|
|||
SmoothStoneSlab,
|
||||
Snow,
|
||||
SnowBlock,
|
||||
SnowGolemSpawnEgg,
|
||||
Snowball,
|
||||
SoulCampfire,
|
||||
SoulLantern,
|
||||
|
|
@ -989,6 +1019,7 @@
|
|||
SpruceDoor,
|
||||
SpruceFence,
|
||||
SpruceFenceGate,
|
||||
SpruceHangingSign,
|
||||
SpruceLeaves,
|
||||
SpruceLog,
|
||||
SprucePlanks,
|
||||
|
|
@ -1023,6 +1054,7 @@
|
|||
String,
|
||||
StrippedAcaciaLog,
|
||||
StrippedAcaciaWood,
|
||||
StrippedBambooBlock,
|
||||
StrippedBirchLog,
|
||||
StrippedBirchWood,
|
||||
StrippedCrimsonHyphae,
|
||||
|
|
@ -1085,6 +1117,7 @@
|
|||
WarpedFenceGate,
|
||||
WarpedFungus,
|
||||
WarpedFungusOnAStick,
|
||||
WarpedHangingSign,
|
||||
WarpedHyphae,
|
||||
WarpedNylium,
|
||||
WarpedPlanks,
|
||||
|
|
@ -1139,6 +1172,7 @@
|
|||
WitherRose,
|
||||
WitherSkeletonSkull,
|
||||
WitherSkeletonSpawnEgg,
|
||||
WitherSpawnEgg,
|
||||
WolfSpawnEgg,
|
||||
WoodenAxe,
|
||||
WoodenHoe,
|
||||
|
|
|
|||
1605
MinecraftClient/Mapping/BlockPalettes/Palette1193.cs
Normal file
1605
MinecraftClient/Mapping/BlockPalettes/Palette1193.cs
Normal file
File diff suppressed because it is too large
Load diff
137
MinecraftClient/Mapping/EntityPalettes/EntityPalette1193.cs
Normal file
137
MinecraftClient/Mapping/EntityPalettes/EntityPalette1193.cs
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace MinecraftClient.Mapping.EntityPalettes
|
||||
{
|
||||
public class EntityPalette1193 : EntityPalette
|
||||
{
|
||||
private static readonly Dictionary<int, EntityType> mappings = new();
|
||||
|
||||
static EntityPalette1193()
|
||||
{
|
||||
mappings[0] = EntityType.Allay;
|
||||
mappings[1] = EntityType.AreaEffectCloud;
|
||||
mappings[2] = EntityType.ArmorStand;
|
||||
mappings[3] = EntityType.Arrow;
|
||||
mappings[4] = EntityType.Axolotl;
|
||||
mappings[5] = EntityType.Bat;
|
||||
mappings[6] = EntityType.Bee;
|
||||
mappings[7] = EntityType.Blaze;
|
||||
mappings[8] = EntityType.Boat;
|
||||
mappings[11] = EntityType.Camel;
|
||||
mappings[10] = EntityType.Cat;
|
||||
mappings[12] = EntityType.CaveSpider;
|
||||
mappings[9] = EntityType.ChestBoat;
|
||||
mappings[55] = EntityType.ChestMinecart;
|
||||
mappings[13] = EntityType.Chicken;
|
||||
mappings[14] = EntityType.Cod;
|
||||
mappings[56] = EntityType.CommandBlockMinecart;
|
||||
mappings[15] = EntityType.Cow;
|
||||
mappings[16] = EntityType.Creeper;
|
||||
mappings[17] = EntityType.Dolphin;
|
||||
mappings[18] = EntityType.Donkey;
|
||||
mappings[19] = EntityType.DragonFireball;
|
||||
mappings[20] = EntityType.Drowned;
|
||||
mappings[94] = EntityType.Egg;
|
||||
mappings[21] = EntityType.ElderGuardian;
|
||||
mappings[22] = EntityType.EndCrystal;
|
||||
mappings[23] = EntityType.EnderDragon;
|
||||
mappings[95] = EntityType.EnderPearl;
|
||||
mappings[24] = EntityType.Enderman;
|
||||
mappings[25] = EntityType.Endermite;
|
||||
mappings[26] = EntityType.Evoker;
|
||||
mappings[27] = EntityType.EvokerFangs;
|
||||
mappings[96] = EntityType.ExperienceBottle;
|
||||
mappings[28] = EntityType.ExperienceOrb;
|
||||
mappings[29] = EntityType.EyeOfEnder;
|
||||
mappings[30] = EntityType.FallingBlock;
|
||||
mappings[47] = EntityType.Fireball;
|
||||
mappings[31] = EntityType.FireworkRocket;
|
||||
mappings[118] = EntityType.FishingBobber;
|
||||
mappings[32] = EntityType.Fox;
|
||||
mappings[33] = EntityType.Frog;
|
||||
mappings[57] = EntityType.FurnaceMinecart;
|
||||
mappings[34] = EntityType.Ghast;
|
||||
mappings[35] = EntityType.Giant;
|
||||
mappings[36] = EntityType.GlowItemFrame;
|
||||
mappings[37] = EntityType.GlowSquid;
|
||||
mappings[38] = EntityType.Goat;
|
||||
mappings[39] = EntityType.Guardian;
|
||||
mappings[40] = EntityType.Hoglin;
|
||||
mappings[58] = EntityType.HopperMinecart;
|
||||
mappings[41] = EntityType.Horse;
|
||||
mappings[42] = EntityType.Husk;
|
||||
mappings[43] = EntityType.Illusioner;
|
||||
mappings[44] = EntityType.IronGolem;
|
||||
mappings[45] = EntityType.Item;
|
||||
mappings[46] = EntityType.ItemFrame;
|
||||
mappings[48] = EntityType.LeashKnot;
|
||||
mappings[49] = EntityType.LightningBolt;
|
||||
mappings[50] = EntityType.Llama;
|
||||
mappings[51] = EntityType.LlamaSpit;
|
||||
mappings[52] = EntityType.MagmaCube;
|
||||
mappings[53] = EntityType.Marker;
|
||||
mappings[54] = EntityType.Minecart;
|
||||
mappings[62] = EntityType.Mooshroom;
|
||||
mappings[61] = EntityType.Mule;
|
||||
mappings[63] = EntityType.Ocelot;
|
||||
mappings[64] = EntityType.Painting;
|
||||
mappings[65] = EntityType.Panda;
|
||||
mappings[66] = EntityType.Parrot;
|
||||
mappings[67] = EntityType.Phantom;
|
||||
mappings[68] = EntityType.Pig;
|
||||
mappings[69] = EntityType.Piglin;
|
||||
mappings[70] = EntityType.PiglinBrute;
|
||||
mappings[71] = EntityType.Pillager;
|
||||
mappings[117] = EntityType.Player;
|
||||
mappings[72] = EntityType.PolarBear;
|
||||
mappings[97] = EntityType.Potion;
|
||||
mappings[74] = EntityType.Pufferfish;
|
||||
mappings[75] = EntityType.Rabbit;
|
||||
mappings[76] = EntityType.Ravager;
|
||||
mappings[77] = EntityType.Salmon;
|
||||
mappings[78] = EntityType.Sheep;
|
||||
mappings[79] = EntityType.Shulker;
|
||||
mappings[80] = EntityType.ShulkerBullet;
|
||||
mappings[81] = EntityType.Silverfish;
|
||||
mappings[82] = EntityType.Skeleton;
|
||||
mappings[83] = EntityType.SkeletonHorse;
|
||||
mappings[84] = EntityType.Slime;
|
||||
mappings[85] = EntityType.SmallFireball;
|
||||
mappings[86] = EntityType.SnowGolem;
|
||||
mappings[87] = EntityType.Snowball;
|
||||
mappings[59] = EntityType.SpawnerMinecart;
|
||||
mappings[88] = EntityType.SpectralArrow;
|
||||
mappings[89] = EntityType.Spider;
|
||||
mappings[90] = EntityType.Squid;
|
||||
mappings[91] = EntityType.Stray;
|
||||
mappings[92] = EntityType.Strider;
|
||||
mappings[93] = EntityType.Tadpole;
|
||||
mappings[73] = EntityType.Tnt;
|
||||
mappings[60] = EntityType.TntMinecart;
|
||||
mappings[99] = EntityType.TraderLlama;
|
||||
mappings[98] = EntityType.Trident;
|
||||
mappings[100] = EntityType.TropicalFish;
|
||||
mappings[101] = EntityType.Turtle;
|
||||
mappings[102] = EntityType.Vex;
|
||||
mappings[103] = EntityType.Villager;
|
||||
mappings[104] = EntityType.Vindicator;
|
||||
mappings[105] = EntityType.WanderingTrader;
|
||||
mappings[106] = EntityType.Warden;
|
||||
mappings[107] = EntityType.Witch;
|
||||
mappings[108] = EntityType.Wither;
|
||||
mappings[109] = EntityType.WitherSkeleton;
|
||||
mappings[110] = EntityType.WitherSkull;
|
||||
mappings[111] = EntityType.Wolf;
|
||||
mappings[112] = EntityType.Zoglin;
|
||||
mappings[113] = EntityType.Zombie;
|
||||
mappings[114] = EntityType.ZombieHorse;
|
||||
mappings[115] = EntityType.ZombieVillager;
|
||||
mappings[116] = EntityType.ZombifiedPiglin;
|
||||
}
|
||||
|
||||
protected override Dictionary<int, EntityType> GetDict()
|
||||
{
|
||||
return mappings;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
Bee,
|
||||
Blaze,
|
||||
Boat,
|
||||
Camel,
|
||||
Cat,
|
||||
CaveSpider,
|
||||
ChestBoat,
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@
|
|||
AcaciaDoor,
|
||||
AcaciaFence,
|
||||
AcaciaFenceGate,
|
||||
AcaciaHangingSign,
|
||||
AcaciaLeaves,
|
||||
AcaciaLog,
|
||||
AcaciaPlanks,
|
||||
|
|
@ -27,6 +28,7 @@
|
|||
AcaciaSlab,
|
||||
AcaciaStairs,
|
||||
AcaciaTrapdoor,
|
||||
AcaciaWallHangingSign,
|
||||
AcaciaWallSign,
|
||||
AcaciaWood,
|
||||
ActivatorRail,
|
||||
|
|
@ -46,7 +48,24 @@
|
|||
AzaleaLeaves,
|
||||
AzureBluet,
|
||||
Bamboo,
|
||||
BambooBlock,
|
||||
BambooButton,
|
||||
BambooDoor,
|
||||
BambooFence,
|
||||
BambooFenceGate,
|
||||
BambooHangingSign,
|
||||
BambooMosaic,
|
||||
BambooMosaicSlab,
|
||||
BambooMosaicStairs,
|
||||
BambooPlanks,
|
||||
BambooPressurePlate,
|
||||
BambooSapling,
|
||||
BambooSign,
|
||||
BambooSlab,
|
||||
BambooStairs,
|
||||
BambooTrapdoor,
|
||||
BambooWallHangingSign,
|
||||
BambooWallSign,
|
||||
Barrel,
|
||||
Barrier,
|
||||
Basalt,
|
||||
|
|
@ -62,6 +81,7 @@
|
|||
BirchDoor,
|
||||
BirchFence,
|
||||
BirchFenceGate,
|
||||
BirchHangingSign,
|
||||
BirchLeaves,
|
||||
BirchLog,
|
||||
BirchPlanks,
|
||||
|
|
@ -71,6 +91,7 @@
|
|||
BirchSlab,
|
||||
BirchStairs,
|
||||
BirchTrapdoor,
|
||||
BirchWallHangingSign,
|
||||
BirchWallSign,
|
||||
BirchWood,
|
||||
BlackBanner,
|
||||
|
|
@ -158,6 +179,7 @@
|
|||
ChainCommandBlock,
|
||||
Chest,
|
||||
ChippedAnvil,
|
||||
ChiseledBookshelf,
|
||||
ChiseledDeepslate,
|
||||
ChiseledNetherBricks,
|
||||
ChiseledPolishedBlackstone,
|
||||
|
|
@ -201,6 +223,7 @@
|
|||
CrimsonFence,
|
||||
CrimsonFenceGate,
|
||||
CrimsonFungus,
|
||||
CrimsonHangingSign,
|
||||
CrimsonHyphae,
|
||||
CrimsonNylium,
|
||||
CrimsonPlanks,
|
||||
|
|
@ -211,6 +234,7 @@
|
|||
CrimsonStairs,
|
||||
CrimsonStem,
|
||||
CrimsonTrapdoor,
|
||||
CrimsonWallHangingSign,
|
||||
CrimsonWallSign,
|
||||
CryingObsidian,
|
||||
CutCopper,
|
||||
|
|
@ -240,6 +264,7 @@
|
|||
DarkOakDoor,
|
||||
DarkOakFence,
|
||||
DarkOakFenceGate,
|
||||
DarkOakHangingSign,
|
||||
DarkOakLeaves,
|
||||
DarkOakLog,
|
||||
DarkOakPlanks,
|
||||
|
|
@ -249,6 +274,7 @@
|
|||
DarkOakSlab,
|
||||
DarkOakStairs,
|
||||
DarkOakTrapdoor,
|
||||
DarkOakWallHangingSign,
|
||||
DarkOakWallSign,
|
||||
DarkOakWood,
|
||||
DarkPrismarine,
|
||||
|
|
@ -413,6 +439,7 @@
|
|||
JungleDoor,
|
||||
JungleFence,
|
||||
JungleFenceGate,
|
||||
JungleHangingSign,
|
||||
JungleLeaves,
|
||||
JungleLog,
|
||||
JunglePlanks,
|
||||
|
|
@ -422,6 +449,7 @@
|
|||
JungleSlab,
|
||||
JungleStairs,
|
||||
JungleTrapdoor,
|
||||
JungleWallHangingSign,
|
||||
JungleWallSign,
|
||||
JungleWood,
|
||||
Kelp,
|
||||
|
|
@ -505,6 +533,7 @@
|
|||
MangroveDoor,
|
||||
MangroveFence,
|
||||
MangroveFenceGate,
|
||||
MangroveHangingSign,
|
||||
MangroveLeaves,
|
||||
MangroveLog,
|
||||
MangrovePlanks,
|
||||
|
|
@ -515,6 +544,7 @@
|
|||
MangroveSlab,
|
||||
MangroveStairs,
|
||||
MangroveTrapdoor,
|
||||
MangroveWallHangingSign,
|
||||
MangroveWallSign,
|
||||
MangroveWood,
|
||||
MediumAmethystBud,
|
||||
|
|
@ -557,6 +587,7 @@
|
|||
OakDoor,
|
||||
OakFence,
|
||||
OakFenceGate,
|
||||
OakHangingSign,
|
||||
OakLeaves,
|
||||
OakLog,
|
||||
OakPlanks,
|
||||
|
|
@ -566,6 +597,7 @@
|
|||
OakSlab,
|
||||
OakStairs,
|
||||
OakTrapdoor,
|
||||
OakWallHangingSign,
|
||||
OakWallSign,
|
||||
OakWood,
|
||||
Observer,
|
||||
|
|
@ -596,6 +628,8 @@
|
|||
PearlescentFroglight,
|
||||
Peony,
|
||||
PetrifiedOakSlab,
|
||||
PiglinHead,
|
||||
PiglinWallHead,
|
||||
PinkBanner,
|
||||
PinkBed,
|
||||
PinkCandle,
|
||||
|
|
@ -803,6 +837,7 @@
|
|||
SpruceDoor,
|
||||
SpruceFence,
|
||||
SpruceFenceGate,
|
||||
SpruceHangingSign,
|
||||
SpruceLeaves,
|
||||
SpruceLog,
|
||||
SprucePlanks,
|
||||
|
|
@ -812,6 +847,7 @@
|
|||
SpruceSlab,
|
||||
SpruceStairs,
|
||||
SpruceTrapdoor,
|
||||
SpruceWallHangingSign,
|
||||
SpruceWallSign,
|
||||
SpruceWood,
|
||||
StickyPiston,
|
||||
|
|
@ -827,6 +863,7 @@
|
|||
Stonecutter,
|
||||
StrippedAcaciaLog,
|
||||
StrippedAcaciaWood,
|
||||
StrippedBambooBlock,
|
||||
StrippedBirchLog,
|
||||
StrippedBirchWood,
|
||||
StrippedCrimsonHyphae,
|
||||
|
|
@ -875,6 +912,7 @@
|
|||
WarpedFence,
|
||||
WarpedFenceGate,
|
||||
WarpedFungus,
|
||||
WarpedHangingSign,
|
||||
WarpedHyphae,
|
||||
WarpedNylium,
|
||||
WarpedPlanks,
|
||||
|
|
@ -885,6 +923,7 @@
|
|||
WarpedStairs,
|
||||
WarpedStem,
|
||||
WarpedTrapdoor,
|
||||
WarpedWallHangingSign,
|
||||
WarpedWallSign,
|
||||
WarpedWartBlock,
|
||||
Water,
|
||||
|
|
|
|||
|
|
@ -591,6 +591,9 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
{
|
||||
int type = ReadNextVarInt(cache);
|
||||
|
||||
// Value's data type is depended on Type
|
||||
object? value = null;
|
||||
|
||||
// starting from 1.13, Optional Chat is inserted as number 5 in 1.13 and IDs after 5 got shifted.
|
||||
// Increase type ID by 1 if
|
||||
// - below 1.13
|
||||
|
|
@ -598,20 +601,29 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
if (protocolversion < Protocol18Handler.MC_1_13_Version)
|
||||
{
|
||||
if (type > 4)
|
||||
++type;
|
||||
}
|
||||
else if (protocolversion >= Protocol18Handler.MC_1_19_3_Version)
|
||||
{
|
||||
type += 1;
|
||||
if (type == 2)
|
||||
{
|
||||
value = ReadNextVarLong(cache);
|
||||
type = -1;
|
||||
}
|
||||
else if (type >= 3)
|
||||
{
|
||||
--type;
|
||||
}
|
||||
}
|
||||
|
||||
// Value's data type is depended on Type
|
||||
object? value = null;
|
||||
|
||||
// This is backward compatible since new type is appended to the end
|
||||
// Version upgrade note
|
||||
// - Check type ID got shifted or not
|
||||
// - Add new type if any
|
||||
switch (type)
|
||||
{
|
||||
case -1: // already readed
|
||||
break;
|
||||
case 0: // byte
|
||||
value = ReadNextByte(cache);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -107,28 +107,30 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
randomGen = RandomNumberGenerator.Create();
|
||||
lastSeenMessagesCollector = protocolVersion >= MC_1_19_3_Version ? new(20) : new(5);
|
||||
|
||||
if (handler.GetTerrainEnabled() && protocolVersion > MC_1_19_2_Version)
|
||||
if (handler.GetTerrainEnabled() && protocolVersion > MC_1_19_3_Version)
|
||||
{
|
||||
log.Error("§c" + Translations.extra_terrainandmovement_disabled);
|
||||
handler.SetTerrainEnabled(false);
|
||||
}
|
||||
|
||||
if (handler.GetInventoryEnabled() && (protocolVersion < MC_1_10_Version || protocolVersion > MC_1_19_2_Version))
|
||||
if (handler.GetInventoryEnabled() && (protocolVersion < MC_1_10_Version || protocolVersion > MC_1_19_3_Version))
|
||||
{
|
||||
log.Error("§c" + Translations.extra_inventory_disabled);
|
||||
handler.SetInventoryEnabled(false);
|
||||
}
|
||||
if (handler.GetEntityHandlingEnabled() && (protocolVersion < MC_1_10_Version || protocolVersion > MC_1_19_2_Version))
|
||||
if (handler.GetEntityHandlingEnabled() && (protocolVersion < MC_1_10_Version || protocolVersion > MC_1_19_3_Version))
|
||||
{
|
||||
log.Error("§c" + Translations.extra_entity_disabled);
|
||||
handler.SetEntityHandlingEnabled(false);
|
||||
}
|
||||
|
||||
// Block palette
|
||||
if (protocolVersion > MC_1_19_2_Version && handler.GetTerrainEnabled())
|
||||
if (protocolVersion > MC_1_19_3_Version && handler.GetTerrainEnabled())
|
||||
throw new NotImplementedException(Translations.exception_palette_block);
|
||||
|
||||
if (protocolVersion >= MC_1_19_Version)
|
||||
if (protocolVersion >= MC_1_19_3_Version)
|
||||
Block.Palette = new Palette1193();
|
||||
else if (protocolVersion >= MC_1_19_Version)
|
||||
Block.Palette = new Palette119();
|
||||
else if (protocolVersion >= MC_1_17_Version)
|
||||
Block.Palette = new Palette117();
|
||||
|
|
@ -144,10 +146,12 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
Block.Palette = new Palette112();
|
||||
|
||||
// Entity palette
|
||||
if (protocolVersion > MC_1_19_2_Version && handler.GetEntityHandlingEnabled())
|
||||
if (protocolVersion > MC_1_19_3_Version && handler.GetEntityHandlingEnabled())
|
||||
throw new NotImplementedException(Translations.exception_palette_entity);
|
||||
|
||||
if (protocolVersion >= MC_1_19_Version)
|
||||
if (protocolVersion >= MC_1_19_3_Version)
|
||||
entityPalette = new EntityPalette1193();
|
||||
else if (protocolVersion >= MC_1_19_Version)
|
||||
entityPalette = new EntityPalette119();
|
||||
else if (protocolVersion >= MC_1_17_Version)
|
||||
entityPalette = new EntityPalette117();
|
||||
|
|
@ -165,10 +169,12 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
entityPalette = new EntityPalette112();
|
||||
|
||||
// Item palette
|
||||
if (protocolVersion > MC_1_19_2_Version && handler.GetInventoryEnabled())
|
||||
if (protocolVersion > MC_1_19_3_Version && handler.GetInventoryEnabled())
|
||||
throw new NotImplementedException(Translations.exception_palette_item);
|
||||
|
||||
if (protocolVersion >= MC_1_19_Version)
|
||||
if (protocolVersion >= MC_1_19_3_Version)
|
||||
itemPalette = new ItemPalette1193();
|
||||
else if (protocolVersion >= MC_1_19_Version)
|
||||
itemPalette = new ItemPalette119();
|
||||
else if (protocolVersion >= MC_1_18_1_Version)
|
||||
itemPalette = new ItemPalette118();
|
||||
|
|
@ -1851,7 +1857,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
Dictionary<int, object?> metadata = dataTypes.ReadNextMetadata(packetData, itemPalette);
|
||||
|
||||
int healthField; // See https://wiki.vg/Entity_metadata#Living_Entity
|
||||
if (protocolVersion > MC_1_19_2_Version)
|
||||
if (protocolVersion > MC_1_19_3_Version)
|
||||
throw new NotImplementedException(Translations.exception_palette_healthfield);
|
||||
else if (protocolVersion >= MC_1_17_Version) // 1.17 and above
|
||||
healthField = 9;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue