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>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-24 01:31:17 +00:00
parent 81b756292e
commit 654a16907b
18 changed files with 68 additions and 231 deletions

View file

@ -306,27 +306,9 @@ namespace MinecraftClient.Mapping
/// <summary>
/// Represents a location and its attributes
/// </summary>
public class Node
public record Node(int GScore, int HScore, Location Location)
{
// Distance to start
public int GScore;
// Distance to Goal
public int HScore;
public int FScore
{
get { return HScore + GScore; }
}
public Location Location;
public Node(int gScore, int hScore, Location loc)
{
this.GScore = gScore;
this.HScore = hScore;
Location = loc;
}
public int FScore => HScore + GScore;
}
// List which contains all nodes in form of a Binary Heap