GuiExPatternTerminalMixin高版本eae适配
This commit is contained in:
parent
3de1cc5701
commit
66ee90c4be
|
|
@ -169,7 +169,14 @@ public abstract class GuiExPatternTerminalMixin extends AEBaseScreen<AEBaseMenu>
|
|||
|
||||
BlockPos pos = info.pos();
|
||||
Direction face = info.face();
|
||||
ResourceKey<Level> worldKey = info.playerWorld();
|
||||
ResourceKey<Level> worldKey;
|
||||
try {
|
||||
// 先尝试新版字段名 world()
|
||||
worldKey = (ResourceKey<Level>) info.getClass().getMethod("world").invoke(info);
|
||||
} catch (NoSuchMethodException e) {
|
||||
// 兼容旧版字段名 playerWorld()
|
||||
worldKey = (ResourceKey<Level>) info.getClass().getMethod("playerWorld").invoke(info);
|
||||
}
|
||||
if (pos == null || worldKey == null) return;
|
||||
|
||||
ModNetwork.CHANNEL.sendToServer(new OpenProviderUiC2SPacket(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user