Fix Sieve Recipe bug on latest JEI update
This commit is contained in:
parent
18cae30b6d
commit
57ed695231
|
|
@ -134,7 +134,8 @@ dependencies {
|
||||||
implementation(fg.deobf("curse.maven:jade-324717:4986594"))
|
implementation(fg.deobf("curse.maven:jade-324717:4986594"))
|
||||||
// JEI OPTIONAL
|
// JEI OPTIONAL
|
||||||
compileOnly(fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}"))
|
compileOnly(fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}"))
|
||||||
implementation(fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}"))
|
compileOnly(fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}"))
|
||||||
|
runtimeOnly(fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}"))
|
||||||
// REI OPTIONAL
|
// REI OPTIONAL
|
||||||
compileOnly(fg.deobf("me.shedaniel:RoughlyEnoughItems-forge:${rei_version}"))
|
compileOnly(fg.deobf("me.shedaniel:RoughlyEnoughItems-forge:${rei_version}"))
|
||||||
compileOnly(fg.deobf("me.shedaniel.cloth:cloth-config-forge:${cloth_config_version}"))
|
compileOnly(fg.deobf("me.shedaniel.cloth:cloth-config-forge:${cloth_config_version}"))
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ mc_version=1.20.1
|
||||||
forge_version=47.3.10
|
forge_version=47.3.10
|
||||||
parchment_mappings=1.20.1-2023.06.26
|
parchment_mappings=1.20.1-2023.06.26
|
||||||
|
|
||||||
jei_version=15.10.0.36
|
jei_version=15.20.0.104
|
||||||
rei_version=12.0.684
|
rei_version=12.0.684
|
||||||
emi_version=1.1.10+1.20.1
|
emi_version=1.1.10+1.20.1
|
||||||
cloth_config_version=11.1.118
|
cloth_config_version=11.1.118
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.world.item.ItemStack;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import net.minecraft.world.level.ItemLike;
|
import net.minecraft.world.level.ItemLike;
|
||||||
import net.minecraft.world.level.storage.loot.providers.number.NumberProvider;
|
import net.minecraft.world.level.storage.loot.providers.number.NumberProvider;
|
||||||
import net.minecraftforge.common.util.Lazy;
|
|
||||||
import org.apache.commons.lang3.mutable.MutableInt;
|
import org.apache.commons.lang3.mutable.MutableInt;
|
||||||
import thedarkcolour.exdeorum.compat.XeiSieveRecipe;
|
import thedarkcolour.exdeorum.compat.XeiSieveRecipe;
|
||||||
import thedarkcolour.exdeorum.compat.XeiUtil;
|
import thedarkcolour.exdeorum.compat.XeiUtil;
|
||||||
|
|
@ -41,7 +40,7 @@ import thedarkcolour.exdeorum.data.TranslationKeys;
|
||||||
import thedarkcolour.exdeorum.material.DefaultMaterials;
|
import thedarkcolour.exdeorum.material.DefaultMaterials;
|
||||||
|
|
||||||
class SieveCategory implements IRecipeCategory<XeiSieveRecipe> {
|
class SieveCategory implements IRecipeCategory<XeiSieveRecipe> {
|
||||||
private final Lazy<IDrawable> background;
|
private final IDrawable background;
|
||||||
private final IDrawable slot;
|
private final IDrawable slot;
|
||||||
private final IDrawable row;
|
private final IDrawable row;
|
||||||
private final IDrawable icon;
|
private final IDrawable icon;
|
||||||
|
|
@ -50,7 +49,7 @@ class SieveCategory implements IRecipeCategory<XeiSieveRecipe> {
|
||||||
|
|
||||||
// Common constructor
|
// Common constructor
|
||||||
SieveCategory(IGuiHelper helper, ItemLike icon, Component title, MutableInt rows) {
|
SieveCategory(IGuiHelper helper, ItemLike icon, Component title, MutableInt rows) {
|
||||||
this.background = Lazy.of(() -> helper.createBlankDrawable(XeiUtil.SIEVE_WIDTH, XeiUtil.SIEVE_ROW_START + XeiUtil.SIEVE_ROW_HEIGHT * rows.intValue()));
|
this.background = new Background();
|
||||||
this.slot = helper.getSlotDrawable();
|
this.slot = helper.getSlotDrawable();
|
||||||
this.row = helper.createDrawable(ExDeorumJeiPlugin.EX_DEORUM_JEI_TEXTURE, 0, 0, 162, 18);
|
this.row = helper.createDrawable(ExDeorumJeiPlugin.EX_DEORUM_JEI_TEXTURE, 0, 0, 162, 18);
|
||||||
this.icon = helper.createDrawableItemStack(new ItemStack(icon));
|
this.icon = helper.createDrawableItemStack(new ItemStack(icon));
|
||||||
|
|
@ -75,7 +74,7 @@ class SieveCategory implements IRecipeCategory<XeiSieveRecipe> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IDrawable getBackground() {
|
public IDrawable getBackground() {
|
||||||
return this.background.get();
|
return this.background;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -117,4 +116,20 @@ class SieveCategory implements IRecipeCategory<XeiSieveRecipe> {
|
||||||
this.row.draw(graphics, 0, 28 + i * 18);
|
this.row.draw(graphics, 0, 28 + i * 18);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class Background implements IDrawable {
|
||||||
|
@Override
|
||||||
|
public int getWidth() {
|
||||||
|
return XeiUtil.SIEVE_WIDTH;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getHeight() {
|
||||||
|
return XeiUtil.SIEVE_ROW_START + XeiUtil.SIEVE_ROW_HEIGHT * SieveCategory.this.rows.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(GuiGraphics guiGraphics, int i, int i1) {
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user