diff options
Diffstat (limited to 'src/main/java/me/shedaniel/rei/impl')
7 files changed, 29 insertions, 32 deletions
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()); } |
