diff options
Diffstat (limited to 'forge/src/main/java')
3 files changed, 6 insertions, 28 deletions
diff --git a/forge/src/main/java/me/shedaniel/rei/forge/PluginDetectorImpl.java b/forge/src/main/java/me/shedaniel/rei/forge/PluginDetectorImpl.java index 339853769..1f9f26811 100644 --- a/forge/src/main/java/me/shedaniel/rei/forge/PluginDetectorImpl.java +++ b/forge/src/main/java/me/shedaniel/rei/forge/PluginDetectorImpl.java @@ -30,9 +30,6 @@ import me.shedaniel.rei.api.common.plugins.PluginView; import me.shedaniel.rei.api.common.plugins.REIPluginProvider; import me.shedaniel.rei.api.common.plugins.REIServerPlugin; import me.shedaniel.rei.impl.ClientInternals; -import me.shedaniel.rei.jeicompat.JEIExtraClientPlugin; -import me.shedaniel.rei.jeicompat.JEIExtraPlugin; -import me.shedaniel.rei.jeicompat.JEIPluginDetector; import me.shedaniel.rei.plugin.client.DefaultClientPlugin; import me.shedaniel.rei.plugin.client.DefaultClientRuntimePlugin; import me.shedaniel.rei.plugin.common.DefaultPlugin; @@ -40,7 +37,6 @@ import me.shedaniel.rei.plugin.common.DefaultRuntimePlugin; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -import org.apache.logging.log4j.util.TriConsumer; import java.util.ArrayList; import java.util.Collection; @@ -73,7 +69,6 @@ public class PluginDetectorImpl { public static void detectServerPlugins() { PluginView.getServerInstance().registerPlugin(wrapPlugin(Collections.singletonList("roughlyenoughitems"), new DefaultPlugin())); PluginView.getServerInstance().registerPlugin(wrapPlugin(Collections.singletonList("roughlyenoughitems"), new DefaultRuntimePlugin())); - PluginView.getServerInstance().registerPlugin(wrapPlugin(Collections.singletonList("roughlyenoughitems"), new JEIExtraPlugin())); AnnotationUtils.<REIPlugin, REIServerPlugin>scanAnnotation(REIPlugin.class, REIServerPlugin.class::isAssignableFrom, (modId, plugin, clazz) -> { ((PluginView<REIServerPlugin>) PluginManager.getServerInstance()).registerPlugin(wrapPlugin(modId, plugin.get())); }); @@ -90,20 +85,9 @@ public class PluginDetectorImpl { public static void detectClientPlugins() { PluginView.getClientInstance().registerPlugin(wrapPlugin(Collections.singletonList("roughlyenoughitems"), new DefaultClientPlugin())); PluginView.getClientInstance().registerPlugin(wrapPlugin(Collections.singletonList("roughlyenoughitems"), new DefaultClientRuntimePlugin())); - PluginView.getClientInstance().registerPlugin(wrapPlugin(Collections.singletonList("roughlyenoughitems"), new JEIExtraClientPlugin())); AnnotationUtils.<REIPlugin, REIClientPlugin>scanAnnotation(REIPlugin.class, REIClientPlugin.class::isAssignableFrom, (modId, plugin, clazz) -> { ((PluginView<REIClientPlugin>) PluginManager.getClientInstance()).registerPlugin(wrapPlugin(modId, plugin.get())); }); - ClientInternals.attachInstance((Supplier<List<String>>) () -> { - List<String> modIds = new ArrayList<>(); - for (REIPluginProvider<REIClientPlugin> plugin : PluginManager.getClientInstance().getPluginProviders()) { - if (plugin instanceof JEIPluginDetector.JEIPluginProvider) { - modIds.addAll(((JEIPluginDetector.JEIPluginProvider) plugin).modIds); - } - } - return modIds; - }, "jeiCompatMods"); - JEIPluginDetector.detect((aClass, consumer) -> AnnotationUtils.scanAnnotation((Class<Object>) aClass, c -> true, - (TriConsumer<List<String>, Supplier<Object>, Class<Object>>) (TriConsumer) consumer), PluginView.getClientInstance()::registerPlugin); + ClientInternals.attachInstance((Supplier<List<String>>) ArrayList::new, "jeiCompatMods"); } } diff --git a/forge/src/main/java/me/shedaniel/rei/impl/client/gui/forge/ScreenOverlayImplImpl.java b/forge/src/main/java/me/shedaniel/rei/impl/client/gui/forge/ScreenOverlayImplImpl.java index 9ec2101ad..200b418e1 100644 --- a/forge/src/main/java/me/shedaniel/rei/impl/client/gui/forge/ScreenOverlayImplImpl.java +++ b/forge/src/main/java/me/shedaniel/rei/impl/client/gui/forge/ScreenOverlayImplImpl.java @@ -23,7 +23,6 @@ package me.shedaniel.rei.impl.client.gui.forge; -import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; import me.shedaniel.rei.api.client.gui.widgets.Tooltip; import me.shedaniel.rei.api.common.entry.EntryStack; @@ -39,11 +38,8 @@ import java.util.List; public class ScreenOverlayImplImpl { public static void renderTooltipInner(Screen screen, PoseStack matrices, Tooltip tooltip, int mouseX, int mouseY) { - PoseStack modelViewStack = RenderSystem.getModelViewStack(); - modelViewStack.pushPose(); - modelViewStack.translate(0, 0, 500); - RenderSystem.applyModelViewMatrix(); matrices.pushPose(); + matrices.translate(0, 0, 500); EntryStack<?> stack = tooltip.getContextStack(); ItemStack itemStack = stack.getValue() instanceof ItemStack ? stack.castValue() : ItemStack.EMPTY; GuiUtils.preItemToolTip(itemStack); @@ -51,7 +47,5 @@ public class ScreenOverlayImplImpl { GuiUtils.drawHoveringText(matrices, texts, mouseX, mouseY, screen.width, screen.height, screen.width, Minecraft.getInstance().font); GuiUtils.postItemToolTip(); matrices.popPose(); - modelViewStack.popPose(); - RenderSystem.applyModelViewMatrix(); } } diff --git a/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java b/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java index 6d69f9068..027cf3cac 100644 --- a/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java +++ b/forge/src/main/java/me/shedaniel/rei/plugin/client/forge/DefaultClientPluginImpl.java @@ -57,9 +57,9 @@ public class DefaultClientPluginImpl { Set<Potion> potions = Sets.newLinkedHashSet(); for (Ingredient container : PotionBrewing.ALLOWED_CONTAINERS) { for (PotionBrewing.Mix<Potion> mix : PotionBrewing.POTION_MIXES) { - IRegistryDelegate<Potion> from = mix.f_43532_; + IRegistryDelegate<Potion> from = mix.field_185198_a; Ingredient ingredient = mix.ingredient; - IRegistryDelegate<Potion> to = mix.f_43534_; + IRegistryDelegate<Potion> to = mix.field_185200_c; Ingredient base = Ingredient.of(Arrays.stream(container.getItems()) .map(ItemStack::copy) .map(stack -> PotionUtils.setPotion(stack, from.get()))); @@ -74,9 +74,9 @@ public class DefaultClientPluginImpl { } for (Potion potion : potions) { for (PotionBrewing.Mix<Item> mix : PotionBrewing.CONTAINER_MIXES) { - IRegistryDelegate<Item> from = mix.f_43532_; + IRegistryDelegate<Item> from = mix.field_185198_a; Ingredient ingredient = mix.ingredient; - IRegistryDelegate<Item> to = mix.f_43534_; + IRegistryDelegate<Item> to = mix.field_185200_c; Ingredient base = Ingredient.of(PotionUtils.setPotion(new ItemStack(from.get()), potion)); ItemStack output = PotionUtils.setPotion(new ItemStack(to.get()), potion); clientPlugin.registerBrewingRecipe(base, ingredient, output); |
