feat: expose block state properties through MCP

This commit is contained in:
Anon 2026-08-11 14:51:13 +02:00
parent 1fd4b0244d
commit f1d844afbe
8 changed files with 4733 additions and 10 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using MinecraftClient.Mapping.BlockPalettes;
using MinecraftClient.Protocol.Message;
@ -78,6 +79,19 @@ namespace MinecraftClient.Mapping
}
}
/// <summary>
/// Exact raw block state ID. For Minecraft 1.12 and older this contains the packed block ID and metadata.
/// </summary>
public int StateId => blockIdAndMeta;
/// <summary>
/// Get the properties associated with this block's exact state ID.
/// </summary>
public IReadOnlyDictionary<string, string> GetStateProperties()
{
return Palette.GetStateProperties(StateId);
}
/// <summary>
/// Material of the block
/// </summary>