mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
Fixed custom recipe gui not displaying item on recipe.
also version bump (1.6.10)
This commit is contained in:
parent
73ec340e34
commit
f5d607212d
4 changed files with 15 additions and 11 deletions
|
|
@ -20,17 +20,16 @@ import java.util.Collection;
|
|||
public class CustomRecipeConfigGui extends MappedGuiListConfigGui<AnvilCustomRecipe,
|
||||
MappedGuiListConfigGui.LazyElement<CustomRecipeSubSettingGui>> {
|
||||
|
||||
|
||||
private static CustomRecipeConfigGui INSTANCE = new CustomRecipeConfigGui();
|
||||
|
||||
@Nullable
|
||||
public static CustomRecipeConfigGui getCurrentInstance(){
|
||||
public static CustomRecipeConfigGui getCurrentInstance() {
|
||||
return INSTANCE;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static CustomRecipeConfigGui getInstance(){
|
||||
if(INSTANCE == null) INSTANCE = new CustomRecipeConfigGui();
|
||||
public static CustomRecipeConfigGui getInstance() {
|
||||
if (INSTANCE == null) INSTANCE = new CustomRecipeConfigGui();
|
||||
|
||||
return INSTANCE;
|
||||
}
|
||||
|
|
@ -46,9 +45,9 @@ public class CustomRecipeConfigGui extends MappedGuiListConfigGui<AnvilCustomRec
|
|||
// Get base item to display
|
||||
ItemStack craftResultItem = recipe.getResultItem();
|
||||
ItemStack displayedItem;
|
||||
if(craftResultItem == null){
|
||||
if (craftResultItem == null) {
|
||||
displayedItem = new ItemStack(Material.BARRIER);
|
||||
}else{
|
||||
} else {
|
||||
displayedItem = craftResultItem.clone();
|
||||
}
|
||||
|
||||
|
|
@ -62,9 +61,9 @@ public class CustomRecipeConfigGui extends MappedGuiListConfigGui<AnvilCustomRec
|
|||
boolean shouldWork = recipe.validate();
|
||||
|
||||
meta.setLore(Arrays.asList(
|
||||
"§7Should work: §"+(shouldWork ? "aYes" : "cNo"),
|
||||
"§7Exact count: §"+(recipe.getExactCount() ? "aYes" : "cNo"),
|
||||
"§7Recipe Xp Cost: §e"+recipe.getXpCostPerCraft()
|
||||
"§7Should work: §" + (shouldWork ? "aYes" : "cNo"),
|
||||
"§7Exact count: §" + (recipe.getExactCount() ? "aYes" : "cNo"),
|
||||
"§7Recipe Xp Cost: §e" + recipe.getXpCostPerCraft()
|
||||
|
||||
));
|
||||
|
||||
|
|
|
|||
|
|
@ -107,6 +107,9 @@ public class CustomRecipeSubSettingGui extends MappedToListSubSettingGui {
|
|||
AnvilCustomRecipe.Companion.getDEFAULT_RESULT_ITEM_CONFIG(),
|
||||
"§7Set the result item of the custom craft",
|
||||
"§7\u25A1 + \u25A1 = \u25A0");
|
||||
|
||||
// Now we update the items
|
||||
updateLocal();
|
||||
}
|
||||
|
||||
private ConfirmActionGui createDeleteGui() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue