mirror of
https://github.com/AlmostReliable/almostunified.git
synced 2024-11-14 19:25:13 -05:00
1.20.1 port
This commit is contained in:
parent
e2edbac4b0
commit
475e5f7605
9 changed files with 25 additions and 115 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -4,12 +4,12 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- '1.19.4'
|
- '1.20.1'
|
||||||
tags-ignore:
|
tags-ignore:
|
||||||
- '**'
|
- '**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- '1.19.4'
|
- '1.20.1'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
JAVA_DIST: 'zulu'
|
JAVA_DIST: 'zulu'
|
||||||
|
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -4,7 +4,7 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v1.19.4-*.*.*'
|
- 'v1.20.1-*.*.*'
|
||||||
|
|
||||||
env:
|
env:
|
||||||
JAVA_DIST: 'zulu'
|
JAVA_DIST: 'zulu'
|
||||||
|
|
92
CHANGELOG.md
92
CHANGELOG.md
|
@ -7,99 +7,11 @@ and this project adheres to [Semantic Versioning].
|
||||||
|
|
||||||
## [0.5.0] - 2023-06-14
|
## [0.5.0] - 2023-06-14
|
||||||
|
|
||||||
### Added
|
Initial 1.20.1 release!
|
||||||
- repair unification for `TieredItems` (tools) and `ArmorItems` ([#53])
|
|
||||||
- supports vanilla Anvil
|
|
||||||
- works for all mods as long as they properly call the super method
|
|
||||||
- simplified Chinese translation ([#49])
|
|
||||||
- shaped recipe type from Cucumber lib for Fabric to ignored types ([#52])
|
|
||||||
|
|
||||||
<!-- Links -->
|
|
||||||
[#49]: https://github.com/AlmostReliable/almostunified/issues/49
|
|
||||||
[#52]: https://github.com/AlmostReliable/almostunified/pull/52
|
|
||||||
[#53]: https://github.com/AlmostReliable/almostunified/issues/53
|
|
||||||
|
|
||||||
## [0.4.4] - 2023-05-04
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- support for Ars Nouveau add-ons
|
|
||||||
- Ars Creo
|
|
||||||
- Ars Elemental
|
|
||||||
- Ars Scalaes
|
|
||||||
- support for the vanilla Smithing Table and smithing-like recipes
|
|
||||||
- Russian translation ([#47])
|
|
||||||
|
|
||||||
<!-- Links -->
|
|
||||||
[#47]: https://github.com/AlmostReliable/almostunified/pull/47
|
|
||||||
|
|
||||||
## [0.4.3] - 2023-04-22
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- support for Ars Nouveau ([#44], [#45])
|
|
||||||
|
|
||||||
<!-- Links -->
|
|
||||||
[#44]: https://github.com/AlmostReliable/almostunified/pull/44
|
|
||||||
[#45]: https://github.com/AlmostReliable/almostunified/issues/45
|
|
||||||
|
|
||||||
## [0.4.2] - 2023-04-22
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- tag ownerships not being in sync on some recipes
|
|
||||||
- automatic item hiding not working with all ownership tags
|
|
||||||
- Immersive Engineering catalysts not being unified
|
|
||||||
- Immersive Engineering secondary outputs not being unified
|
|
||||||
|
|
||||||
## [0.4.1] - 2023-04-19
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- crash due to unloaded ownership tags on dedicated servers
|
|
||||||
|
|
||||||
## [0.4.0] - 2023-04-18
|
|
||||||
|
|
||||||
### WARNING
|
|
||||||
This update features a new config option inside the `unify.json` called `tagOwnerships`.<br>
|
|
||||||
Since it's a top-level option, this won't reset your config and all other options should be preserved. However,
|
|
||||||
an automatic backup will be created in case something goes wrong.
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- tag ownerships
|
|
||||||
- a new milestone feature allowing tags to be converted to other tags
|
|
||||||
- this allows unifying inconsistent tags like `forge:coals` and `forge:gems/coal`
|
|
||||||
- you can read more about it in the [wiki][tag-ownerships]
|
|
||||||
|
|
||||||
### Changed
|
|
||||||
- improved stone strata lookup speed
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- some Mekanism recipes not being unified
|
|
||||||
- log spam on multiple preferred tags
|
|
||||||
- JEI indicator not showing anymore with new JEI versions
|
|
||||||
|
|
||||||
<!-- Links -->
|
|
||||||
[tag-ownerships]: https://github.com/AlmostReliable/almostunified/wiki/Unification-Config#tag-ownerships
|
|
||||||
|
|
||||||
## [0.3.8] - 2023-04-06
|
|
||||||
|
|
||||||
### Added
|
|
||||||
- JEI support since it was updated to 1.19.4
|
|
||||||
|
|
||||||
### Fixed
|
|
||||||
- stone strata fallback variant for clean stone
|
|
||||||
|
|
||||||
## [0.3.7] - 2023-04-02
|
|
||||||
|
|
||||||
Initial 1.19.4 release!
|
|
||||||
|
|
||||||
<!-- Links -->
|
<!-- Links -->
|
||||||
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
|
[keep a changelog]: https://keepachangelog.com/en/1.0.0/
|
||||||
[semantic versioning]: https://semver.org/spec/v2.0.0.html
|
[semantic versioning]: https://semver.org/spec/v2.0.0.html
|
||||||
|
|
||||||
<!-- Versions -->
|
<!-- Versions -->
|
||||||
[0.5.0]: https://github.com/AlmostReliable/almostunified/releases/tag/v1.19.3-0.5.0-beta
|
[0.5.0]: https://github.com/AlmostReliable/almostunified/releases/tag/v1.20.1-0.5.0-beta
|
||||||
[0.4.4]: https://github.com/AlmostReliable/almostunified/releases/tag/v1.19.4-0.4.4-beta
|
|
||||||
[0.4.3]: https://github.com/AlmostReliable/almostunified/releases/tag/v1.19.4-0.4.3-beta
|
|
||||||
[0.4.2]: https://github.com/AlmostReliable/almostunified/releases/tag/v1.19.4-0.4.2-beta
|
|
||||||
[0.4.1]: https://github.com/AlmostReliable/almostunified/releases/tag/v1.19.4-0.4.1-beta
|
|
||||||
[0.4.0]: https://github.com/AlmostReliable/almostunified/releases/tag/v1.19.4-0.4.0-beta
|
|
||||||
[0.3.8]: https://github.com/AlmostReliable/almostunified/releases/tag/v1.19.4-0.3.8-beta
|
|
||||||
[0.3.7]: https://github.com/AlmostReliable/almostunified/releases/tag/v1.19.4-0.3.7-beta
|
|
||||||
|
|
|
@ -13,6 +13,7 @@ import mezz.jei.api.JeiPlugin;
|
||||||
import mezz.jei.api.constants.VanillaTypes;
|
import mezz.jei.api.constants.VanillaTypes;
|
||||||
import mezz.jei.api.recipe.category.IRecipeCategory;
|
import mezz.jei.api.recipe.category.IRecipeCategory;
|
||||||
import mezz.jei.api.runtime.IJeiRuntime;
|
import mezz.jei.api.runtime.IJeiRuntime;
|
||||||
|
import net.minecraft.client.gui.GuiGraphics;
|
||||||
import net.minecraft.client.renderer.Rect2i;
|
import net.minecraft.client.renderer.Rect2i;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
@ -44,7 +45,7 @@ public class AlmostJEI implements IModPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <R> void handleIndicator(PoseStack stack, int mX, int mY, int posX, int posY, IRecipeCategory<R> recipeCategory, R recipe) {
|
public static <R> void handleIndicator(GuiGraphics guiGraphics, PoseStack stack, int mX, int mY, int posX, int posY, IRecipeCategory<R> recipeCategory, R recipe) {
|
||||||
var recipeId = recipeCategory.getRegistryName(recipe);
|
var recipeId = recipeCategory.getRegistryName(recipe);
|
||||||
if (recipeId == null) return;
|
if (recipeId == null) return;
|
||||||
|
|
||||||
|
@ -53,10 +54,10 @@ public class AlmostJEI implements IModPlugin {
|
||||||
if (link == null) return;
|
if (link == null) return;
|
||||||
|
|
||||||
var area = new Rect2i(posX, posY, RecipeIndicator.RENDER_SIZE, RecipeIndicator.RENDER_SIZE);
|
var area = new Rect2i(posX, posY, RecipeIndicator.RENDER_SIZE, RecipeIndicator.RENDER_SIZE);
|
||||||
RecipeIndicator.renderIndicator(stack, area);
|
RecipeIndicator.renderIndicator(guiGraphics, stack, area);
|
||||||
if (mX >= area.getX() && mX <= area.getX() + area.getWidth() &&
|
if (mX >= area.getX() && mX <= area.getX() + area.getWidth() &&
|
||||||
mY >= area.getY() && mY <= area.getY() + area.getHeight()) {
|
mY >= area.getY() && mY <= area.getY() + area.getHeight()) {
|
||||||
Utils.renderTooltip(stack, mX, mY, RecipeIndicator.constructTooltip(link));
|
Utils.renderTooltip(guiGraphics, mX, mY, RecipeIndicator.constructTooltip(link));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -101,8 +101,8 @@ public class AlmostREI implements REIClientPlugin {
|
||||||
public List<Widget> setupDisplay(Display display, Rectangle bounds) {
|
public List<Widget> setupDisplay(Display display, Rectangle bounds) {
|
||||||
var widgets = lastView.setupDisplay(display, bounds);
|
var widgets = lastView.setupDisplay(display, bounds);
|
||||||
var area = calculateArea(bounds);
|
var area = calculateArea(bounds);
|
||||||
widgets.add(Widgets.createDrawableWidget((helper, stack, mX, mY, delta) ->
|
widgets.add(Widgets.createDrawableWidget((guiGraphics, mX, mY, delta) ->
|
||||||
RecipeIndicator.renderIndicator(stack, area)));
|
RecipeIndicator.renderIndicator(guiGraphics, guiGraphics.pose(), area)));
|
||||||
var tooltipArea = new Rectangle(area.getX(), area.getY(), area.getWidth(), area.getHeight());
|
var tooltipArea = new Rectangle(area.getX(), area.getY(), area.getWidth(), area.getHeight());
|
||||||
widgets.add(Widgets.createTooltip(tooltipArea, RecipeIndicator.constructTooltip(link)));
|
widgets.add(Widgets.createTooltip(tooltipArea, RecipeIndicator.constructTooltip(link)));
|
||||||
return widgets;
|
return widgets;
|
||||||
|
|
|
@ -2,11 +2,9 @@ package com.almostreliable.unified.compat;
|
||||||
|
|
||||||
import com.almostreliable.unified.recipe.ClientRecipeTracker.ClientRecipeLink;
|
import com.almostreliable.unified.recipe.ClientRecipeTracker.ClientRecipeLink;
|
||||||
import com.almostreliable.unified.utils.Utils;
|
import com.almostreliable.unified.utils.Utils;
|
||||||
import com.mojang.blaze3d.systems.RenderSystem;
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import net.minecraft.ChatFormatting;
|
import net.minecraft.ChatFormatting;
|
||||||
import net.minecraft.client.gui.GuiComponent;
|
import net.minecraft.client.gui.GuiGraphics;
|
||||||
import net.minecraft.client.renderer.GameRenderer;
|
|
||||||
import net.minecraft.client.renderer.Rect2i;
|
import net.minecraft.client.renderer.Rect2i;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
@ -42,14 +40,12 @@ public final class RecipeIndicator {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void renderIndicator(PoseStack poseStack, Rect2i area) {
|
static void renderIndicator(GuiGraphics guiGraphics, PoseStack poseStack, Rect2i area) {
|
||||||
poseStack.pushPose();
|
poseStack.pushPose();
|
||||||
poseStack.translate(area.getX(), area.getY(), 0);
|
poseStack.translate(area.getX(), area.getY(), 0);
|
||||||
var scale = area.getWidth() / (float) TEXTURE_SIZE;
|
var scale = area.getWidth() / (float) TEXTURE_SIZE;
|
||||||
poseStack.scale(scale, scale, scale);
|
poseStack.scale(scale, scale, scale);
|
||||||
RenderSystem.setShader(GameRenderer::getPositionTexShader);
|
guiGraphics.blit(TEXTURE, 0, 0, 0, 0, TEXTURE_SIZE, TEXTURE_SIZE, TEXTURE_SIZE, TEXTURE_SIZE);
|
||||||
RenderSystem.setShaderTexture(0, TEXTURE);
|
|
||||||
GuiComponent.blit(poseStack, 0, 0, 0, 0, TEXTURE_SIZE, TEXTURE_SIZE, TEXTURE_SIZE, TEXTURE_SIZE);
|
|
||||||
poseStack.popPose();
|
poseStack.popPose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import mezz.jei.api.gui.drawable.IDrawable;
|
import mezz.jei.api.gui.drawable.IDrawable;
|
||||||
import mezz.jei.api.recipe.category.IRecipeCategory;
|
import mezz.jei.api.recipe.category.IRecipeCategory;
|
||||||
import mezz.jei.library.gui.recipes.RecipeLayout;
|
import mezz.jei.library.gui.recipes.RecipeLayout;
|
||||||
|
import net.minecraft.client.gui.GuiGraphics;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
@ -23,9 +24,9 @@ public abstract class JeiRecipeLayoutMixin<R> {
|
||||||
private R recipe;
|
private R recipe;
|
||||||
|
|
||||||
@Inject(method = "drawRecipe", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;pushPose()V", ordinal = 1), locals = LocalCapture.CAPTURE_FAILHARD)
|
@Inject(method = "drawRecipe", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;pushPose()V", ordinal = 1), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||||
private void unified$catchLayoutInfo(PoseStack stack, int mouseX, int mouseY, CallbackInfo ci, IDrawable background, int mX, int mY, int x, int y) {
|
private void unified$catchLayoutInfo(GuiGraphics guiGraphics, int mouseX, int mouseY, CallbackInfo ci, IDrawable background, int mX, int mY, PoseStack poseStack, int x, int y) {
|
||||||
var posX = x - RecipeIndicator.RENDER_SIZE;
|
var posX = x - RecipeIndicator.RENDER_SIZE;
|
||||||
var posY = y - RecipeIndicator.RENDER_SIZE;
|
var posY = y - RecipeIndicator.RENDER_SIZE;
|
||||||
AlmostJEI.handleIndicator(stack, mX, mY, posX, posY, recipeCategory, recipe);
|
AlmostJEI.handleIndicator(guiGraphics, poseStack, mX, mY, posX, posY, recipeCategory, recipe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package com.almostreliable.unified.utils;
|
package com.almostreliable.unified.utils;
|
||||||
|
|
||||||
import com.almostreliable.unified.BuildConfig;
|
import com.almostreliable.unified.BuildConfig;
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.GuiGraphics;
|
||||||
import net.minecraft.client.gui.components.ComponentRenderUtils;
|
import net.minecraft.client.gui.components.ComponentRenderUtils;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
@ -45,7 +45,7 @@ public final class Utils {
|
||||||
return BuildConfig.MOD_ID + "." + path;
|
return BuildConfig.MOD_ID + "." + path;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void renderTooltip(PoseStack stack, int mX, int mY, List<Component> tooltip) {
|
public static void renderTooltip(GuiGraphics guiGraphics, int mX, int mY, List<Component> tooltip) {
|
||||||
var mc = Minecraft.getInstance();
|
var mc = Minecraft.getInstance();
|
||||||
var screen = mc.screen;
|
var screen = mc.screen;
|
||||||
if (screen == null) return;
|
if (screen == null) return;
|
||||||
|
@ -54,6 +54,6 @@ public final class Utils {
|
||||||
for (Component line : tooltip) {
|
for (Component line : tooltip) {
|
||||||
formattedTooltip.addAll(ComponentRenderUtils.wrapComponents(line, 300, mc.font));
|
formattedTooltip.addAll(ComponentRenderUtils.wrapComponents(line, 300, mc.font));
|
||||||
}
|
}
|
||||||
screen.renderTooltip(stack, formattedTooltip, mX, mY);
|
guiGraphics.renderTooltip(mc.font, formattedTooltip, mX, mY);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ extraModsDirectory = extra-mods
|
||||||
junitVersion = 5.9.0
|
junitVersion = 5.9.0
|
||||||
|
|
||||||
# Minecraft
|
# Minecraft
|
||||||
minecraftVersion = 1.19.4
|
minecraftVersion = 1.20.1
|
||||||
|
|
||||||
# Mod
|
# Mod
|
||||||
modVersion = 0.5.0
|
modVersion = 0.5.0
|
||||||
|
@ -23,16 +23,16 @@ autoServiceVersion = 1.1.0
|
||||||
parchmentVersion = 2023.03.12
|
parchmentVersion = 2023.03.12
|
||||||
|
|
||||||
# Mod Dependencies
|
# Mod Dependencies
|
||||||
reiVersion = 11.0.597
|
reiVersion = 12.0.625
|
||||||
jeiVersion = 13.1.0.3
|
jeiVersion = 15.0.0.12
|
||||||
|
|
||||||
# Fabric Dependencies
|
# Fabric Dependencies
|
||||||
fabricLoaderVersion = 0.14.21
|
fabricLoaderVersion = 0.14.21
|
||||||
fabricApiVersion = 0.83.0
|
fabricApiVersion = 0.83.1
|
||||||
fabricRecipeViewer = rei
|
fabricRecipeViewer = rei
|
||||||
|
|
||||||
# Forge Dependencies
|
# Forge Dependencies
|
||||||
forgeVersion = 45.1.0
|
forgeVersion = 47.0.1
|
||||||
forgeRecipeViewer = jei
|
forgeRecipeViewer = jei
|
||||||
|
|
||||||
# Github
|
# Github
|
||||||
|
|
Loading…
Reference in a new issue