mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Fix all compilation warnings (CS9107, CS8600, CS8604, CS8618, CS0168, CS0169, CS0649)
- Fix CS9107: Replace lowercase primary constructor parameter refs with PascalCase base class properties in 90+ StructuredComponent files - Fix CS8618: Add null! initializers for late-initialized properties - Fix CS8600: Use nullable out parameters in World.cs, ChatParser.cs - Fix CS8604: Add null guard in Compiler.cs, fix null-conditional in McClient.cs - Fix CS0168: Replace unused variable with discard in DataTypes.cs - Fix CS0169: Remove unused motionY field from McClient.cs - Fix CS0649: Remove never-assigned steps field, simplify ClientIsMoving() - Initialize client/handler with null! to avoid CS8618 cascade Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com> Agent-Logs-Url: https://github.com/milutinke/Minecraft-Console-Client/sessions/7fcee1b2-21e2-4457-b01b-5e0a1f07752f
This commit is contained in:
parent
640a4e39b7
commit
81b756292e
11 changed files with 19 additions and 19 deletions
|
|
@ -16,7 +16,7 @@ public class BundleContentsComponent(DataTypes dataTypes, ItemPalette itemPalett
|
|||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var item = DataTypes.ReadNextItemSlot(data, itemPalette);
|
||||
var item = DataTypes.ReadNextItemSlot(data, ItemPalette);
|
||||
if (item is not null)
|
||||
Items.Add(item);
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ public class BundleContentsComponent(DataTypes dataTypes, ItemPalette itemPalett
|
|||
data.AddRange(DataTypes.GetVarInt(Items.Count));
|
||||
|
||||
foreach (var item in Items)
|
||||
data.AddRange(DataTypes.GetItemSlot(item, itemPalette));
|
||||
data.AddRange(DataTypes.GetItemSlot(item, ItemPalette));
|
||||
|
||||
return new Queue<byte>(data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ public class ChargedProjectilesComponent(DataTypes dataTypes, ItemPalette itemPa
|
|||
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
var item = DataTypes.ReadNextItemSlot(data, itemPalette);
|
||||
var item = DataTypes.ReadNextItemSlot(data, ItemPalette);
|
||||
if (item is not null)
|
||||
Items.Add(item);
|
||||
}
|
||||
|
|
@ -28,7 +28,7 @@ public class ChargedProjectilesComponent(DataTypes dataTypes, ItemPalette itemPa
|
|||
data.AddRange(DataTypes.GetVarInt(Items.Count));
|
||||
|
||||
foreach (var item in Items)
|
||||
data.AddRange(DataTypes.GetItemSlot(item, itemPalette));
|
||||
data.AddRange(DataTypes.GetItemSlot(item, ItemPalette));
|
||||
|
||||
return new Queue<byte>(data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class ContainerComponent(DataTypes dataTypes, ItemPalette itemPalette, Su
|
|||
var data = new List<byte>();
|
||||
data.AddRange(DataTypes.GetVarInt(Items.Count));
|
||||
foreach (var item in Items)
|
||||
data.AddRange(DataTypes.GetItemSlot(item, itemPalette));
|
||||
data.AddRange(DataTypes.GetItemSlot(item, ItemPalette));
|
||||
|
||||
return new Queue<byte>(data);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components.Subc
|
|||
|
||||
public class EffectSubComponent(DataTypes dataTypes, SubComponentRegistry subComponentRegistry) : SubComponent(dataTypes, subComponentRegistry)
|
||||
{
|
||||
public PotionEffectSubComponent TypeId { get; set; }
|
||||
public PotionEffectSubComponent TypeId { get; set; } = null!;
|
||||
public float Probability { get; set; }
|
||||
|
||||
protected override void Parse(Queue<byte> data)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components.Subc
|
|||
public class PotionEffectSubComponent(DataTypes dataTypes, SubComponentRegistry subComponentRegistry) : SubComponent(dataTypes, subComponentRegistry)
|
||||
{
|
||||
public int TypeId { get; set; }
|
||||
public DetailsSubComponent Details { get; set; }
|
||||
public DetailsSubComponent Details { get; set; } = null!;
|
||||
|
||||
protected override void Parse(Queue<byte> data)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace MinecraftClient.Protocol.Handlers.StructuredComponents.Components.Subc
|
|||
|
||||
public class RuleSubComponent(DataTypes dataTypes, SubComponentRegistry subComponentRegistry) : SubComponent(dataTypes, subComponentRegistry)
|
||||
{
|
||||
public BlockSetSubcomponent Blocks { get; set; }
|
||||
public BlockSetSubcomponent Blocks { get; set; } = null!;
|
||||
public bool HasSpeed { get; set; }
|
||||
public float Speed { get; set; }
|
||||
public bool HasCorrectDropForBlocks { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue