fix gui logic issue

This commit is contained in:
alexcrea 2025-07-04 23:13:14 +02:00
parent 87ec40a7ab
commit 7f19783beb
Signed by: alexcrea
GPG key ID: E346CD16413450E3

View file

@ -36,7 +36,7 @@ public class CustomRecipeSubSettingGui extends MappedToListSubSettingGui {
public CustomRecipeSubSettingGui( public CustomRecipeSubSettingGui(
@NotNull CustomRecipeConfigGui parent, @NotNull CustomRecipeConfigGui parent,
@NotNull AnvilCustomRecipe anvilRecipe) { @NotNull AnvilCustomRecipe anvilRecipe) {
super(3, "§e" + CasedStringUtil.snakeToUpperSpacedCase(anvilRecipe.toString()) + " §8Config"); super(4, "§e" + CasedStringUtil.snakeToUpperSpacedCase(anvilRecipe.toString()) + " §8Config");
this.parent = parent; this.parent = parent;
this.anvilRecipe = anvilRecipe; this.anvilRecipe = anvilRecipe;
@ -46,7 +46,7 @@ public class CustomRecipeSubSettingGui extends MappedToListSubSettingGui {
"0ab000000", "0ab000000",
"B00000000" "B00000000"
); );
this.pane = new PatternPane(0, 0, 9, 3, pattern); this.pane = new PatternPane(0, 0, 9, 4, pattern);
addPane(this.pane); addPane(this.pane);
prepareStaticValues(); prepareStaticValues();
@ -183,7 +183,7 @@ public class CustomRecipeSubSettingGui extends MappedToListSubSettingGui {
GuiItem exactCountItem = this.exactCountFactory.getItem(); GuiItem exactCountItem = this.exactCountFactory.getItem();
this.pane.bindItem('1', exactCountItem); this.pane.bindItem('1', exactCountItem);
if (anvilRecipe.getXpCostPerCraft() != 0) { if (anvilRecipe.getXpCostPerCraft() == 0) {
this.pane.bindItem('a', noRemoveExactLinearXp); this.pane.bindItem('a', noRemoveExactLinearXp);
} else { } else {
this.pane.bindItem('a', removeExactLinearXpFactory.getItem()); this.pane.bindItem('a', removeExactLinearXpFactory.getItem());