mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Code refactoring (related to #1024)
This commit is contained in:
parent
d120001d70
commit
23870711a0
11 changed files with 69 additions and 100 deletions
|
|
@ -14,9 +14,9 @@ namespace MinecraftClient.Mapping.EntityPalettes
|
|||
protected abstract Dictionary<int, EntityType> GetDict();
|
||||
|
||||
/// <summary>
|
||||
/// Get mapping dictionary for pre-1.13. May be overriden with proper implementation.
|
||||
/// Get mapping dictionary for pre-1.14 non-living entities.
|
||||
/// </summary>
|
||||
/// <returns>Palette dictionary for non-living entities (pre-1.13)</returns>
|
||||
/// <returns>Palette dictionary for non-living entities (pre-1.14)</returns>
|
||||
protected virtual Dictionary<int, EntityType> GetDictNonLiving()
|
||||
{
|
||||
return null;
|
||||
|
|
@ -34,13 +34,13 @@ namespace MinecraftClient.Mapping.EntityPalettes
|
|||
|
||||
if (entityTypesNonLiving != null && !living)
|
||||
{
|
||||
//Pre-1.13 non-living entities have a different set of IDs (entityTypesNonLiving != null)
|
||||
//Pre-1.14 non-living entities have a different set of IDs (entityTypesNonLiving != null)
|
||||
if (entityTypesNonLiving.ContainsKey(id))
|
||||
return entityTypesNonLiving[id];
|
||||
}
|
||||
else
|
||||
{
|
||||
//Post-1.13 entities have the same set of IDs regardless of living status
|
||||
//1.14+ entities have the same set of IDs regardless of living status
|
||||
if (entityTypes.ContainsKey(id))
|
||||
return entityTypes[id];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace MinecraftClient.Mapping.EntityPalettes
|
|||
/// <summary>
|
||||
/// Defines mappings for pre-1.14 entitiy IDs
|
||||
/// Pre-1.14 Minecraft has 2 set of ids: One for non-living objects and one for living mobs
|
||||
/// Post-1.14 Minecraft has only one set of ids for all types of entities
|
||||
/// 1.14+ Minecraft has only one set of ids for all types of entities
|
||||
/// </summary>
|
||||
public class EntityPalette113 : EntityPalette
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue