diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-03-19 04:30:52 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-03-19 04:30:52 +0800 |
| commit | 1f6fc41eaebc3c565bef12606ff98a076fc32e89 (patch) | |
| tree | 33a5c1cd135f6c5ecd8b85fd602bd8c290cf9fb7 /src/main/java | |
| parent | 1764648e4f536b2e6ac1b7d1cb3c3fb60e206b29 (diff) | |
| download | RoughlyEnoughItems-1f6fc41eaebc3c565bef12606ff98a076fc32e89.tar.gz RoughlyEnoughItems-1f6fc41eaebc3c565bef12606ff98a076fc32e89.tar.bz2 RoughlyEnoughItems-1f6fc41eaebc3c565bef12606ff98a076fc32e89.zip | |
20w12a
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'src/main/java')
26 files changed, 68 insertions, 76 deletions
diff --git a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java index f62fef279..ea124aa1e 100644 --- a/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java +++ b/src/main/java/me/shedaniel/rei/RoughlyEnoughItemsNetwork.java @@ -31,6 +31,7 @@ import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.network.ServerSidePacketRegistry; import net.fabricmc.loader.api.FabricLoader; import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketByteBuf; import net.minecraft.screen.AbstractRecipeScreenHandler; import net.minecraft.screen.PlayerScreenHandler; import net.minecraft.screen.ScreenHandler; @@ -38,8 +39,6 @@ import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.text.TranslatableText; import net.minecraft.util.Formatting; import net.minecraft.util.Identifier; -import net.minecraft.util.PacketByteBuf; - import java.util.Comparator; import java.util.List; import java.util.Map; diff --git a/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java b/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java index f4f70a89e..82bd199e5 100644 --- a/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java +++ b/src/main/java/me/shedaniel/rei/gui/ContainerScreenOverlay.java @@ -206,7 +206,7 @@ public class ContainerScreenOverlay extends WidgetWithBounds { Widgets.createDrawableWidget((helper, mouseX, mouseY, delta) -> { helper.setZOffset(helper.getZOffset() + 1); MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE); - helper.blit(configButtonArea.x + 3, configButtonArea.y + 3, 0, 0, 14, 14); + helper.drawTexture(configButtonArea.x + 3, configButtonArea.y + 3, 0, 0, 14, 14); }) ) ))); @@ -238,7 +238,7 @@ public class ContainerScreenOverlay extends WidgetWithBounds { widgets.add(Widgets.createDrawableWidget((helper, mouseX, mouseY, delta) -> { MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE); RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); - helper.blit(weatherButton.getBounds().x + 3, weatherButton.getBounds().y + 3, weather.getId() * 14, 14, 14, 14); + helper.drawTexture(weatherButton.getBounds().x + 3, weatherButton.getBounds().y + 3, weather.getId() * 14, 14, 14, 14); })); xxx += ConfigObject.getInstance().isLeftHandSidePanel() ? -25 : 25; } diff --git a/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java b/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java index 4b2851449..ab6630070 100644 --- a/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java +++ b/src/main/java/me/shedaniel/rei/gui/PreRecipeViewingScreen.java @@ -189,7 +189,7 @@ public class PreRecipeViewingScreen extends Screen { @Override public void render(int i, int i1, float delta) { MinecraftClient.getInstance().getTextureManager().bindTexture(IDENTIFIER); - blit(bounds.x + 4, bounds.y + 4, u, v, 200, 112); + drawTexture(bounds.x + 4, bounds.y + 4, u, v, 200, 112); } @Override diff --git a/src/main/java/me/shedaniel/rei/gui/credits/CreditsEntryListWidget.java b/src/main/java/me/shedaniel/rei/gui/credits/CreditsEntryListWidget.java index 9c7a96dd5..9e0f63dde 100644 --- a/src/main/java/me/shedaniel/rei/gui/credits/CreditsEntryListWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/credits/CreditsEntryListWidget.java @@ -37,7 +37,7 @@ public class CreditsEntryListWidget extends DynamicNewSmoothScrollingEntryListWi private boolean inFocus; public CreditsEntryListWidget(MinecraftClient client, int width, int height, int startY, int endY) { - super(client, width, height, startY, endY, DrawableHelper.BACKGROUND_LOCATION); + super(client, width, height, startY, endY, DrawableHelper.BACKGROUND_TEXTURE); } @Override diff --git a/src/main/java/me/shedaniel/rei/gui/entries/SimpleRecipeEntry.java b/src/main/java/me/shedaniel/rei/gui/entries/SimpleRecipeEntry.java index 74da3efb1..740dde936 100644 --- a/src/main/java/me/shedaniel/rei/gui/entries/SimpleRecipeEntry.java +++ b/src/main/java/me/shedaniel/rei/gui/entries/SimpleRecipeEntry.java @@ -114,7 +114,7 @@ public class SimpleRecipeEntry extends RecipeEntry { xx = bounds.x + 4 + 18 * (getItemsPerLine() - 2); yy = bounds.y + getHeight() / 2 - 8; MinecraftClient.getInstance().getTextureManager().bindTexture(CHEST_GUI_TEXTURE); - blit(xx, yy, 0, 28, 18, 18); + drawTexture(xx, yy, 0, 28, 18, 18); xx += 18; outputWidget.setZ(getZ() + 50); outputWidget.getBounds().setLocation(xx, yy); diff --git a/src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java b/src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java index 0a7896346..7e2e86ee1 100644 --- a/src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java +++ b/src/main/java/me/shedaniel/rei/gui/toast/CopyRecipeIdentifierToast.java @@ -52,7 +52,7 @@ public class CopyRecipeIdentifierToast implements Toast { public Visibility draw(ToastManager toastManager, long var2) { toastManager.getGame().getTextureManager().bindTexture(TOASTS_TEX); RenderSystem.color3f(1.0F, 1.0F, 1.0F); - toastManager.blit(0, 0, 0, 0, 160, 32); + toastManager.drawTexture(0, 0, 0, 0, 160, 32); if (this.subtitle == null) { toastManager.getGame().textRenderer.draw(this.title, 18.0F, 12.0F, 11141120); } else { diff --git a/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java index 9a835af9a..c16b071c8 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/ButtonWidget.java @@ -132,19 +132,19 @@ public abstract class ButtonWidget extends WidgetWithBounds { RenderSystem.blendFuncSeparate(770, 771, 1, 0); RenderSystem.blendFunc(770, 771); //Four Corners - blit(x, y, getZOffset(), 0, textureOffset * 80, 4, 4, 512, 256); - blit(x + width - 4, y, getZOffset(), 252, textureOffset * 80, 4, 4, 512, 256); - blit(x, y + height - 4, getZOffset(), 0, textureOffset * 80 + 76, 4, 4, 512, 256); - blit(x + width - 4, y + height - 4, getZOffset(), 252, textureOffset * 80 + 76, 4, 4, 512, 256); + drawTexture(x, y, getZOffset(), 0, textureOffset * 80, 4, 4, 512, 256); + drawTexture(x + width - 4, y, getZOffset(), 252, textureOffset * 80, 4, 4, 512, 256); + drawTexture(x, y + height - 4, getZOffset(), 0, textureOffset * 80 + 76, 4, 4, 512, 256); + drawTexture(x + width - 4, y + height - 4, getZOffset(), 252, textureOffset * 80 + 76, 4, 4, 512, 256); //Sides - blit(x + 4, y, getZOffset(), 4, textureOffset * 80, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); - blit(x + 4, y + height - 4, getZOffset(), 4, textureOffset * 80 + 76, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); - blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y + height - 4, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80 + 76, MathHelper.floor((width - 8) / 2f), 4, 512, 256); - blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80, MathHelper.floor((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4, y, getZOffset(), 4, textureOffset * 80, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4, y + height - 4, getZOffset(), 4, textureOffset * 80 + 76, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4 + MathHelper.ceil((width - 8) / 2f), y + height - 4, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80 + 76, MathHelper.floor((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4 + MathHelper.ceil((width - 8) / 2f), y, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80, MathHelper.floor((width - 8) / 2f), 4, 512, 256); for (int i = y + 4; i < y + height - 4; i += 76) { - blit(x, i, getZOffset(), 0, 4 + textureOffset * 80, MathHelper.ceil(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); - blit(x + MathHelper.ceil(width / 2f), i, getZOffset(), 256 - MathHelper.floor(width / 2f), 4 + textureOffset * 80, MathHelper.floor(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); + drawTexture(x, i, getZOffset(), 0, 4 + textureOffset * 80, MathHelper.ceil(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); + drawTexture(x + MathHelper.ceil(width / 2f), i, getZOffset(), 256 - MathHelper.floor(width / 2f), 4 + textureOffset * 80, MathHelper.floor(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); } } diff --git a/src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java index 637a188cc..d6f3f7cb9 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/EntryWidget.java @@ -295,7 +295,7 @@ public class EntryWidget extends Slot { protected void drawBackground(int mouseX, int mouseY, float delta) { if (background) { minecraft.getTextureManager().bindTexture(REIHelper.getInstance().isDarkThemeEnabled() ? RECIPE_GUI_DARK : RECIPE_GUI); - blit(bounds.x, bounds.y, 0, 222, bounds.width, bounds.height); + drawTexture(bounds.x, bounds.y, 0, 222, bounds.width, bounds.height); } } diff --git a/src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java index e73b8aa8b..393ca7739 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/PanelWidget.java @@ -101,21 +101,21 @@ public class PanelWidget extends WidgetWithBounds { int yTextureOffset = getYTextureOffset(); //Four Corners - this.blit(x, y, 106 + xTextureOffset, 124 + yTextureOffset, 4, 4); - this.blit(x + width - 4, y, 252 + xTextureOffset, 124 + yTextureOffset, 4, 4); - this.blit(x, y + height - 4, 106 + xTextureOffset, 186 + yTextureOffset, 4, 4); - this.blit(x + width - 4, y + height - 4, 252 + xTextureOffset, 186 + yTextureOffset, 4, 4); + this.drawTexture(x, y, 106 + xTextureOffset, 124 + yTextureOffset, 4, 4); + this.drawTexture(x + width - 4, y, 252 + xTextureOffset, 124 + yTextureOffset, 4, 4); + this.drawTexture(x, y + height - 4, 106 + xTextureOffset, 186 + yTextureOffset, 4, 4); + this.drawTexture(x + width - 4, y + height - 4, 252 + xTextureOffset, 186 + yTextureOffset, 4, 4); //Sides for (int xx = 4; xx < width - 4; xx += 128) { int thisWidth = Math.min(128, width - 4 - xx); - this.blit(x + xx, y, 110 + xTextureOffset, 124 + yTextureOffset, thisWidth, 4); - this.blit(x + xx, y + height - 4, 110 + xTextureOffset, 186 + yTextureOffset, thisWidth, 4); + this.drawTexture(x + xx, y, 110 + xTextureOffset, 124 + yTextureOffset, thisWidth, 4); + this.drawTexture(x + xx, y + height - 4, 110 + xTextureOffset, 186 + yTextureOffset, thisWidth, 4); } for (int yy = 4; yy < height - 4; yy += 50) { int thisHeight = Math.min(50, height - 4 - yy); - this.blit(x, y + yy, 106 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); - this.blit(x + width - 4, y + yy, 252 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); + this.drawTexture(x, y + yy, 106 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); + this.drawTexture(x + width - 4, y + yy, 252 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); } fillGradient(x + 4, y + 4, x + width - 4, y + height - 4, getInnerColor(), getInnerColor()); } diff --git a/src/main/java/me/shedaniel/rei/gui/widget/RecipeArrowWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/RecipeArrowWidget.java index 057eba64b..e7c7cc0eb 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/RecipeArrowWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/RecipeArrowWidget.java @@ -71,10 +71,10 @@ public class RecipeArrowWidget extends WidgetWithBounds { @Override public void render(int mouseX, int mouseY, float delta) { MinecraftClient.getInstance().getTextureManager().bindTexture(DefaultPlugin.getDisplayTexture()); - blit(x, y, 106, 91, 24, 17); + drawTexture(x, y, 106, 91, 24, 17); if (animated) { int width = MathHelper.ceil((System.currentTimeMillis() / (time / 24) % 24d) / 1f); - blit(x, y, 82, 91, width, 17); + drawTexture(x, y, 82, 91, width, 17); } } diff --git a/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java b/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java index cef638b1a..6ff021538 100644 --- a/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java +++ b/src/main/java/me/shedaniel/rei/gui/widget/TabWidget.java @@ -107,7 +107,7 @@ public class TabWidget extends WidgetWithBounds { public void render(int mouseX, int mouseY, float delta) { if (shown) { minecraft.getTextureManager().bindTexture(REIHelper.getInstance().isDarkThemeEnabled() ? CHEST_GUI_TEXTURE_DARK : CHEST_GUI_TEXTURE); - this.blit(bounds.x, bounds.y + 2, u + (selected ? bounds.width : 0), v, bounds.width, (selected ? bounds.height + 2 : bounds.height - 1)); + this.drawTexture(bounds.x, bounds.y + 2, u + (selected ? bounds.width : 0), v, bounds.width, (selected ? bounds.height + 2 : bounds.height - 1)); logo.setZ(100); logo.render(new Rectangle(bounds.getCenterX() - 8, bounds.getCenterY() - 5, 16, 16), mouseX, mouseY, delta); if (containsMouse(mouseX, mouseY)) { diff --git a/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java b/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java index efedb7a35..1c3fbb6b3 100644 --- a/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java +++ b/src/main/java/me/shedaniel/rei/impl/ClientHelperImpl.java @@ -49,11 +49,11 @@ import net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; +import net.minecraft.network.PacketByteBuf; import net.minecraft.text.TranslatableText; import net.minecraft.util.Formatting; import net.minecraft.util.Identifier; import net.minecraft.util.Lazy; -import net.minecraft.util.PacketByteBuf; import net.minecraft.util.registry.Registry; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java b/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java index d51369219..a3cecb3d1 100644 --- a/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java +++ b/src/main/java/me/shedaniel/rei/impl/ConfigObjectImpl.java @@ -32,6 +32,10 @@ import me.shedaniel.clothconfig2.api.ModifierKeyCode; import me.shedaniel.rei.api.ConfigObject; import me.shedaniel.rei.api.EntryStack; import me.shedaniel.rei.gui.config.*; +import me.shedaniel.rei.impl.ConfigObjectImpl.DontApplyFieldName; +import me.shedaniel.rei.impl.ConfigObjectImpl.UseEnumSelectorInstead; +import me.shedaniel.rei.impl.ConfigObjectImpl.UseFilteringScreen; +import me.shedaniel.rei.impl.ConfigObjectImpl.UseSpecialRecipeTypeScreen; import net.minecraft.client.util.InputUtil; import org.jetbrains.annotations.ApiStatus; @@ -179,13 +183,6 @@ public class ConfigObjectImpl implements ConfigObject, ConfigData { } @Override - @ApiStatus.ScheduledForRemoval - @Deprecated - public boolean isUsingLightGrayRecipeBorder() { - return appearance.recipeBorder == RecipeBorderType.LIGHTER; - } - - @Override public RecipeBorderType getRecipeBorderType() { return appearance.recipeBorder; } diff --git a/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java b/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java index c4db31c96..6e00f6724 100644 --- a/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java +++ b/src/main/java/me/shedaniel/rei/impl/EntryRegistryImpl.java @@ -33,8 +33,8 @@ import me.shedaniel.rei.api.EntryStack; import me.shedaniel.rei.api.RecipeHelper; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.util.DefaultedList; import net.minecraft.util.Pair; +import net.minecraft.util.collection.DefaultedList; import org.jetbrains.annotations.ApiStatus; import org.jetbrains.annotations.Nullable; @@ -126,7 +126,7 @@ public class EntryRegistryImpl implements EntryRegistry { public ItemStack[] getAllStacksFromItem(Item item) { List<ItemStack> list = appendStacksForItem(item); ItemStack[] array = list.toArray(new ItemStack[0]); - Arrays.sort(array, (a, b) -> ItemStack.areEqualIgnoreDamage(a, b) ? 0 : 1); + Arrays.sort(array, (a, b) -> ItemStack.areEqual(a, b) ? 0 : 1); return array; } diff --git a/src/main/java/me/shedaniel/rei/impl/widgets/ArrowWidget.java b/src/main/java/me/shedaniel/rei/impl/widgets/ArrowWidget.java index afb8576e3..0404bce40 100644 --- a/src/main/java/me/shedaniel/rei/impl/widgets/ArrowWidget.java +++ b/src/main/java/me/shedaniel/rei/impl/widgets/ArrowWidget.java @@ -65,10 +65,10 @@ public final class ArrowWidget extends Arrow { @Override public void render(int mouseX, int mouseY, float delta) { MinecraftClient.getInstance().getTextureManager().bindTexture(DefaultPlugin.getDisplayTexture()); - blit(getX(), getY(), 106, 91, 24, 17); + drawTexture(getX(), getY(), 106, 91, 24, 17); if (getAnimationDuration() > 0) { int width = MathHelper.ceil((System.currentTimeMillis() / (animationDuration / 24) % 24d) / 1f); - blit(getX(), getY(), 82, 91, width, 17); + drawTexture(getX(), getY(), 82, 91, width, 17); } } diff --git a/src/main/java/me/shedaniel/rei/impl/widgets/BurningFireWidget.java b/src/main/java/me/shedaniel/rei/impl/widgets/BurningFireWidget.java index 238162a56..d7bdb93bb 100644 --- a/src/main/java/me/shedaniel/rei/impl/widgets/BurningFireWidget.java +++ b/src/main/java/me/shedaniel/rei/impl/widgets/BurningFireWidget.java @@ -65,10 +65,10 @@ public final class BurningFireWidget extends BurningFire { @Override public void render(int mouseX, int mouseY, float delta) { MinecraftClient.getInstance().getTextureManager().bindTexture(DefaultPlugin.getDisplayTexture()); - blit(getX(), getY(), 1, 74, 14, 14); + drawTexture(getX(), getY(), 1, 74, 14, 14); if (getAnimationDuration() > 0) { int height = 14 - MathHelper.ceil((System.currentTimeMillis() / (animationDuration / 14) % 14d) / 1f); - blit(getX(), getY() + 14 - height, 82, 77 + (14 - height), 14, height); + drawTexture(getX(), getY() + 14 - height, 82, 77 + (14 - height), 14, height); } } diff --git a/src/main/java/me/shedaniel/rei/impl/widgets/ButtonWidget.java b/src/main/java/me/shedaniel/rei/impl/widgets/ButtonWidget.java index 8979b52b0..db3cc7d8b 100644 --- a/src/main/java/me/shedaniel/rei/impl/widgets/ButtonWidget.java +++ b/src/main/java/me/shedaniel/rei/impl/widgets/ButtonWidget.java @@ -289,19 +289,19 @@ public class ButtonWidget extends Button { RenderSystem.blendFuncSeparate(770, 771, 1, 0); RenderSystem.blendFunc(770, 771); //Four Corners - blit(x, y, getZOffset(), 0, textureOffset * 80, 4, 4, 512, 256); - blit(x + width - 4, y, getZOffset(), 252, textureOffset * 80, 4, 4, 512, 256); - blit(x, y + height - 4, getZOffset(), 0, textureOffset * 80 + 76, 4, 4, 512, 256); - blit(x + width - 4, y + height - 4, getZOffset(), 252, textureOffset * 80 + 76, 4, 4, 512, 256); + drawTexture(x, y, getZOffset(), 0, textureOffset * 80, 4, 4, 512, 256); + drawTexture(x + width - 4, y, getZOffset(), 252, textureOffset * 80, 4, 4, 512, 256); + drawTexture(x, y + height - 4, getZOffset(), 0, textureOffset * 80 + 76, 4, 4, 512, 256); + drawTexture(x + width - 4, y + height - 4, getZOffset(), 252, textureOffset * 80 + 76, 4, 4, 512, 256); //Sides - blit(x + 4, y, getZOffset(), 4, textureOffset * 80, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); - blit(x + 4, y + height - 4, getZOffset(), 4, textureOffset * 80 + 76, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); - blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y + height - 4, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80 + 76, MathHelper.floor((width - 8) / 2f), 4, 512, 256); - blit(x + 4 + MathHelper.ceil((width - 8) / 2f), y, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80, MathHelper.floor((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4, y, getZOffset(), 4, textureOffset * 80, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4, y + height - 4, getZOffset(), 4, textureOffset * 80 + 76, MathHelper.ceil((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4 + MathHelper.ceil((width - 8) / 2f), y + height - 4, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80 + 76, MathHelper.floor((width - 8) / 2f), 4, 512, 256); + drawTexture(x + 4 + MathHelper.ceil((width - 8) / 2f), y, getZOffset(), 252 - MathHelper.floor((width - 8) / 2f), textureOffset * 80, MathHelper.floor((width - 8) / 2f), 4, 512, 256); for (int i = y + 4; i < y + height - 4; i += 76) { - blit(x, i, getZOffset(), 0, 4 + textureOffset * 80, MathHelper.ceil(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); - blit(x + MathHelper.ceil(width / 2f), i, getZOffset(), 256 - MathHelper.floor(width / 2f), 4 + textureOffset * 80, MathHelper.floor(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); + drawTexture(x, i, getZOffset(), 0, 4 + textureOffset * 80, MathHelper.ceil(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); + drawTexture(x + MathHelper.ceil(width / 2f), i, getZOffset(), 256 - MathHelper.floor(width / 2f), 4 + textureOffset * 80, MathHelper.floor(width / 2f), MathHelper.clamp(y + height - 4 - i, 0, 76), 512, 256); } } } diff --git a/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java b/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java index cb2047004..7599a0c0a 100644 --- a/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java +++ b/src/main/java/me/shedaniel/rei/impl/widgets/PanelWidget.java @@ -137,21 +137,21 @@ public final class PanelWidget extends Panel { int yTextureOffset = getYTextureOffset(); //Four Corners - this.blit(x, y, 106 + xTextureOffset, 124 + yTextureOffset, 4, 4); - this.blit(x + width - 4, y, 252 + xTextureOffset, 124 + yTextureOffset, 4, 4); - this.blit(x, y + height - 4, 106 + xTextureOffset, 186 + yTextureOffset, 4, 4); - this.blit(x + width - 4, y + height - 4, 252 + xTextureOffset, 186 + yTextureOffset, 4, 4); + this.drawTexture(x, y, 106 + xTextureOffset, 124 + yTextureOffset, 4, 4); + this.drawTexture(x + width - 4, y, 252 + xTextureOffset, 124 + yTextureOffset, 4, 4); + this.drawTexture(x, y + height - 4, 106 + xTextureOffset, 186 + yTextureOffset, 4, 4); + this.drawTexture(x + width - 4, y + height - 4, 252 + xTextureOffset, 186 + yTextureOffset, 4, 4); //Sides for (int xx = 4; xx < width - 4; xx += 128) { int thisWidth = Math.min(128, width - 4 - xx); - this.blit(x + xx, y, 110 + xTextureOffset, 124 + yTextureOffset, thisWidth, 4); - this.blit(x + xx, y + height - 4, 110 + xTextureOffset, 186 + yTextureOffset, thisWidth, 4); + this.drawTexture(x + xx, y, 110 + xTextureOffset, 124 + yTextureOffset, thisWidth, 4); + this.drawTexture(x + xx, y + height - 4, 110 + xTextureOffset, 186 + yTextureOffset, thisWidth, 4); } for (int yy = 4; yy < height - 4; yy += 50) { int thisHeight = Math.min(50, height - 4 - yy); - this.blit(x, y + yy, 106 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); - this.blit(x + width - 4, y + yy, 252 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); + this.drawTexture(x, y + yy, 106 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); + this.drawTexture(x + width - 4, y + yy, 252 + xTextureOffset, 128 + yTextureOffset, 4, thisHeight); } fillGradient(x + 4, y + 4, x + width - 4, y + height - 4, getInnerColor(), getInnerColor()); } diff --git a/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java b/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java index e9192ee5c..703e8dabc 100644 --- a/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java +++ b/src/main/java/me/shedaniel/rei/plugin/DefaultPlugin.java @@ -166,7 +166,7 @@ public class DefaultPlugin implements REIPluginV0 { @Override public void render(Rectangle bounds, int mouseX, int mouseY, float delta) { MinecraftClient.getInstance().getTextureManager().bindTexture(id); - innerBlit(bounds.x, bounds.getMaxX(), bounds.y, bounds.getMaxY(), getZOffset(), 0, 1, 0, 1); + drawTexturedQuad(bounds.x, bounds.getMaxX(), bounds.y, bounds.getMaxY(), getZOffset(), 0, 1, 0, 1); } @Override diff --git a/src/main/java/me/shedaniel/rei/plugin/autocrafting/DefaultCategoryHandler.java b/src/main/java/me/shedaniel/rei/plugin/autocrafting/DefaultCategoryHandler.java index 59b4da5c3..3ad14f1ef 100644 --- a/src/main/java/me/shedaniel/rei/plugin/autocrafting/DefaultCategoryHandler.java +++ b/src/main/java/me/shedaniel/rei/plugin/autocrafting/DefaultCategoryHandler.java @@ -40,10 +40,9 @@ import net.minecraft.client.gui.screen.ingame.HandledScreen; import net.minecraft.client.gui.screen.recipebook.RecipeBookProvider; import net.minecraft.client.resource.language.I18n; import net.minecraft.item.ItemStack; +import net.minecraft.network.PacketByteBuf; import net.minecraft.screen.ScreenHandler; -import net.minecraft.util.DefaultedList; -import net.minecraft.util.PacketByteBuf; - +import net.minecraft.util.collection.DefaultedList; import java.util.List; public class DefaultCategoryHandler implements AutoTransferHandler { diff --git a/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java b/src/main/java/me/shedaniel/rei/plugin/brewing/DefaultBrewingCategory.java index c758886e0..2c5590822 100644 --- a/src/main/java/me/shedaniel/re |
