zh_cn:tutorial:extendedscreenhandler
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
zh_cn:tutorial:extendedscreenhandler [2022/02/10 13:24] – 在 Screen 中使用 ExtendedScreenHandler 信息 timothy_starman | zh_cn:tutorial:extendedscreenhandler [2022/02/10 13:26] – 注册我们的 ScreenHandler timothy_starman | ||
---|---|---|---|
Line 141: | Line 141: | ||
} | } | ||
+ | </ | ||
+ | |||
+ | ====== 注册我们的 ScreenHandler ====== | ||
+ | |||
+ | <code java [enable_line_numbers=" | ||
+ | public class ExampleMod implements ModInitializer { | ||
+ | |||
+ | [...] | ||
+ | public static final ScreenHandlerType< | ||
+ | |||
+ | static { | ||
+ | [...] | ||
+ | |||
+ | // | ||
+ | BOX_SCREEN_HANDLER = ScreenHandlerRegistry.registerExtended(BOX, | ||
+ | } | ||
+ | |||
+ | @Override | ||
+ | public void onInitialize() { | ||
+ | |||
+ | } | ||
+ | } | ||
</ | </ | ||
zh_cn/tutorial/extendedscreenhandler.txt · Last modified: 2022/02/10 13:32 by timothy_starman