mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Fix CS9107 warnings: use base class properties instead of captured primary constructor parameters
Replace lowercase primary constructor parameter references (dataTypes., subComponentRegistry., itemPalette.) with PascalCase base class property references (DataTypes., SubComponentRegistry., ItemPalette.) in method bodies of all StructuredComponent and SubComponent subclasses. This eliminates CS9107 warnings where subclass primary constructor parameters shadow the base class properties they are assigned to. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
94bf42710a
commit
640a4e39b7
90 changed files with 366 additions and 366 deletions
|
|
@ -10,29 +10,29 @@ public class InstrumentComponent1215(DataTypes dataTypes, ItemPalette itemPalett
|
|||
public override void Parse(Queue<byte> data)
|
||||
{
|
||||
// EitherHolder<Instrument>: Bool + (Holder<Instrument> OR ResourceLocation)
|
||||
var isHolder = dataTypes.ReadNextBool(data);
|
||||
var isHolder = DataTypes.ReadNextBool(data);
|
||||
if (isHolder)
|
||||
{
|
||||
var holderId = dataTypes.ReadNextVarInt(data);
|
||||
var holderId = DataTypes.ReadNextVarInt(data);
|
||||
if (holderId == 0)
|
||||
{
|
||||
// Inline Instrument: SoundEvent holder + VarInt useDuration + Float range + Component description
|
||||
var soundHolderId = dataTypes.ReadNextVarInt(data);
|
||||
var soundHolderId = DataTypes.ReadNextVarInt(data);
|
||||
if (soundHolderId == 0)
|
||||
{
|
||||
dataTypes.ReadNextString(data); // ResourceLocation
|
||||
var hasFixedRange = dataTypes.ReadNextBool(data);
|
||||
DataTypes.ReadNextString(data); // ResourceLocation
|
||||
var hasFixedRange = DataTypes.ReadNextBool(data);
|
||||
if (hasFixedRange)
|
||||
dataTypes.ReadNextFloat(data);
|
||||
DataTypes.ReadNextFloat(data);
|
||||
}
|
||||
dataTypes.ReadNextVarInt(data); // useDuration
|
||||
dataTypes.ReadNextFloat(data); // range
|
||||
dataTypes.ReadNextString(data); // description (Component as JSON string)
|
||||
DataTypes.ReadNextVarInt(data); // useDuration
|
||||
DataTypes.ReadNextFloat(data); // range
|
||||
DataTypes.ReadNextString(data); // description (Component as JSON string)
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dataTypes.ReadNextString(data); // ResourceLocation key
|
||||
DataTypes.ReadNextString(data); // ResourceLocation key
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue