diff options
| author | shedaniel <daniel@shedaniel.me> | 2024-06-17 00:07:02 +0900 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2024-06-17 00:07:02 +0900 |
| commit | 667c7993dcea8b09bdffcad9956b353f054ad6e2 (patch) | |
| tree | a8952cd4dd6465919805f159dee66434dc008e22 /runtime/src/main/java/me/shedaniel/rei/plugin | |
| parent | de36cf8cbce35d6fc5f879651c057fa143e72d89 (diff) | |
| download | RoughlyEnoughItems-667c7993dcea8b09bdffcad9956b353f054ad6e2.tar.gz RoughlyEnoughItems-667c7993dcea8b09bdffcad9956b353f054ad6e2.tar.bz2 RoughlyEnoughItems-667c7993dcea8b09bdffcad9956b353f054ad6e2.zip | |
Update to 1.21
Diffstat (limited to 'runtime/src/main/java/me/shedaniel/rei/plugin')
4 files changed, 11 insertions, 11 deletions
diff --git a/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/DefaultClientRuntimePlugin.java b/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/DefaultClientRuntimePlugin.java index aa78ff903..4108837f9 100644 --- a/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/DefaultClientRuntimePlugin.java +++ b/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/DefaultClientRuntimePlugin.java @@ -113,7 +113,7 @@ public class DefaultClientRuntimePlugin implements REIClientPlugin { public void registerEntries(EntryRegistry registry) { if (ClientHelperImpl.getInstance().isAprilFools.get()) { registry.addEntry(ClientEntryStacks.of(new Renderer() { - private final ResourceLocation id = new ResourceLocation("roughlyenoughitems", "textures/gui/kirb.png"); + private final ResourceLocation id = ResourceLocation.fromNamespaceAndPath("roughlyenoughitems", "textures/gui/kirb.png"); @Override public void render(GuiGraphics graphics, Rectangle bounds, int mouseX, int mouseY, float delta) { @@ -185,10 +185,10 @@ public class DefaultClientRuntimePlugin implements REIClientPlugin { public void registerInputMethods(InputMethodRegistry registry) { registry.add(DefaultInputMethod.ID, DefaultInputMethod.INSTANCE); UniHanManager manager = new UniHanManager(Platform.getConfigFolder().resolve("roughlyenoughitems/unihan.zip")); - registry.add(new ResourceLocation("rei:pinyin"), new PinyinInputMethod(manager)); - registry.add(new ResourceLocation("rei:jyutping"), new JyutpingInputMethod(manager)); - registry.add(new ResourceLocation("rei:bomopofo"), new BomopofoInputMethod(manager)); - registry.add(new ResourceLocation("rei:double_pinyin"), new DoublePinyinInputMethod(manager)); + registry.add(ResourceLocation.parse("rei:pinyin"), new PinyinInputMethod(manager)); + registry.add(ResourceLocation.parse("rei:jyutping"), new JyutpingInputMethod(manager)); + registry.add(ResourceLocation.parse("rei:bomopofo"), new BomopofoInputMethod(manager)); + registry.add(ResourceLocation.parse("rei:double_pinyin"), new DoublePinyinInputMethod(manager)); } private enum EntryStackFavoriteType implements FavoriteEntryType<EntryStackFavoriteEntry> { diff --git a/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/HideIngredientsFromTagsPlugin.java b/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/HideIngredientsFromTagsPlugin.java index f89267300..ff5cc5a2f 100644 --- a/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/HideIngredientsFromTagsPlugin.java +++ b/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/HideIngredientsFromTagsPlugin.java @@ -56,10 +56,10 @@ import java.util.Iterator; @Environment(EnvType.CLIENT) @ApiStatus.Internal public class HideIngredientsFromTagsPlugin implements REIClientPlugin { - private static final ResourceLocation HIDDEN_TAG = new ResourceLocation("c:hidden_from_recipe_viewers"); + private static final ResourceLocation HIDDEN_TAG = ResourceLocation.fromNamespaceAndPath("c", "hidden_from_recipe_viewers"); static { - FilteringRuleTypeRegistry.getInstance().register(new ResourceLocation("roughlyenoughitems", "hidden_from_recipe_viewers"), HideTagsFilteringRuleType.INSTANCE); + FilteringRuleTypeRegistry.getInstance().register(ResourceLocation.fromNamespaceAndPath("roughlyenoughitems", "hidden_from_recipe_viewers"), HideTagsFilteringRuleType.INSTANCE); RoughlyEnoughItemsCoreClient.POST_UPDATE_TAGS.register(HideTagsFilteringRule.INSTANCE::markDirty); } diff --git a/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/InputMethodWatcher.java b/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/InputMethodWatcher.java index c8a627cfe..3eba5207e 100644 --- a/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/InputMethodWatcher.java +++ b/runtime/src/main/java/me/shedaniel/rei/plugin/client/runtime/InputMethodWatcher.java @@ -97,7 +97,7 @@ public class InputMethodWatcher implements HintProvider { () -> CraftableFilterButtonWidget.createInputMethodEntries(access, CraftableFilterButtonWidget.getApplicableInputMethods())); }), new HintButton(Component.translatable("text.rei.hint.ignore"), bounds -> { - ConfigManagerImpl.getInstance().getConfig().setInputMethodId(new ResourceLocation("rei:default")); + ConfigManagerImpl.getInstance().getConfig().setInputMethodId(ResourceLocation.parse("rei:default")); ConfigManager.getInstance().saveConfig(); }) ); diff --git a/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/DefaultRuntimePlugin.java b/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/DefaultRuntimePlugin.java index ca1e44846..d38c7130d 100644 --- a/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/DefaultRuntimePlugin.java +++ b/runtime/src/main/java/me/shedaniel/rei/plugin/common/runtime/DefaultRuntimePlugin.java @@ -48,7 +48,7 @@ import java.util.stream.Stream; @ApiStatus.Internal public class DefaultRuntimePlugin implements REIServerPlugin { - public static final ResourceLocation PLUGIN = new ResourceLocation("roughlyenoughitems", "default_runtime_plugin"); + public static final ResourceLocation PLUGIN = ResourceLocation.fromNamespaceAndPath("roughlyenoughitems", "default_runtime_plugin"); @Override public void registerEntryTypes(EntryTypeRegistry registry) { @@ -66,7 +66,7 @@ public class DefaultRuntimePlugin implements REIServerPlugin { @Override public void registerSlotAccessors(SlotAccessorRegistry registry) { - registry.register(new ResourceLocation("roughlyenoughitems", "vanilla"), + registry.register(ResourceLocation.fromNamespaceAndPath("roughlyenoughitems", "vanilla"), slotAccessor -> slotAccessor instanceof VanillaSlotAccessor, new SlotAccessorRegistry.Serializer() { @Override @@ -86,7 +86,7 @@ public class DefaultRuntimePlugin implements REIServerPlugin { return tag; } }); - registry.register(new ResourceLocation("roughlyenoughitems", "player"), + registry.register(ResourceLocation.fromNamespaceAndPath("roughlyenoughitems", "player"), slotAccessor -> slotAccessor instanceof PlayerInventorySlotAccessor, new SlotAccessorRegistry.Serializer() { @Override |
