mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
parent
03023c8059
commit
bc3d6aba00
15 changed files with 1005 additions and 41 deletions
|
|
@ -15,7 +15,7 @@ namespace MinecraftClient.Mapping
|
|||
/// Get or set global block ID to Material mapping
|
||||
/// The global Palette is a concept introduced with Minecraft 1.13
|
||||
/// </summary>
|
||||
public static PaletteMapping Palette { get; set; }
|
||||
public static BlockPaletteMapping Palette { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Storage for block ID and metadata, as ushort for compatibility, performance and lower memory footprint
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ using System.IO;
|
|||
namespace MinecraftClient.Mapping.BlockPalettes
|
||||
{
|
||||
/// <summary>
|
||||
/// Generator for MCC Palette mappings
|
||||
/// Generator for MCC Block Palette mappings
|
||||
/// </summary>
|
||||
public static class PaletteGenerator
|
||||
public static class BlockPaletteGenerator
|
||||
{
|
||||
/// <summary>
|
||||
/// Generate mapping from Minecraft blocks.jsom
|
||||
|
|
@ -5,7 +5,7 @@ using System.Text;
|
|||
|
||||
namespace MinecraftClient.Mapping.BlockPalettes
|
||||
{
|
||||
public abstract class PaletteMapping
|
||||
public abstract class BlockPaletteMapping
|
||||
{
|
||||
/// <summary>
|
||||
/// Get mapping dictionary. Must be overriden with proper implementation.
|
||||
|
|
@ -9,7 +9,7 @@ namespace MinecraftClient.Mapping.BlockPalettes
|
|||
/// Some blocks previously had different IDs depending on state, they have been merged here
|
||||
/// Comments correspond to changed material names since previous MCC versions
|
||||
/// </summary>
|
||||
public class Palette112 : PaletteMapping
|
||||
public class Palette112 : BlockPaletteMapping
|
||||
{
|
||||
private static Dictionary<int, Material> materials = new Dictionary<int, Material>()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace MinecraftClient.Mapping.BlockPalettes
|
|||
{
|
||||
/// <summary>
|
||||
/// Defines mappings for Minecraft 1.13.
|
||||
/// Automatically generated using PaletteGenerator.cs
|
||||
/// Automatically generated using BlockPaletteGenerator.cs
|
||||
/// </summary>
|
||||
public class Palette113 : PaletteMapping
|
||||
public class Palette113 : BlockPaletteMapping
|
||||
{
|
||||
private static Dictionary<int, Material> materials = new Dictionary<int, Material>();
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace MinecraftClient.Mapping.BlockPalettes
|
|||
{
|
||||
/// <summary>
|
||||
/// Defines mappings for Minecraft 1.14.
|
||||
/// Automatically generated using PaletteGenerator.cs
|
||||
/// Automatically generated using BlockPaletteGenerator.cs
|
||||
/// </summary>
|
||||
public class Palette114 : PaletteMapping
|
||||
public class Palette114 : BlockPaletteMapping
|
||||
{
|
||||
private static Dictionary<int, Material> materials = new Dictionary<int, Material>();
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ namespace MinecraftClient.Mapping.BlockPalettes
|
|||
{
|
||||
/// <summary>
|
||||
/// Defines mappings for Minecraft 1.15.
|
||||
/// Automatically generated using PaletteGenerator.cs
|
||||
/// Automatically generated using BlockPaletteGenerator.cs
|
||||
/// </summary>
|
||||
public class Palette115 : PaletteMapping
|
||||
public class Palette115 : BlockPaletteMapping
|
||||
{
|
||||
private static Dictionary<int, Material> materials = new Dictionary<int, Material>();
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
/// Represents Minecraft Materials
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Generated from blocks.json using PaletteGenerator.cs.
|
||||
/// Generated from blocks.json using BlockPaletteGenerator.cs.
|
||||
/// Typical steps to handle new blocks for newer Minecraft versions:
|
||||
/// 1. Generate blocks.json using data reporting on Vanilla Minecraft (https://wiki.vg/Data_Generators)
|
||||
/// 2. Generate temporary MaterialXXX.cs and PaletteXXX.cs using PaletteGenerator.cs
|
||||
/// 2. Generate temporary MaterialXXX.cs and PaletteXXX.cs using BlockPaletteGenerator.cs
|
||||
/// 3. Perform a diff with existing versions, add missing entries in Material.cs and MaterialExtensions.cs
|
||||
/// 4. If existing state IDs were not randomized by Mojang, simply add missing state entries to Palette113.cs
|
||||
/// 5. If existing state IDs were randomized, add a new palette as PaletteXXX.cs into the codebase (worst case)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue