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
|
|
@ -15,7 +15,7 @@ plugins {
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "xyz.alexcrea"
|
group = "xyz.alexcrea"
|
||||||
version = "1.6.9"
|
version = "1.6.10"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
// EcoEnchants
|
// EcoEnchants
|
||||||
|
|
|
||||||
|
|
@ -4,3 +4,5 @@ kotlin.code.style=official
|
||||||
signing.gnupg.executable=gpg
|
signing.gnupg.executable=gpg
|
||||||
signing.gnupg.useLegacyGpg=true
|
signing.gnupg.useLegacyGpg=true
|
||||||
signing.gnupg.keyName=B0DBF91F
|
signing.gnupg.keyName=B0DBF91F
|
||||||
|
|
||||||
|
kotlin.daemon.jvmargs=-Xmx8G
|
||||||
|
|
@ -20,17 +20,16 @@ import java.util.Collection;
|
||||||
public class CustomRecipeConfigGui extends MappedGuiListConfigGui<AnvilCustomRecipe,
|
public class CustomRecipeConfigGui extends MappedGuiListConfigGui<AnvilCustomRecipe,
|
||||||
MappedGuiListConfigGui.LazyElement<CustomRecipeSubSettingGui>> {
|
MappedGuiListConfigGui.LazyElement<CustomRecipeSubSettingGui>> {
|
||||||
|
|
||||||
|
|
||||||
private static CustomRecipeConfigGui INSTANCE = new CustomRecipeConfigGui();
|
private static CustomRecipeConfigGui INSTANCE = new CustomRecipeConfigGui();
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static CustomRecipeConfigGui getCurrentInstance(){
|
public static CustomRecipeConfigGui getCurrentInstance() {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
public static CustomRecipeConfigGui getInstance(){
|
public static CustomRecipeConfigGui getInstance() {
|
||||||
if(INSTANCE == null) INSTANCE = new CustomRecipeConfigGui();
|
if (INSTANCE == null) INSTANCE = new CustomRecipeConfigGui();
|
||||||
|
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
@ -46,9 +45,9 @@ public class CustomRecipeConfigGui extends MappedGuiListConfigGui<AnvilCustomRec
|
||||||
// Get base item to display
|
// Get base item to display
|
||||||
ItemStack craftResultItem = recipe.getResultItem();
|
ItemStack craftResultItem = recipe.getResultItem();
|
||||||
ItemStack displayedItem;
|
ItemStack displayedItem;
|
||||||
if(craftResultItem == null){
|
if (craftResultItem == null) {
|
||||||
displayedItem = new ItemStack(Material.BARRIER);
|
displayedItem = new ItemStack(Material.BARRIER);
|
||||||
}else{
|
} else {
|
||||||
displayedItem = craftResultItem.clone();
|
displayedItem = craftResultItem.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -62,9 +61,9 @@ public class CustomRecipeConfigGui extends MappedGuiListConfigGui<AnvilCustomRec
|
||||||
boolean shouldWork = recipe.validate();
|
boolean shouldWork = recipe.validate();
|
||||||
|
|
||||||
meta.setLore(Arrays.asList(
|
meta.setLore(Arrays.asList(
|
||||||
"§7Should work: §"+(shouldWork ? "aYes" : "cNo"),
|
"§7Should work: §" + (shouldWork ? "aYes" : "cNo"),
|
||||||
"§7Exact count: §"+(recipe.getExactCount() ? "aYes" : "cNo"),
|
"§7Exact count: §" + (recipe.getExactCount() ? "aYes" : "cNo"),
|
||||||
"§7Recipe Xp Cost: §e"+recipe.getXpCostPerCraft()
|
"§7Recipe Xp Cost: §e" + recipe.getXpCostPerCraft()
|
||||||
|
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,9 @@ public class CustomRecipeSubSettingGui extends MappedToListSubSettingGui {
|
||||||
AnvilCustomRecipe.Companion.getDEFAULT_RESULT_ITEM_CONFIG(),
|
AnvilCustomRecipe.Companion.getDEFAULT_RESULT_ITEM_CONFIG(),
|
||||||
"§7Set the result item of the custom craft",
|
"§7Set the result item of the custom craft",
|
||||||
"§7\u25A1 + \u25A1 = \u25A0");
|
"§7\u25A1 + \u25A1 = \u25A0");
|
||||||
|
|
||||||
|
// Now we update the items
|
||||||
|
updateLocal();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ConfirmActionGui createDeleteGui() {
|
private ConfirmActionGui createDeleteGui() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue