Inventory, Terrain and Entity handling

This commit is contained in:
Anon 2024-07-02 11:08:46 +02:00
parent 58a5260b5b
commit 5a6fd577e5
35 changed files with 3456 additions and 66 deletions

View file

@ -71,7 +71,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[1835008] = ItemType.DetectorRail;
mappings[1900544] = ItemType.StickyPiston;
mappings[1966080] = ItemType.Cobweb;
mappings[2031617] = ItemType.Grass;
mappings[2031617] = ItemType.ShortGrass;
mappings[2031618] = ItemType.Fern;
mappings[2097152] = ItemType.DeadBush;
mappings[2162688] = ItemType.Piston;

View file

@ -71,7 +71,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[1835008] = ItemType.DetectorRail;
mappings[1900544] = ItemType.StickyPiston;
mappings[1966080] = ItemType.Cobweb;
mappings[2031617] = ItemType.Grass;
mappings[2031617] = ItemType.ShortGrass;
mappings[2031618] = ItemType.Fern;
mappings[2097152] = ItemType.DeadBush;
mappings[2162688] = ItemType.Piston;

View file

@ -62,7 +62,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[1769472] = ItemType.PoweredRail;
mappings[1835008] = ItemType.DetectorRail;
mappings[1900544] = ItemType.StickyPiston;
mappings[2031617] = ItemType.Grass;
mappings[2031617] = ItemType.ShortGrass;
mappings[2031618] = ItemType.Fern;
mappings[2097152] = ItemType.DeadBush;
mappings[2162688] = ItemType.Piston;

View file

@ -88,7 +88,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[73] = ItemType.DetectorRail;
mappings[74] = ItemType.StickyPiston;
mappings[75] = ItemType.Cobweb;
mappings[76] = ItemType.Grass;
mappings[76] = ItemType.ShortGrass;
mappings[77] = ItemType.Fern;
mappings[78] = ItemType.DeadBush;
mappings[79] = ItemType.Seagrass;
@ -531,7 +531,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[516] = ItemType.Jigsaw;
mappings[517] = ItemType.Composter;
mappings[518] = ItemType.TurtleHelmet;
mappings[519] = ItemType.Scute;
mappings[519] = ItemType.TurtleScute;
mappings[520] = ItemType.IronShovel;
mappings[521] = ItemType.IronPickaxe;
mappings[522] = ItemType.IronAxe;

View file

@ -101,7 +101,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[86] = ItemType.DetectorRail;
mappings[87] = ItemType.StickyPiston;
mappings[88] = ItemType.Cobweb;
mappings[89] = ItemType.Grass;
mappings[89] = ItemType.ShortGrass;
mappings[90] = ItemType.Fern;
mappings[91] = ItemType.DeadBush;
mappings[92] = ItemType.Seagrass;
@ -583,7 +583,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[568] = ItemType.StructureBlock;
mappings[569] = ItemType.Jigsaw;
mappings[570] = ItemType.TurtleHelmet;
mappings[571] = ItemType.Scute;
mappings[571] = ItemType.TurtleScute;
mappings[572] = ItemType.IronShovel;
mappings[573] = ItemType.IronPickaxe;
mappings[574] = ItemType.IronAxe;

View file

@ -101,7 +101,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[86] = ItemType.DetectorRail;
mappings[87] = ItemType.StickyPiston;
mappings[88] = ItemType.Cobweb;
mappings[89] = ItemType.Grass;
mappings[89] = ItemType.ShortGrass;
mappings[90] = ItemType.Fern;
mappings[91] = ItemType.DeadBush;
mappings[92] = ItemType.Seagrass;
@ -583,7 +583,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[568] = ItemType.StructureBlock;
mappings[569] = ItemType.Jigsaw;
mappings[570] = ItemType.TurtleHelmet;
mappings[571] = ItemType.Scute;
mappings[571] = ItemType.TurtleScute;
mappings[572] = ItemType.FlintAndSteel;
mappings[573] = ItemType.Apple;
mappings[574] = ItemType.Bow;

View file

@ -158,7 +158,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[147] = ItemType.ChiseledSandstone;
mappings[148] = ItemType.CutSandstone;
mappings[149] = ItemType.Cobweb;
mappings[150] = ItemType.Grass;
mappings[150] = ItemType.ShortGrass;
mappings[151] = ItemType.Fern;
mappings[152] = ItemType.Azalea;
mappings[153] = ItemType.FloweringAzalea;
@ -687,7 +687,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[676] = ItemType.StructureBlock;
mappings[677] = ItemType.Jigsaw;
mappings[678] = ItemType.TurtleHelmet;
mappings[679] = ItemType.Scute;
mappings[679] = ItemType.TurtleScute;
mappings[680] = ItemType.FlintAndSteel;
mappings[681] = ItemType.Apple;
mappings[682] = ItemType.Bow;

View file

@ -158,7 +158,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[147] = ItemType.ChiseledSandstone;
mappings[148] = ItemType.CutSandstone;
mappings[149] = ItemType.Cobweb;
mappings[150] = ItemType.Grass;
mappings[150] = ItemType.ShortGrass;
mappings[151] = ItemType.Fern;
mappings[152] = ItemType.Azalea;
mappings[153] = ItemType.FloweringAzalea;
@ -687,7 +687,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[676] = ItemType.StructureBlock;
mappings[677] = ItemType.Jigsaw;
mappings[678] = ItemType.TurtleHelmet;
mappings[679] = ItemType.Scute;
mappings[679] = ItemType.TurtleScute;
mappings[680] = ItemType.FlintAndSteel;
mappings[681] = ItemType.Apple;
mappings[682] = ItemType.Bow;

View file

@ -449,7 +449,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[598] = ItemType.GraniteSlab;
mappings[581] = ItemType.GraniteStairs;
mappings[355] = ItemType.GraniteWall;
mappings[160] = ItemType.Grass;
mappings[160] = ItemType.ShortGrass;
mappings[14] = ItemType.GrassBlock;
mappings[42] = ItemType.Gravel;
mappings[1032] = ItemType.GrayBanner;
@ -927,7 +927,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[626] = ItemType.SculkSensor;
mappings[329] = ItemType.SculkShrieker;
mappings[327] = ItemType.SculkVein;
mappings[715] = ItemType.Scute;
mappings[715] = ItemType.TurtleScute;
mappings[461] = ItemType.SeaLantern;
mappings[166] = ItemType.SeaPickle;
mappings[165] = ItemType.Seagrass;

View file

@ -473,7 +473,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[608] = ItemType.GraniteSlab;
mappings[591] = ItemType.GraniteStairs;
mappings[365] = ItemType.GraniteWall;
mappings[164] = ItemType.Grass;
mappings[164] = ItemType.ShortGrass;
mappings[14] = ItemType.GrassBlock;
mappings[44] = ItemType.Gravel;
mappings[1066] = ItemType.GrayBanner;
@ -956,7 +956,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[636] = ItemType.SculkSensor;
mappings[337] = ItemType.SculkShrieker;
mappings[335] = ItemType.SculkVein;
mappings[732] = ItemType.Scute;
mappings[732] = ItemType.TurtleScute;
mappings[471] = ItemType.SeaLantern;
mappings[170] = ItemType.SeaPickle;
mappings[169] = ItemType.Seagrass;

View file

@ -495,7 +495,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[622] = ItemType.GraniteSlab;
mappings[605] = ItemType.GraniteStairs;
mappings[379] = ItemType.GraniteWall;
mappings[172] = ItemType.Grass;
mappings[172] = ItemType.ShortGrass;
mappings[14] = ItemType.GrassBlock;
mappings[47] = ItemType.Gravel;
mappings[1090] = ItemType.GrayBanner;
@ -985,7 +985,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[650] = ItemType.SculkSensor;
mappings[350] = ItemType.SculkShrieker;
mappings[348] = ItemType.SculkVein;
mappings[753] = ItemType.Scute;
mappings[753] = ItemType.TurtleScute;
mappings[485] = ItemType.SeaLantern;
mappings[178] = ItemType.SeaPickle;
mappings[177] = ItemType.Seagrass;

View file

@ -505,7 +505,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[625] = ItemType.GraniteSlab;
mappings[608] = ItemType.GraniteStairs;
mappings[381] = ItemType.GraniteWall;
mappings[173] = ItemType.Grass;
mappings[173] = ItemType.ShortGrass;
mappings[14] = ItemType.GrassBlock;
mappings[48] = ItemType.Gravel;
mappings[1094] = ItemType.GrayBanner;
@ -1003,7 +1003,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[653] = ItemType.SculkSensor;
mappings[352] = ItemType.SculkShrieker;
mappings[350] = ItemType.SculkVein;
mappings[757] = ItemType.Scute;
mappings[757] = ItemType.TurtleScute;
mappings[487] = ItemType.SeaLantern;
mappings[179] = ItemType.SeaPickle;
mappings[178] = ItemType.Seagrass;

View file

@ -1025,7 +1025,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[674] = ItemType.SculkSensor;
mappings[373] = ItemType.SculkShrieker;
mappings[371] = ItemType.SculkVein;
mappings[794] = ItemType.Scute;
mappings[794] = ItemType.TurtleScute;
mappings[508] = ItemType.SeaLantern;
mappings[200] = ItemType.SeaPickle;
mappings[199] = ItemType.Seagrass;

File diff suppressed because it is too large Load diff

View file

@ -70,7 +70,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[1769472] = ItemType.PoweredRail;
mappings[1835008] = ItemType.DetectorRail;
mappings[1900544] = ItemType.StickyPiston;
mappings[2031617] = ItemType.Grass;
mappings[2031617] = ItemType.ShortGrass;
mappings[2031618] = ItemType.Fern;
mappings[2097152] = ItemType.DeadBush;
mappings[2162688] = ItemType.Piston;

View file

@ -66,7 +66,7 @@ namespace MinecraftClient.Inventory.ItemPalettes
mappings[1769472] = ItemType.PoweredRail;
mappings[1835008] = ItemType.DetectorRail;
mappings[1900544] = ItemType.StickyPiston;
mappings[2031617] = ItemType.Grass;
mappings[2031617] = ItemType.ShortGrass;
mappings[2031618] = ItemType.Fern;
mappings[2097152] = ItemType.DeadBush;
mappings[2293760] = ItemType.WhiteWool;

