mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Wire up entity metadata palette
This commit is contained in:
parent
1a22002bde
commit
f4ad24746c
6 changed files with 225 additions and 337 deletions
|
|
@ -1,3 +1,6 @@
|
|||
using MinecraftClient.Mapping.EntityMetadataPalettes;
|
||||
using MinecraftClient.Protocol.Handlers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MinecraftClient.Mapping;
|
||||
|
|
@ -5,4 +8,29 @@ namespace MinecraftClient.Mapping;
|
|||
public abstract class EntityMetadataPalette
|
||||
{
|
||||
public abstract Dictionary<int, EntityMetaDataType> GetEntityMetadataMappingsList();
|
||||
|
||||
public EntityMetaDataType GetDataType(int typeId)
|
||||
{
|
||||
return GetEntityMetadataMappingsList()[typeId];
|
||||
}
|
||||
|
||||
public static EntityMetadataPalette GetPalette(int protocolVersion)
|
||||
{
|
||||
if (protocolVersion < Protocol18Handler.MC_1_9_1_Version)
|
||||
return new EntityMetadataPalette19();
|
||||
else if (protocolVersion <= Protocol18Handler.MC_1_11_2_Version)
|
||||
return new EntityMetadataPalette111();
|
||||
else if (protocolVersion <= Protocol18Handler.MC_1_13_2_Version)
|
||||
return new EntityMetadataPalette113();
|
||||
else if (protocolVersion <= Protocol18Handler.MC_1_14_Version)
|
||||
return new EntityMetadataPalette114();
|
||||
else if (protocolVersion <= Protocol18Handler.MC_1_19_2_Version)
|
||||
return new EntityMetadataPalette1191();
|
||||
else if (protocolVersion <= Protocol18Handler.MC_1_19_3_Version)
|
||||
return new EntityMetadataPalette1193();
|
||||
else if (protocolVersion <= Protocol18Handler.MC_1_19_4_Version)
|
||||
return new EntityMetadataPalette1194();
|
||||
else
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue