Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:

env:
PROJECT: "MinecraftClient"
target-version: "net7.0"
compile-flags: "--self-contained=true -c Release -p:UseAppHost=true -p:IncludeNativeLibrariesForSelfExtract=true -p:EnableCompressionInSingleFile=true -p:DebugType=None"
target-version: "net8.0"
compile-flags: "--self-contained=true -c Release -p:UseAppHost=true -p:IncludeNativeLibrariesForSelfExtract=true -p:EnableCompressionInSingleFile=true -p:DebugType=Embedded"

jobs:
build:
Expand All @@ -19,7 +19,7 @@ jobs:
timeout-minutes: 15
strategy:
matrix:
target: [win-x86, win-x64, win-arm, win-arm64, linux-x64, linux-arm, linux-arm64, osx-x64, osx-arm64]
target: [win-x86, win-x64, win-arm64, linux-x64, linux-arm, linux-arm64, osx-x64, osx-arm64]

steps:
- name: Checkout
Expand Down
3 changes: 3 additions & 0 deletions MinecraftClient/Inventory/BookPage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
namespace MinecraftClient.Inventory;

public record BookPage(string RawContent, bool HasFilteredContent, string? FilteredContent);
3 changes: 3 additions & 0 deletions MinecraftClient/Inventory/Enchantment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
namespace MinecraftClient.Inventory;

public record Enchantment(Enchantments Type, int Level);
6 changes: 3 additions & 3 deletions MinecraftClient/Inventory/EnchantmentData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
{
public class EnchantmentData
{
public Enchantment TopEnchantment { get; set; }
public Enchantment MiddleEnchantment { get; set; }
public Enchantment BottomEnchantment { get; set; }
public Enchantments TopEnchantment { get; set; }
public Enchantments MiddleEnchantment { get; set; }
public Enchantments BottomEnchantment { get; set; }

// Seed for rendering Standard Galactic Language (symbols in the enchanting table) (Useful for poeple who use MCC for the protocol)
public short Seed { get; set; }
Expand Down
314 changes: 180 additions & 134 deletions MinecraftClient/Inventory/EnchantmentMapping.cs

Large diffs are not rendered by default.

65 changes: 34 additions & 31 deletions MinecraftClient/Inventory/Enchantments.cs
Original file line number Diff line number Diff line change
@@ -1,46 +1,49 @@
namespace MinecraftClient.Inventory
{
// Not implemented for 1.14
public enum Enchantment : short
public enum Enchantments : short
{
Protection = 0,
FireProtection,
FeatherFalling,
AquaAffinity = 0,
BaneOfArthropods,
BindingCurse,
BlastProtection,
ProjectileProtection,
Respiration,
AquaAffinity,
Thorns,
Breach,
Channeling,
DepthStrieder,
FrostWalker,
BindingCurse,
SoulSpeed,
SwiftSneak,
Sharpness,
Smite,
BaneOfArthropods,
Knockback,
FireAspect,
Looting,
Sweeping,
Density,
Efficency,
SilkTouch,
Unbreaking,
Fortune,
Power,
Punch,
FeatherFalling,
FireAspect,
FireProtection,
Flame,
Fortune,
FrostWalker,
Impaling,
Infinity,
Knockback,
Looting,
LuckOfTheSea,
Lure,
Loyality,
Impaling,
Riptide,
Channeling,
Lure,
Mending,
Multishot,
QuickCharge,
Piercing,
Mending,
VanishingCurse
Power,
ProjectileProtection,
Protection,
Punch,
QuickCharge,
Respiration,
Riptide,
Sharpness,
SilkTouch,
Smite,
SoulSpeed,
Sweeping,
SwiftSneak,
Thorns,
Unbreaking,
VanishingCurse,
WindBurst
}
}
2 changes: 1 addition & 1 deletion MinecraftClient/Inventory/ItemPalettes/ItemPalette110.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static ItemPalette110()
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;
Expand Down
2 changes: 1 addition & 1 deletion MinecraftClient/Inventory/ItemPalettes/ItemPalette111.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static ItemPalette111()
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;
Expand Down
2 changes: 1 addition & 1 deletion MinecraftClient/Inventory/ItemPalettes/ItemPalette112.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static ItemPalette112()
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;
Expand Down
4 changes: 2 additions & 2 deletions MinecraftClient/Inventory/ItemPalettes/ItemPalette115.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static ItemPalette115()
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;
Expand Down Expand Up @@ -531,7 +531,7 @@ static ItemPalette115()
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;
Expand Down
4 changes: 2 additions & 2 deletions MinecraftClient/Inventory/ItemPalettes/ItemPalette1161.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static ItemPalette1161()
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;
Expand Down Expand Up @@ -583,7 +583,7 @@ static ItemPalette1161()
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;
Expand Down
4 changes: 2 additions & 2 deletions MinecraftClient/Inventory/ItemPalettes/ItemPalette1162.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static ItemPalette1162()
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;
Expand Down Expand Up @@ -583,7 +583,7 @@ static ItemPalette1162()
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;
Expand Down
4 changes: 2 additions & 2 deletions MinecraftClient/Inventory/ItemPalettes/ItemPalette117.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static ItemPalette117()
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;
Expand Down Expand Up @@ -687,7 +687,7 @@ static ItemPalette117()
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;
Expand Down
4 changes: 2 additions & 2 deletions MinecraftClient/Inventory/ItemPalettes/ItemPalette118.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static ItemPalette118()
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;
Expand Down Expand Up @@ -687,7 +687,7 @@ static ItemPalette118()
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;
Expand Down
4 changes: 2 additions & 2 deletions MinecraftClient/Inventory/ItemPalettes/ItemPalette119.cs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ static ItemPalette119()
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;
Expand Down Expand Up @@ -927,7 +927,7 @@ static ItemPalette119()
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;
Expand Down
4 changes: 2 additions & 2 deletions MinecraftClient/Inventory/ItemPalettes/ItemPalette1193.cs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ static ItemPalette1193()
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;
Expand Down Expand Up @@ -956,7 +956,7 @@ static ItemPalette1193()
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;
Expand Down
4 changes: 2 additions & 2 deletions MinecraftClient/Inventory/ItemPalettes/ItemPalette1194.cs
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ static ItemPalette1194()
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;
Expand Down Expand Up @@ -985,7 +985,7 @@ static ItemPalette1194()
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;
Expand Down
4 changes: 2 additions & 2 deletions MinecraftClient/Inventory/ItemPalettes/ItemPalette120.cs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ static ItemPalette120()
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;
Expand Down Expand Up @@ -1003,7 +1003,7 @@ static ItemPalette120()
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;
Expand Down
2 changes: 1 addition & 1 deletion MinecraftClient/Inventory/ItemPalettes/ItemPalette1204.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ static ItemPalette1204()
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;
Expand Down
Loading