mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
feat: expose block state properties through MCP
This commit is contained in:
parent
1fd4b0244d
commit
f1d844afbe
8 changed files with 4733 additions and 10 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue