aboutsummaryrefslogtreecommitdiff
path: root/default-plugin
diff options
context:
space:
mode:
authorshedaniel <daniel@shedaniel.me>2021-05-31 00:14:21 +0800
committershedaniel <daniel@shedaniel.me>2021-05-31 00:14:21 +0800
commit82e9655e3786f58c32e2b6584732bb40f9508c1c (patch)
treec045169783ff60013c5d063dbe8ec03b97cdc2a9 /default-plugin
parent82cb8e2ac9f87375998e5962f1ffe8a9c05bafb0 (diff)
downloadRoughlyEnoughItems-82e9655e3786f58c32e2b6584732bb40f9508c1c.tar.gz
RoughlyEnoughItems-82e9655e3786f58c32e2b6584732bb40f9508c1c.tar.bz2
RoughlyEnoughItems-82e9655e3786f58c32e2b6584732bb40f9508c1c.zip
Fix rendering issues with overlays, REIHelper -> REIRuntime
Diffstat (limited to 'default-plugin')
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/autocrafting/DefaultRecipeBookHandler.java4
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultBrewingCategory.java4
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultInformationCategory.java8
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/beacon/DefaultBeaconBaseCategory.java4
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/beacon/DefaultBeaconPaymentCategory.java4
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/GameModeFavoriteEntry.java4
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/WeatherFavoriteEntry.java4
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/cooking/DefaultCookingDisplay.java4
-rw-r--r--default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/crafting/DefaultCraftingDisplay.java4
9 files changed, 20 insertions, 20 deletions
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/autocrafting/DefaultRecipeBookHandler.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/autocrafting/DefaultRecipeBookHandler.java
index 78cef89a0..2df1550a1 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/autocrafting/DefaultRecipeBookHandler.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/autocrafting/DefaultRecipeBookHandler.java
@@ -26,7 +26,7 @@ package me.shedaniel.rei.plugin.autocrafting;
import me.shedaniel.rei.api.client.ClientHelper;
import me.shedaniel.rei.api.client.registry.transfer.TransferHandler;
import me.shedaniel.rei.api.common.display.Display;
-import me.shedaniel.rei.api.common.display.SimpleMenuDisplay;
+import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay;
import me.shedaniel.rei.plugin.common.displays.cooking.DefaultCookingDisplay;
import me.shedaniel.rei.plugin.common.displays.crafting.DefaultCraftingDisplay;
import net.fabricmc.api.EnvType;
@@ -43,7 +43,7 @@ import net.minecraft.world.item.crafting.Recipe;
public class DefaultRecipeBookHandler implements TransferHandler {
@Override
public Result handle(Context context) {
- if (context.getDisplay() instanceof SimpleMenuDisplay && ClientHelper.getInstance().canUseMovePackets())
+ if (context.getDisplay() instanceof SimpleGridMenuDisplay && ClientHelper.getInstance().canUseMovePackets())
return Result.createNotApplicable();
Display display = context.getDisplay();
if (!(context.getMenu() instanceof RecipeBookMenu))
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultBrewingCategory.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultBrewingCategory.java
index 613523792..4ba539f5a 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultBrewingCategory.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultBrewingCategory.java
@@ -27,7 +27,7 @@ import com.google.common.collect.Lists;
import com.mojang.blaze3d.systems.RenderSystem;
import me.shedaniel.math.Point;
import me.shedaniel.math.Rectangle;
-import me.shedaniel.rei.api.client.REIHelper;
+import me.shedaniel.rei.api.client.REIRuntime;
import me.shedaniel.rei.api.client.gui.Renderer;
import me.shedaniel.rei.api.client.gui.widgets.Widget;
import me.shedaniel.rei.api.client.gui.widgets.Widgets;
@@ -69,7 +69,7 @@ public class DefaultBrewingCategory implements DisplayCategory<DefaultBrewingDis
List<Widget> widgets = Lists.newArrayList();
widgets.add(Widgets.createRecipeBase(bounds));
widgets.add(Widgets.createDrawableWidget((helper, matrices, mouseX, mouseY, delta) -> {
- RenderSystem.setShaderTexture(0, REIHelper.getInstance().getDefaultDisplayTexture());
+ RenderSystem.setShaderTexture(0, REIRuntime.getInstance().getDefaultDisplayTexture());
helper.blit(matrices, startPoint.x, startPoint.y, 0, 108, 103, 59);
int width = Mth.ceil(System.currentTimeMillis() / 250d % 18d);
helper.blit(matrices, startPoint.x + 44, startPoint.y + 28, 103, 163, width, 4);
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultInformationCategory.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultInformationCategory.java
index d6d8f6f9e..53741803d 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultInformationCategory.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/DefaultInformationCategory.java
@@ -32,7 +32,7 @@ import me.shedaniel.clothconfig2.api.ScissorsHandler;
import me.shedaniel.clothconfig2.api.ScrollingContainer;
import me.shedaniel.math.Point;
import me.shedaniel.math.Rectangle;
-import me.shedaniel.rei.api.client.REIHelper;
+import me.shedaniel.rei.api.client.REIRuntime;
import me.shedaniel.rei.api.client.gui.AbstractRenderer;
import me.shedaniel.rei.api.client.gui.DisplayRenderer;
import me.shedaniel.rei.api.client.gui.Renderer;
@@ -102,7 +102,7 @@ public class DefaultInformationCategory implements DisplayCategory<DefaultInform
return new AbstractRenderer() {
@Override
public void render(PoseStack matrices, Rectangle bounds, int mouseX, int mouseY, float delta) {
- RenderSystem.setShaderTexture(0, REIHelper.getInstance().getDefaultDisplayTexture());
+ RenderSystem.setShaderTexture(0, REIRuntime.getInstance().getDefaultDisplayTexture());
matrices.pushPose();
matrices.translate(-1.2f, -1, 0);
Matrix4f matrix = matrices.last().pose();
@@ -198,13 +198,13 @@ public class DefaultInformationCategory implements DisplayCategory<DefaultInform
int currentY = (int) -scrolling.scrollAmount + innerBounds.y;
for (FormattedCharSequence text : texts) {
if (text != null && currentY + font.lineHeight >= innerBounds.y && currentY <= innerBounds.getMaxY()) {
- font.draw(matrices, text, innerBounds.x + 2, currentY + 2, REIHelper.getInstance().isDarkThemeEnabled() ? 0xFFBBBBBB : 0xFF090909);
+ font.draw(matrices, text, innerBounds.x + 2, currentY + 2, REIRuntime.getInstance().isDarkThemeEnabled() ? 0xFFBBBBBB : 0xFF090909);
}
currentY += text == null ? 4 : font.lineHeight;
}
ScissorsHandler.INSTANCE.removeLastScissor();
ScissorsHandler.INSTANCE.scissor(scrolling.getBounds());
- scrolling.renderScrollBar(0xff000000, 1, REIHelper.getInstance().isDarkThemeEnabled() ? 0.8f : 1f);
+ scrolling.renderScrollBar(0xff000000, 1, REIRuntime.getInstance().isDarkThemeEnabled() ? 0.8f : 1f);
ScissorsHandler.INSTANCE.removeLastScissor();
}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/beacon/DefaultBeaconBaseCategory.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/beacon/DefaultBeaconBaseCategory.java
index d19235d36..5c98a590e 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/beacon/DefaultBeaconBaseCategory.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/beacon/DefaultBeaconBaseCategory.java
@@ -30,7 +30,7 @@ import me.shedaniel.clothconfig2.api.ScissorsHandler;
import me.shedaniel.clothconfig2.api.ScrollingContainer;
import me.shedaniel.math.Point;
import me.shedaniel.math.Rectangle;
-import me.shedaniel.rei.api.client.REIHelper;
+import me.shedaniel.rei.api.client.REIRuntime;
import me.shedaniel.rei.api.client.gui.DisplayRenderer;
import me.shedaniel.rei.api.client.gui.Renderer;
import me.shedaniel.rei.api.client.gui.widgets.Slot;
@@ -171,7 +171,7 @@ public class DefaultBeaconBaseCategory implements DisplayCategory<DefaultBeaconB
}
ScissorsHandler.INSTANCE.removeLastScissor();
ScissorsHandler.INSTANCE.scissor(scrolling.getBounds());
- scrolling.renderScrollBar(0xff000000, 1, REIHelper.getInstance().isDarkThemeEnabled() ? 0.8f : 1f);
+ scrolling.renderScrollBar(0xff000000, 1, REIRuntime.getInstance().isDarkThemeEnabled() ? 0.8f : 1f);
ScissorsHandler.INSTANCE.removeLastScissor();
}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/beacon/DefaultBeaconPaymentCategory.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/beacon/DefaultBeaconPaymentCategory.java
index 863a840ec..425a639b7 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/beacon/DefaultBeaconPaymentCategory.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/categories/beacon/DefaultBeaconPaymentCategory.java
@@ -30,7 +30,7 @@ import me.shedaniel.clothconfig2.api.ScissorsHandler;
import me.shedaniel.clothconfig2.api.ScrollingContainer;
import me.shedaniel.math.Point;
import me.shedaniel.math.Rectangle;
-import me.shedaniel.rei.api.client.REIHelper;
+import me.shedaniel.rei.api.client.REIRuntime;
import me.shedaniel.rei.api.client.gui.DisplayRenderer;
import me.shedaniel.rei.api.client.gui.Renderer;
import me.shedaniel.rei.api.client.gui.widgets.Slot;
@@ -171,7 +171,7 @@ public class DefaultBeaconPaymentCategory implements DisplayCategory<DefaultBeac
}
ScissorsHandler.INSTANCE.removeLastScissor();
ScissorsHandler.INSTANCE.scissor(scrolling.getBounds());
- scrolling.renderScrollBar(0xff000000, 1, REIHelper.getInstance().isDarkThemeEnabled() ? 0.8f : 1f);
+ scrolling.renderScrollBar(0xff000000, 1, REIRuntime.getInstance().isDarkThemeEnabled() ? 0.8f : 1f);
ScissorsHandler.INSTANCE.removeLastScissor();
}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/GameModeFavoriteEntry.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/GameModeFavoriteEntry.java
index 3bdf37d38..df07e00c4 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/GameModeFavoriteEntry.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/GameModeFavoriteEntry.java
@@ -26,7 +26,7 @@ package me.shedaniel.rei.plugin.client.favorites;
import com.mojang.blaze3d.vertex.PoseStack;
import me.shedaniel.math.Point;
import me.shedaniel.math.Rectangle;
-import me.shedaniel.rei.api.client.REIHelper;
+import me.shedaniel.rei.api.client.REIRuntime;
import me.shedaniel.rei.api.client.config.ConfigObject;
import me.shedaniel.rei.api.client.favorites.CompoundFavoriteRenderer;
import me.shedaniel.rei.api.client.favorites.FavoriteEntry;
@@ -258,7 +258,7 @@ public class GameModeFavoriteEntry extends FavoriteEntry {
fill(matrices, x, y, x + width, y + 12, -12237499);
}
if (!disabled && selected && containsMouse) {
- REIHelper.getInstance().queueTooltip(Tooltip.create(new TranslatableComponent("text.rei.gamemode_button.tooltip.entry", text)));
+ REIRuntime.getInstance().queueTooltip(Tooltip.create(new TranslatableComponent("text.rei.gamemode_button.tooltip.entry", text)));
}
String s = text;
if (disabled) {
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/WeatherFavoriteEntry.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/WeatherFavoriteEntry.java
index 794954925..3d57bf70b 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/WeatherFavoriteEntry.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/client/favorites/WeatherFavoriteEntry.java
@@ -27,7 +27,7 @@ import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.vertex.PoseStack;
import me.shedaniel.math.Point;
import me.shedaniel.math.Rectangle;
-import me.shedaniel.rei.api.client.REIHelper;
+import me.shedaniel.rei.api.client.REIRuntime;
import me.shedaniel.rei.api.client.config.ConfigObject;
import me.shedaniel.rei.api.client.favorites.CompoundFavoriteRenderer;
import me.shedaniel.rei.api.client.favorites.FavoriteEntry;
@@ -299,7 +299,7 @@ public class WeatherFavoriteEntry extends FavoriteEntry {
fill(matrices, x, y, x + width, y + 12, -12237499);
}
if (selected && containsMouse) {
- REIHelper.getInstance().queueTooltip(Tooltip.create(new TranslatableComponent("text.rei.weather_button.tooltip.entry", text)));
+ REIRuntime.getInstance().queueTooltip(Tooltip.create(new TranslatableComponent("text.rei.weather_button.tooltip.entry", text)));
}
font.draw(matrices, text, x + 2, y + 2, selected ? 16777215 : 8947848);
}
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/cooking/DefaultCookingDisplay.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/cooking/DefaultCookingDisplay.java
index cbf9c0683..3905f77a2 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/cooking/DefaultCookingDisplay.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/cooking/DefaultCookingDisplay.java
@@ -23,7 +23,7 @@
package me.shedaniel.rei.plugin.common.displays.cooking;
-import me.shedaniel.rei.api.common.display.SimpleMenuDisplay;
+import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay;
import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
import me.shedaniel.rei.api.common.entry.EntryIngredient;
import me.shedaniel.rei.api.common.registry.RecipeManagerContext;
@@ -37,7 +37,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Optional;
-public abstract class DefaultCookingDisplay extends BasicDisplay implements SimpleMenuDisplay {
+public abstract class DefaultCookingDisplay extends BasicDisplay implements SimpleGridMenuDisplay {
private Recipe<?> recipe;
private float xp;
private double cookTime;
diff --git a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/crafting/DefaultCraftingDisplay.java b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/crafting/DefaultCraftingDisplay.java
index 979bf82ea..ea442b696 100644
--- a/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/crafting/DefaultCraftingDisplay.java
+++ b/default-plugin/src/main/java/me/shedaniel/rei/plugin/common/displays/crafting/DefaultCraftingDisplay.java
@@ -24,7 +24,7 @@
package me.shedaniel.rei.plugin.common.displays.crafting;
import me.shedaniel.rei.api.common.category.CategoryIdentifier;
-import me.shedaniel.rei.api.common.display.SimpleMenuDisplay;
+import me.shedaniel.rei.api.common.display.SimpleGridMenuDisplay;
import me.shedaniel.rei.api.common.display.basic.BasicDisplay;
import me.shedaniel.rei.api.common.entry.EntryIngredient;
import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes;
@@ -41,7 +41,7 @@ import java.util.Collections;
import java.util.List;
import java.util.Optional;
-public abstract class DefaultCraftingDisplay<C extends Recipe<?>> extends BasicDisplay implements SimpleMenuDisplay {
+public abstract class DefaultCraftingDisplay<C extends Recipe<?>> extends BasicDisplay implements SimpleGridMenuDisplay {
protected Optional<C> recipe;
public DefaultCraftingDisplay(List<EntryIngredient> inputs, List<EntryIngredient> outputs, Optional<C> recipe) {