diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-03-18 20:07:12 +0200 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-03-18 20:07:12 +0200 |
commit | 6835bb564b28075dcf05605560827d92994f44d9 (patch) | |
tree | 15579df3daf6fb02ec5b85848731028920fb2785 /GuiTest/src/main | |
parent | 8912cc45001f7c580da2a90218a47a8ada80aa70 (diff) | |
download | LibGui-6835bb564b28075dcf05605560827d92994f44d9.tar.gz LibGui-6835bb564b28075dcf05605560827d92994f44d9.tar.bz2 LibGui-6835bb564b28075dcf05605560827d92994f44d9.zip |
Update to 1.19.4, add new focus API
Diffstat (limited to 'GuiTest/src/main')
-rw-r--r-- | GuiTest/src/main/java/io/github/cottonmc/test/LibGuiTest.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/LibGuiTest.java b/GuiTest/src/main/java/io/github/cottonmc/test/LibGuiTest.java index 009ea23..3c11004 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/LibGuiTest.java +++ b/GuiTest/src/main/java/io/github/cottonmc/test/LibGuiTest.java @@ -13,6 +13,8 @@ import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; +import net.minecraft.resource.featuretoggle.FeatureFlags; +import net.minecraft.resource.featuretoggle.FeatureSet; import net.minecraft.screen.ScreenHandlerContext; import net.minecraft.screen.ScreenHandlerType; import net.minecraft.util.Identifier; @@ -48,10 +50,10 @@ public class LibGuiTest implements ModInitializer { GUI_SCREEN_HANDLER_TYPE = new ScreenHandlerType<>((int syncId, PlayerInventory inventory) -> { return new TestDescription(GUI_SCREEN_HANDLER_TYPE, syncId, inventory, ScreenHandlerContext.EMPTY); - }); + }, FeatureSet.of(FeatureFlags.VANILLA)); Registry.register(Registries.SCREEN_HANDLER, new Identifier(MODID, "gui"), GUI_SCREEN_HANDLER_TYPE); - REALLY_SIMPLE_SCREEN_HANDLER_TYPE = new ScreenHandlerType<>(ReallySimpleDescription::new); + REALLY_SIMPLE_SCREEN_HANDLER_TYPE = new ScreenHandlerType<>(ReallySimpleDescription::new, FeatureSet.of(FeatureFlags.VANILLA)); Registry.register(Registries.SCREEN_HANDLER, new Identifier(MODID, "really_simple"), REALLY_SIMPLE_SCREEN_HANDLER_TYPE); Optional<ModContainer> containerOpt = FabricLoader.getInstance().getModContainer("jankson"); |