View file

@ -47,6 +47,8 @@
Anvil,
Apple,
ArcherPotterySherd,
ArmadilloScute,
ArmadilloSpawnEgg,
ArmorStand,
ArmsUpPotterySherd,
Arrow,
@ -143,6 +145,8 @@
BlueStainedGlassPane,
BlueTerracotta,
BlueWool,
BoggedSpawnEgg,
BoltArmorTrimSmithingTemplate,
Bone,
BoneBlock,
BoneMeal,
@ -154,6 +158,7 @@
BrainCoralBlock,
BrainCoralFan,
Bread,
BreezeRod,
BreezeSpawnEgg,
BrewerPotterySherd,
BrewingStand,
@ -478,6 +483,9 @@
FletchingTable,
Flint,
FlintAndSteel,
FlowArmorTrimSmithingTemplate,
FlowBannerPattern,
FlowPotterySherd,
FlowerBannerPattern,
FlowerPot,
FloweringAzalea,
@ -525,7 +533,6 @@
GraniteSlab,
GraniteStairs,
GraniteWall,
Grass, // 1.20.3+ renamed to ShortGrass
GrassBlock,
Gravel,
GrayBanner,
@ -557,11 +564,14 @@
Grindstone,
GuardianSpawnEgg,
Gunpowder,
GusterBannerPattern,
GusterPotterySherd,
HangingRoots,
HayBlock,
HeartOfTheSea,
HeartPotterySherd,
HeartbreakPotterySherd,
HeavyCore,
HeavyWeightedPressurePlate,
HoglinSpawnEgg,
HoneyBlock,
@ -693,6 +703,7 @@
LlamaSpawnEgg,
Lodestone,
Loom,
Mace,
MagentaBanner,
MagentaBed,
MagentaCandle,
@ -825,6 +836,8 @@
Obsidian,
OcelotSpawnEgg,
OchreFroglight,
OminousBottle,
OminousTrialKey,
OrangeBanner,
OrangeBed,
OrangeCandle,
@ -1027,12 +1040,12 @@
SandstoneStairs,
SandstoneWall,
Scaffolding,
ScrapePotterySherd,
Sculk,
SculkCatalyst,
SculkSensor,
SculkShrieker,
SculkVein,
Scute,
SeaLantern,
SeaPickle,
Seagrass,
@ -1200,8 +1213,10 @@
TuffWall,
TurtleEgg,
TurtleHelmet,
TurtleScute,
TurtleSpawnEgg,
TwistingVines,
Vault,
VerdantFroglight,
VexArmorTrimSmithingTemplate,
VexSpawnEgg,
@ -1295,11 +1310,13 @@
WhiteTulip,
WhiteWool,
WildArmorTrimSmithingTemplate,
WindCharge,
WitchSpawnEgg,
WitherRose,
WitherSkeletonSkull,
WitherSkeletonSpawnEgg,
WitherSpawnEgg,
WolfArmor,
WolfSpawnEgg,
WoodenAxe,
WoodenHoe,

View file

@ -641,7 +641,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
materials[i] = Material.GraniteStairs;
for (int i = 15315; i <= 15638; i++)
materials[i] = Material.GraniteWall;
materials[2005] = Material.Grass;
materials[2005] = Material.ShortGrass;
for (int i = 8; i <= 9; i++)
materials[i] = Material.GrassBlock;
materials[118] = Material.Gravel;

View file

@ -43,7 +43,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
{ 28, Material.DetectorRail },
{ 29, Material.StickyPiston }, // PistonStickyBase
{ 30, Material.Cobweb }, // Web
{ 31, Material.Grass }, // LongGrass
{ 31, Material.TallGrass }, // LongGrass
{ 32, Material.DeadBush },
{ 33, Material.Piston }, // PistonBase
{ 34, Material.PistonHead }, // PistonExtension

View file

@ -167,7 +167,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
for (int i = 1028; i <= 1039; i++)
materials[i] = Material.StickyPiston;
materials[1040] = Material.Cobweb;
materials[1041] = Material.Grass;
materials[1041] = Material.ShortGrass;
materials[1042] = Material.Fern;
materials[1043] = Material.DeadBush;
materials[1044] = Material.Seagrass;

View file

@ -167,7 +167,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
for (int i = 1328; i <= 1339; i++)
materials[i] = Material.StickyPiston;
materials[1340] = Material.Cobweb;
materials[1341] = Material.Grass;
materials[1341] = Material.ShortGrass;
materials[1342] = Material.Fern;
materials[1343] = Material.DeadBush;
materials[1344] = Material.Seagrass;

View file

@ -167,7 +167,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
for (int i = 1328; i <= 1339; i++)
materials[i] = Material.StickyPiston;
materials[1340] = Material.Cobweb;
materials[1341] = Material.Grass;
materials[1341] = Material.ShortGrass;
materials[1342] = Material.Fern;
materials[1343] = Material.DeadBush;
materials[1344] = Material.Seagrass;

View file

@ -164,7 +164,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
for (int i = 1329; i <= 1340; i++)
materials[i] = Material.StickyPiston;
materials[1341] = Material.Cobweb;
materials[1342] = Material.Grass;
materials[1342] = Material.ShortGrass;
materials[1343] = Material.Fern;
materials[1344] = Material.DeadBush;
materials[1345] = Material.Seagrass;

View file

@ -172,7 +172,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
for (int i = 1385; i <= 1396; i++)
materials[i] = Material.StickyPiston;
materials[1397] = Material.Cobweb;
materials[1398] = Material.Grass;
materials[1398] = Material.ShortGrass;
materials[1399] = Material.Fern;
materials[1400] = Material.DeadBush;
materials[1401] = Material.Seagrass;

View file

@ -554,7 +554,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
materials[i] = Material.GraniteStairs;
for (int i = 13044; i <= 13367; i++)
materials[i] = Material.GraniteWall;
materials[1596] = Material.Grass;
materials[1596] = Material.ShortGrass;
for (int i = 8; i <= 9; i++)
materials[i] = Material.GrassBlock;
materials[109] = Material.Gravel;

View file

@ -604,7 +604,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
materials[i] = Material.GraniteStairs;
for (int i = 14828; i <= 15151; i++)
materials[i] = Material.GraniteWall;
materials[1954] = Material.Grass;
materials[1954] = Material.ShortGrass;
for (int i = 8; i <= 9; i++)
materials[i] = Material.GrassBlock;
materials[111] = Material.Gravel;

View file

@ -639,7 +639,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
materials[i] = Material.GraniteStairs;
for (int i = 15297; i <= 15620; i++)
materials[i] = Material.GraniteWall;
materials[2001] = Material.Grass;
materials[2001] = Material.ShortGrass;
for (int i = 8; i <= 9; i++)
materials[i] = Material.GrassBlock;
materials[118] = Material.Gravel;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,148 @@
using System.Collections.Generic;
namespace MinecraftClient.Mapping.EntityPalettes
{
public class EntityPalette1206 : EntityPalette
{
private static readonly Dictionary<int, EntityType> mappings = new();
static EntityPalette1206()
{
mappings[0] = EntityType.Allay;
mappings[1] = EntityType.AreaEffectCloud;
mappings[2] = EntityType.Armadillo;
mappings[3] = EntityType.ArmorStand;
mappings[4] = EntityType.Arrow;
mappings[5] = EntityType.Axolotl;
mappings[6] = EntityType.Bat;
mappings[7] = EntityType.Bee;
mappings[8] = EntityType.Blaze;
mappings[9] = EntityType.BlockDisplay;
mappings[10] = EntityType.Boat;
mappings[11] = EntityType.Bogged;
mappings[12] = EntityType.Breeze;
mappings[13] = EntityType.BreezeWindCharge;
mappings[14] = EntityType.Camel;
mappings[15] = EntityType.Cat;
mappings[16] = EntityType.CaveSpider;
mappings[17] = EntityType.ChestBoat;
mappings[18] = EntityType.ChestMinecart;
mappings[19] = EntityType.Chicken;
mappings[20] = EntityType.Cod;
mappings[21] = EntityType.CommandBlockMinecart;
mappings[22] = EntityType.Cow;
mappings[23] = EntityType.Creeper;
mappings[24] = EntityType.Dolphin;
mappings[25] = EntityType.Donkey;
mappings[26] = EntityType.DragonFireball;
mappings[27] = EntityType.Drowned;
mappings[28] = EntityType.Egg;
mappings[29] = EntityType.ElderGuardian;
mappings[30] = EntityType.EndCrystal;
mappings[31] = EntityType.EnderDragon;
mappings[32] = EntityType.EnderPearl;
mappings[33] = EntityType.Enderman;
mappings[34] = EntityType.Endermite;
mappings[35] = EntityType.Evoker;
mappings[36] = EntityType.EvokerFangs;
mappings[37] = EntityType.ExperienceBottle;
mappings[38] = EntityType.ExperienceOrb;
mappings[39] = EntityType.EyeOfEnder;
mappings[40] = EntityType.FallingBlock;
mappings[62] = EntityType.Fireball;
mappings[41] = EntityType.FireworkRocket;
mappings[129] = EntityType.FishingBobber;
mappings[42] = EntityType.Fox;
mappings[43] = EntityType.Frog;
mappings[44] = EntityType.FurnaceMinecart;
mappings[45] = EntityType.Ghast;
mappings[46] = EntityType.Giant;
mappings[47] = EntityType.GlowItemFrame;
mappings[48] = EntityType.GlowSquid;
mappings[49] = EntityType.Goat;
mappings[50] = EntityType.Guardian;
mappings[51] = EntityType.Hoglin;
mappings[52] = EntityType.HopperMinecart;
mappings[53] = EntityType.Horse;
mappings[54] = EntityType.Husk;
mappings[55] = EntityType.Illusioner;
mappings[56] = EntityType.Interaction;
mappings[57] = EntityType.IronGolem;
mappings[58] = EntityType.Item;
mappings[59] = EntityType.ItemDisplay;
mappings[60] = EntityType.ItemFrame;
mappings[63] = EntityType.LeashKnot;
mappings[64] = EntityType.LightningBolt;
mappings[65] = EntityType.Llama;
mappings[66] = EntityType.LlamaSpit;
mappings[67] = EntityType.MagmaCube;
mappings[68] = EntityType.Marker;
mappings[69] = EntityType.Minecart;
mappings[70] = EntityType.Mooshroom;
mappings[71] = EntityType.Mule;
mappings[72] = EntityType.Ocelot;
mappings[61] = EntityType.OminousItemSpawner;
mappings[73] = EntityType.Painting;
mappings[74] = EntityType.Panda;
mappings[75] = EntityType.Parrot;
mappings[76] = EntityType.Phantom;
mappings[77] = EntityType.Pig;
mappings[78] = EntityType.Piglin;
mappings[79] = EntityType.PiglinBrute;
mappings[80] = EntityType.Pillager;
mappings[128] = EntityType.Player;
mappings[81] = EntityType.PolarBear;
mappings[82] = EntityType.Potion;
mappings[83] = EntityType.Pufferfish;
mappings[84] = EntityType.Rabbit;
mappings[85] = EntityType.Ravager;
mappings[86] = EntityType.Salmon;
mappings[87] = EntityType.Sheep;
mappings[88] = EntityType.Shulker;
mappings[89] = EntityType.ShulkerBullet;
mappings[90] = EntityType.Silverfish;
mappings[91] = EntityType.Skeleton;
mappings[92] = EntityType.SkeletonHorse;
mappings[93] = EntityType.Slime;
mappings[94] = EntityType.SmallFireball;
mappings[95] = EntityType.Sniffer;
mappings[96] = EntityType.SnowGolem;
mappings[97] = EntityType.Snowball;
mappings[98] = EntityType.SpawnerMinecart;
mappings[99] = EntityType.SpectralArrow;
mappings[100] = EntityType.Spider;
mappings[101] = EntityType.Squid;
mappings[102] = EntityType.Stray;
mappings[103] = EntityType.Strider;
mappings[104] = EntityType.Tadpole;
mappings[105] = EntityType.TextDisplay;
mappings[106] = EntityType.Tnt;
mappings[107] = EntityType.TntMinecart;
mappings[108] = EntityType.TraderLlama;
mappings[109] = EntityType.Trident;
mappings[110] = EntityType.TropicalFish;
mappings[111] = EntityType.Turtle;
mappings[112] = EntityType.Vex;
mappings[113] = EntityType.Villager;
mappings[114] = EntityType.Vindicator;
mappings[115] = EntityType.WanderingTrader;
mappings[116] = EntityType.Warden;
mappings[117] = EntityType.WindCharge;
mappings[118] = EntityType.Witch;
mappings[119] = EntityType.Wither;
mappings[120] = EntityType.WitherSkeleton;
mappings[121] = EntityType.WitherSkull;
mappings[122] = EntityType.Wolf;
mappings[123] = EntityType.Zoglin;
mappings[124] = EntityType.Zombie;
mappings[125] = EntityType.ZombieHorse;
mappings[126] = EntityType.ZombieVillager;
mappings[127] = EntityType.ZombifiedPiglin;
}
protected override Dictionary<int, EntityType> GetDict()
{
return mappings;
}
}
}

View file

@ -16,6 +16,7 @@
{
Allay,
AreaEffectCloud,
Armadillo,
ArmorStand,
Arrow,
Axolotl,
@ -24,7 +25,9 @@
Blaze,
BlockDisplay,
Boat,
Bogged,
Breeze,
BreezeWindCharge,
Camel,
Cat,
CaveSpider,
@ -84,6 +87,7 @@
Mooshroom,
Mule,
Ocelot,
OminousItemSpawner,
Painting,
Panda,
Parrot,

View file

@ -409,7 +409,6 @@
GraniteSlab,
GraniteStairs,
GraniteWall,
Grass, // 1.20.3+ renamed to ShortGrass
GrassBlock,
Gravel,
GrayBanner,
@ -443,6 +442,7 @@
Grindstone,
HangingRoots,
HayBlock,
HeavyCore,
HeavyWeightedPressurePlate,
HoneyBlock,
HoneycombBlock,
@ -965,6 +965,7 @@
TurtleEgg,
TwistingVines,
TwistingVinesPlant,
Vault,
VerdantFroglight,
Vine,
VoidAir,

View file

@ -365,7 +365,7 @@ namespace MinecraftClient.Mapping
Material.CyanConcretePowder,
Material.Dirt,
Material.Farmland,
Material.Grass,
Material.ShortGrass,
Material.GrassBlock,
Material.DirtPath,
Material.Gravel,
@ -374,6 +374,7 @@ namespace MinecraftClient.Mapping
Material.LightBlueConcretePowder,
Material.LightGrayConcretePowder,
Material.LimeConcretePowder,
Material.TallGrass,
Material.MagentaConcretePowder,
Material.Mycelium,
Material.OrangeConcretePowder,

View file

@ -797,10 +797,12 @@ namespace MinecraftClient.Protocol.Handlers
};
break;
case EntityMetaDataType.OptionalVarInt: // Optional VarInt
if (ReadNextBool(cache))
if (protocolversion < Protocol18Handler.MC_1_20_6_Version)
{
value = ReadNextVarInt(cache);
}
if (ReadNextBool(cache))
value = ReadNextVarInt(cache);
} else value = ReadNextVarInt(cache);
break;
case EntityMetaDataType.Pose: // Pose
@ -879,15 +881,21 @@ namespace MinecraftClient.Protocol.Handlers
switch (particleId)
{
case 1: // 1.20.6+
if (protocolversion >= Protocol18Handler.MC_1_20_6_Version)
ReadNextVarInt(cache); // BlockState (minecraft:block)
break;
case 2:
// 1.18 +
// 1.18
if (protocolversion > Protocol18Handler.MC_1_17_1_Version)
ReadNextVarInt(cache); // Block state (minecraft:block)
ReadNextVarInt(cache); // Block state (minecraft:block before 1.20.6, minecraft:block_marker in 1.20.6+)
break;
case 3:
if (protocolversion is < Protocol18Handler.MC_1_17_Version or > Protocol18Handler.MC_1_17_1_Version)
if (protocolversion is (< Protocol18Handler.MC_1_17_Version or > Protocol18Handler.MC_1_17_1_Version)
and < Protocol18Handler.MC_1_20_6_Version)
ReadNextVarInt(
cache); // Block State (minecraft:block before 1.18, minecraft:block_marker after 1.18)
cache); // Block State (minecraft:block before 1.18, minecraft:block_marker after 1.18 up to 1.20.6)
break;
case 4:
if (protocolversion is Protocol18Handler.MC_1_17_Version or Protocol18Handler.MC_1_17_1_Version)
@ -898,11 +906,24 @@ namespace MinecraftClient.Protocol.Handlers
if (protocolversion < Protocol18Handler.MC_1_15_Version)
ReadDustParticle(cache);
break;
case 13:
// 1.20,6+ - minecraft:dust
ReadDustParticle(cache);
break;
case 14:
// 1.15 - 1.16.5 and 1.18 - 1.19.4
if (protocolversion is >= Protocol18Handler.MC_1_15_Version and < Protocol18Handler.MC_1_17_Version
or > Protocol18Handler.MC_1_17_1_Version)
ReadDustParticle(cache);
switch (protocolversion)
{
// 1.15 - 1.16.5 and 1.18 - 1.20.4
case >= Protocol18Handler.MC_1_15_Version and < Protocol18Handler.MC_1_17_Version
or > Protocol18Handler.MC_1_17_1_Version and < Protocol18Handler.MC_1_20_6_Version:
ReadDustParticle(cache);
break;
// 1.20.6+
case >= Protocol18Handler.MC_1_20_6_Version:
ReadDustParticleColorTransition(cache);
break;
}
break;
case 15:
switch (protocolversion)
@ -910,7 +931,8 @@ namespace MinecraftClient.Protocol.Handlers
case Protocol18Handler.MC_1_17_Version or Protocol18Handler.MC_1_17_1_Version:
ReadDustParticle(cache);
break;
case > Protocol18Handler.MC_1_17_1_Version:
// 1.18 - 1.20.4
case > Protocol18Handler.MC_1_17_1_Version and < Protocol18Handler.MC_1_20_6_Version:
ReadDustParticleColorTransition(cache);
break;
}
@ -920,21 +942,26 @@ namespace MinecraftClient.Protocol.Handlers
if (protocolversion is Protocol18Handler.MC_1_17_Version or Protocol18Handler.MC_1_17_1_Version)
ReadDustParticleColorTransition(cache);
break;
case 20:
// 1.20.6+
if (protocolversion >= Protocol18Handler.MC_1_20_6_Version)
ReadNextInt(cache); // minecraft:entity_effect
break;
case 23:
// 1.15 - 1.16.5
if (protocolversion is >= Protocol18Handler.MC_1_15_Version and < Protocol18Handler.MC_1_17_Version)
ReadNextVarInt(cache); // Block State (minecraft:falling_dust)
break;
case 24:
// 1.18 - 1.19.2 onwards
// 1.18 - 1.19.3
if (protocolversion is > Protocol18Handler.MC_1_17_1_Version
and < Protocol18Handler.MC_1_19_3_Version)
ReadNextVarInt(cache); // Block State (minecraft:falling_dust)
break;
case 25:
// 1.17 - 1.17.1 and 1.19.3 onwards
// 1.17 - 1.17.1 and 1.19.3 - 1.20.4
if (protocolversion is Protocol18Handler.MC_1_17_Version or Protocol18Handler.MC_1_17_1_Version
or >= Protocol18Handler.MC_1_19_3_Version)
or (>= Protocol18Handler.MC_1_19_3_Version and < Protocol18Handler.MC_1_20_6_Version))
ReadNextVarInt(cache); // Block State (minecraft:falling_dust)
break;
case 27:
@ -942,8 +969,14 @@ namespace MinecraftClient.Protocol.Handlers
if (protocolversion < Protocol18Handler.MC_1_15_Version)
ReadNextItemSlot(cache, itemPalette); // Item (minecraft:item)
break;
case 28:
// 1.20.6+
if (protocolversion > Protocol18Handler.MC_1_20_6_Version)
ReadNextVarInt(cache); // minecraft:falling_dust (BlockState)
break;
case 30:
if (protocolversion >= Protocol18Handler.MC_1_19_3_Version)
// 1.19.3 - 1.20.4
if (protocolversion is >= Protocol18Handler.MC_1_19_3_Version and < Protocol18Handler.MC_1_20_6_Version)
ReadNextFloat(cache); // Roll (minecraft:sculk_charge)
break;
case 32:
@ -951,6 +984,11 @@ namespace MinecraftClient.Protocol.Handlers
if (protocolversion is >= Protocol18Handler.MC_1_15_Version and < Protocol18Handler.MC_1_17_Version)
ReadNextItemSlot(cache, itemPalette); // Item (minecraft:item)
break;
case 35:
// 1.20.6+
if (protocolversion > Protocol18Handler.MC_1_20_6_Version)
ReadNextFloat(cache); // minecraft:sculk_charge (Roll)
break;
case 36:
switch (protocolversion)
{
@ -958,6 +996,7 @@ namespace MinecraftClient.Protocol.Handlers
case Protocol18Handler.MC_1_17_Version or Protocol18Handler.MC_1_17_1_Version:
ReadNextItemSlot(cache, itemPalette); // Item (minecraft:item)
break;
// 1.18 - 1.19.2
case > Protocol18Handler.MC_1_17_1_Version and < Protocol18Handler.MC_1_19_3_Version:
// minecraft:vibration
ReadNextLocation(cache); // Origin (Starting Position)
@ -968,7 +1007,7 @@ namespace MinecraftClient.Protocol.Handlers
break;
case 37:
// minecraft:vibration
// minecraft:vibration - 1.17 - 1.17.1
if (protocolversion is Protocol18Handler.MC_1_17_Version or Protocol18Handler.MC_1_17_1_Version)
{
ReadNextDouble(cache); // Origin X
@ -982,11 +1021,13 @@ namespace MinecraftClient.Protocol.Handlers
break;
case 39:
if (protocolversion >= Protocol18Handler.MC_1_19_3_Version)
// 1.19.3 - 1.20.4
if (protocolversion is >= Protocol18Handler.MC_1_19_3_Version and < Protocol18Handler.MC_1_20_6_Version)
ReadNextItemSlot(cache, itemPalette); // Item (minecraft:item)
break;
case 40:
if (protocolversion >= Protocol18Handler.MC_1_19_3_Version)
// 1.19.3 - 1.20.4
if (protocolversion is >= Protocol18Handler.MC_1_19_3_Version and < Protocol18Handler.MC_1_20_6_Version)
{
var positionSourceType = ReadNextString(cache);
switch (positionSourceType)
@ -1004,6 +1045,21 @@ namespace MinecraftClient.Protocol.Handlers
}
break;
case 44:
// 1.20.6+
if (protocolversion >= Protocol18Handler.MC_1_20_6_Version)
ReadNextItemSlot(cache, itemPalette); // minecraft:item (Item)
break;
case 99:
// 1.20.6+
if (protocolversion >= Protocol18Handler.MC_1_20_6_Version)
ReadNextVarInt(cache); // minecraft:shriek (Delay)
break;
case 105:
// 1.20.6+
if (protocolversion >= Protocol18Handler.MC_1_20_6_Version)
ReadNextVarInt(cache); // minecraft:dust_pillar (BlockState)
break;
}
}

