9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-30 12:29:15 +00:00

feat(compatibility): 添加 MythicMobs 支持

This commit is contained in:
jhqwqmc
2025-06-02 17:17:38 +08:00
parent 3ece1a9bb4
commit 07816a0f23
6 changed files with 88 additions and 1 deletions

View File

@@ -588,6 +588,7 @@ public class BukkitBlockManager extends AbstractBlockManager {
Object resourceLocation = KeyUtils.toResourceLocation(BlockKeys.NOTE_BLOCK);
Object block = CoreReflections.method$Registry$get.invoke(MBuiltInRegistries.BLOCK, resourceLocation);
Object stateDefinition = CoreReflections.field$Block$StateDefinition.get(block);
@SuppressWarnings("unchecked")
ImmutableList<Object> states = (ImmutableList<Object>) CoreReflections.field$StateDefinition$states.get(stateDefinition);
for (Object state : states) {
BlockStateUtils.CLIENT_SIDE_NOTE_BLOCKS.put(state, new Object());