1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

Fixed Minecraft recipes not showing correctly

This commit is contained in:
TheBusyBiscuit 2020-01-31 00:33:05 +01:00
parent 59abc2f2e2
commit 704d3f47fa
4 changed files with 13 additions and 5 deletions

View File

@ -62,6 +62,7 @@
* Fixed #1396
* Fixed Backpacks being placeable
* Fixed wrong file encoding for translations
* Fixed Minecraft recipes not showing correctly
## Release Candidate 4 (06 Jan 2020)
https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/stable/#4

View File

@ -371,15 +371,21 @@ public class ChestSlimefunGuide implements ISlimefunGuide {
RecipeChoice[] choices = SlimefunPlugin.getMinecraftRecipes().getRecipeInput(recipe);
if (choices[0] instanceof MaterialChoice && ((MaterialChoice) choices[0]).getChoices().size() > 1) {
if (choices[0] instanceof MaterialChoice) {
recipeItems[4] = new ItemStack(((MaterialChoice) choices[0]).getChoices().get(0));
task.add(RECIPE_SLOTS[4], (MaterialChoice) choices[0]);
if (((MaterialChoice) choices[0]).getChoices().size() > 1) {
task.add(RECIPE_SLOTS[4], (MaterialChoice) choices[0]);
}
}
else {
for (int i = 0; i < choices.length; i++) {
if (choices[i] instanceof MaterialChoice && ((MaterialChoice) choices[i]).getChoices().size() > 1) {
if (choices[i] instanceof MaterialChoice) {
recipeItems[i] = new ItemStack(((MaterialChoice) choices[i]).getChoices().get(0));
task.add(RECIPE_SLOTS[i], (MaterialChoice) choices[i]);
if (((MaterialChoice) choices[i]).getChoices().size() > 1) {
task.add(RECIPE_SLOTS[i], (MaterialChoice) choices[i]);
}
}
}
}

View File

@ -266,7 +266,7 @@ public final class GuideSettings {
});
}
else if (i == 7) {
menu.addItem(7, new CustomItem(SkullItem.fromHash("3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716"), SlimefunPlugin.getLocal().getMessage(p, "guide.languages.translations.name"), "", "&7\u21E8 &eClick to add your own translations")
menu.addItem(7, new CustomItem(SkullItem.fromHash("3edd20be93520949e6ce789dc4f43efaeb28c717ee6bfcbbe02780142f716"), SlimefunPlugin.getLocal().getMessage(p, "guide.languages.translations.name"), "", "&7\u21E8 &e" + SlimefunPlugin.getLocal().getMessage(p, "guide.languages.translations.lore"))
, (pl, slot, item, action) -> {
ChatUtils.sendURL(pl, "https://github.com/TheBusyBiscuit/Slimefun4/wiki/Translating-Slimefun");
return false;

View File

@ -36,6 +36,7 @@ guide:
select-default: 'Click to select the default language'
translations:
name: '&aIs something missing?'
lore: 'Click to add your own translation'
title:
main: 'Slimefun Guide'