View file

@ -103,7 +103,8 @@ namespace MinecraftClient.Protocol.Handlers.packet.s2c
new ParserEmpty(dataTypes, packetData),
_ => new ParserEmpty(dataTypes, packetData),
};
else // 1.20.3+
else if (protocolVersion is > Protocol18Handler.MC_1_20_2_Version and < Protocol18Handler.MC_1_20_6_Version)
// 1.20.3 - 1.20.4
parser = parserId switch
{
1 => new ParserFloat(dataTypes, packetData),
@ -127,6 +128,24 @@ namespace MinecraftClient.Protocol.Handlers.packet.s2c
52 => new ParserForgeEnum(dataTypes, packetData),
_ => new ParserEmpty(dataTypes, packetData),
};
else // 1.20.6+
parser = parserId switch
{
1 => new ParserFloat(dataTypes, packetData),
2 => new ParserDouble(dataTypes, packetData),
3 => new ParserInteger(dataTypes, packetData),
4 => new ParserLong(dataTypes, packetData),
5 => new ParserString(dataTypes, packetData),
6 => new ParserEntity(dataTypes, packetData),
30 => new ParserScoreHolder(dataTypes, packetData),
41 => new ParserTime(dataTypes, packetData),
42 => new ParserResourceOrTag(dataTypes, packetData),
43 => new ParserResourceOrTag(dataTypes, packetData),
44 => new ParserResource(dataTypes, packetData),
45 => new ParserResource(dataTypes, packetData),
52 => new ParserForgeEnum(dataTypes, packetData),
_ => new ParserEmpty(dataTypes, packetData),
};
}
string? suggestionsType = ((flags & 0x10) == 0x10) ? dataTypes.ReadNextString(packetData) : null;

View file

@ -123,21 +123,21 @@ namespace MinecraftClient.Protocol.Handlers
lastSeenMessagesCollector = protocolVersion >= MC_1_19_3_Version ? new(20) : new(5);
chunkBatchStartTime = GetNanos();
if (handler.GetTerrainEnabled() && protocolVersion > MC_1_20_4_Version)
if (handler.GetTerrainEnabled() && protocolVersion > MC_1_20_6_Version)
{
log.Error($"§c{Translations.extra_terrainandmovement_disabled}");
handler.SetTerrainEnabled(false);
}
if (handler.GetInventoryEnabled() &&
protocolVersion is < MC_1_8_Version or > MC_1_20_4_Version)
protocolVersion is < MC_1_8_Version or > MC_1_20_6_Version)
{
log.Error($"§c{Translations.extra_inventory_disabled}");
handler.SetInventoryEnabled(false);
}
if (handler.GetEntityHandlingEnabled() &&
protocolVersion is < MC_1_8_Version or > MC_1_20_4_Version)
protocolVersion is < MC_1_8_Version or > MC_1_20_6_Version)
{
log.Error($"§c{Translations.extra_entity_disabled}");
handler.SetEntityHandlingEnabled(false);
@ -146,8 +146,9 @@ namespace MinecraftClient.Protocol.Handlers
Block.Palette = protocolVersion switch
{
// Block palette
> MC_1_20_4_Version when handler.GetTerrainEnabled() =>
> MC_1_20_6_Version when handler.GetTerrainEnabled() =>
throw new NotImplementedException(Translations.exception_palette_block),
MC_1_20_6_Version => new Palette1206(),
>= MC_1_20_4_Version => new Palette1204(),
>= MC_1_20_Version => new Palette120(),
MC_1_19_4_Version => new Palette1194(),
@ -164,8 +165,9 @@ namespace MinecraftClient.Protocol.Handlers
entityPalette = protocolVersion switch
{
// Entity palette
> MC_1_20_4_Version when handler.GetEntityHandlingEnabled() =>
> MC_1_20_6_Version when handler.GetEntityHandlingEnabled() =>
throw new NotImplementedException(Translations.exception_palette_entity),
MC_1_20_6_Version => new EntityPalette1206(),
>= MC_1_20_4_Version => new EntityPalette1204(),
>= MC_1_20_Version => new EntityPalette120(),
MC_1_19_4_Version => new EntityPalette1194(),
@ -186,8 +188,9 @@ namespace MinecraftClient.Protocol.Handlers
itemPalette = protocolVersion switch
{
// Item palette
> MC_1_20_4_Version when handler.GetInventoryEnabled() =>
> MC_1_20_6_Version when handler.GetInventoryEnabled() =>
throw new NotImplementedException(Translations.exception_palette_item),
MC_1_20_6_Version => new ItemPalette1206(),
>= MC_1_20_4_Version => new ItemPalette1204(),
>= MC_1_20_Version => new ItemPalette120(),
MC_1_19_4_Version => new ItemPalette1194(),
@ -2499,11 +2502,38 @@ namespace MinecraftClient.Protocol.Handlers
var numberOfProperties = protocolVersion >= MC_1_17_Version
? dataTypes.ReadNextVarInt(packetData)
: dataTypes.ReadNextInt(packetData);
var attributeDictionary = new Dictionary<int, string>
{
{ 0, "generic.armor" },
{ 1, "generic.armor_toughness" },
{ 2, "generic.attack_damage" },
{ 3, "generic.attack_knockback" },
{ 4, "generic.attack_speed" },
{ 5, "generic.block_break_speed" },
{ 6, "generic.block_interaction_range" },
{ 7, "generic.entity_interaction_range" },
{ 8, "generic.fall_damage_multiplier" },
{ 9, "generic.flying_speed" },
{ 10, "generic.follow_range" },
{ 11, "generic.gravity" },
{ 12, "generic.jump_strength" },
{ 13, "generic.knockback_resistance" },
{ 14, "generic.luck" },
{ 15, "generic.max_absorption" },
{ 16, "generic.max_health" },
{ 17, "generic.movement_speed" },
{ 18, "generic.safe_fall_distance" },
{ 19, "generic.scale" },
{ 20, "zombie.spawn_reinforcements" },
{ 21, "generic.step_height" }
};
Dictionary<string, double> keys = new();
for (var i = 0; i < numberOfProperties; i++)
{
var propertyKey = dataTypes.ReadNextString(packetData);
var propertyKey = protocolVersion < MC_1_20_6_Version ? dataTypes.ReadNextString(packetData)
: attributeDictionary[dataTypes.ReadNextVarInt(packetData)];
var propertyValue2 = dataTypes.ReadNextDouble(packetData);
List<double> op0 = new();
@ -2549,7 +2579,7 @@ namespace MinecraftClient.Protocol.Handlers
// Also make a palette for field? Will be a lot of work
var healthField = protocolVersion switch
{
> MC_1_20_4_Version => throw new NotImplementedException(Translations
> MC_1_20_6_Version => throw new NotImplementedException(Translations
.exception_palette_healthfield),
// 1.17 and above
>= MC_1_17_Version => 9,