mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Formatted the code and removed logs from Auto Attack
This commit is contained in:
parent
a4ff7ae438
commit
c6ca3dc13d
117 changed files with 602 additions and 585 deletions
|
|
@ -10,7 +10,7 @@ namespace MinecraftClient.Protocol.Handlers.StructuredComponents;
|
|||
public class StructuredComponentsHandler
|
||||
{
|
||||
private StructuredComponentRegistry ComponentRegistry { get; }
|
||||
|
||||
|
||||
public StructuredComponentsHandler(
|
||||
int protocolVersion,
|
||||
DataTypes dataTypes,
|
||||
|
|
@ -25,9 +25,9 @@ public class StructuredComponentsHandler
|
|||
_ => throw new NotSupportedException($"Protocol version {protocolVersion} is not supported for subcomponent registries!")
|
||||
};
|
||||
|
||||
var subcomponentRegistry = Activator.CreateInstance(subcomponentRegistryType, dataTypes) as SubComponentRegistry
|
||||
var subcomponentRegistry = Activator.CreateInstance(subcomponentRegistryType, dataTypes) as SubComponentRegistry
|
||||
?? throw new InvalidOperationException($"Failed to instantiate a component registry for type {nameof(subcomponentRegistryType)}");
|
||||
|
||||
|
||||
// Get the appropriate component registry type based on the protocol version and then instantiate it
|
||||
var registryType = protocolVersion switch
|
||||
{
|
||||
|
|
@ -40,7 +40,7 @@ public class StructuredComponentsHandler
|
|||
_ => throw new NotSupportedException($"Protocol version {protocolVersion} is not supported for structured component registries!")
|
||||
};
|
||||
|
||||
ComponentRegistry = Activator.CreateInstance(registryType, dataTypes, itemPalette, subcomponentRegistry) as StructuredComponentRegistry
|
||||
ComponentRegistry = Activator.CreateInstance(registryType, dataTypes, itemPalette, subcomponentRegistry) as StructuredComponentRegistry
|
||||
?? throw new InvalidOperationException($"Failed to instantiate a component registry for type {nameof(registryType)}");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue