2022-10-17 15:14:55 +02:00
|
|
|
|
namespace MinecraftClient.Inventory
|
|
|
|
|
|
{
|
Modernize data carriers to records and add primary constructors
Convert 14 data carrier classes to records:
- VillagerInfo, MapIcon, EnchantmentData: non-positional records (mutable properties)
- ForgeMod, SkinInfo, VillagerTrade, Node, Response: positional records
- CommandNode: sealed positional record
- CommandArgumentDescriptor: readonly record struct
- ColorRGBA: record struct (multiple constructors preserved)
- RecipeConfig, Recipe, BannerLayer: non-positional records
Add primary constructors to 6 classes:
- DataTypes, Protocol18Terrain, Protocol18Forge, ItemMovingHelper,
LastSeenMessageList, Acknowledgment, SuggestionTooltip
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 01:31:17 +00:00
|
|
|
|
public record EnchantmentData
|
2022-10-17 15:14:55 +02:00
|
|
|
|
{
|
2024-09-11 19:12:31 +02:00
|
|
|
|
public Enchantments TopEnchantment { get; set; }
|
|
|
|
|
|
public Enchantments MiddleEnchantment { get; set; }
|
|
|
|
|
|
public Enchantments BottomEnchantment { get; set; }
|
2022-10-17 15:14:55 +02:00
|
|
|
|
|
|
|
|
|
|
// 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; }
|
|
|
|
|
|
|
|
|
|
|
|
/// Enchantment levels are the levels of enchantment (eg. I, II, III, IV, V) (eg. Smite IV, Power III, Knockback II ..)
|
|
|
|
|
|
public short TopEnchantmentLevel { get; set; }
|
|
|
|
|
|
public short MiddleEnchantmentLevel { get; set; }
|
|
|
|
|
|
public short BottomEnchantmentLevel { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// Enchantment level requirements are the levels that player needs to have in order to enchant the item
|
|
|
|
|
|
public short TopEnchantmentLevelRequirement { get; set; }
|
|
|
|
|
|
public short MiddleEnchantmentLevelRequirement { get; set; }
|
|
|
|
|
|
public short BottomEnchantmentLevelRequirement { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|