diff options
author | Maximusbarcz <maxim.baranek@gmail.com> | 2023-01-16 18:34:34 +0100 |
---|---|---|
committer | Maximusbarcz <maxim.baranek@gmail.com> | 2023-01-16 18:34:34 +0100 |
commit | f7770f7e2b6d3029b207d8e574a9bb63b10a2651 (patch) | |
tree | 1204cf4b609666811955e3993522728fe408e4c6 /src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java | |
parent | 290ad0d1d979431fe8bfda966013a8de7b77a7fd (diff) | |
download | ygasi-f7770f7e2b6d3029b207d8e574a9bb63b10a2651.tar.gz ygasi-f7770f7e2b6d3029b207d8e574a9bb63b10a2651.tar.bz2 ygasi-f7770f7e2b6d3029b207d8e574a9bb63b10a2651.zip |
Improved Reset function, added more translations, added more features to AdvUtils, added more stuff to gui common (now you cannot accidentally click higher skill than the before making you lose skill points), made the entries in the main gui display a barrier because they will be done later after the first public beta release, tried and fail to improve PlayerConnectEvent and thats about it
Diffstat (limited to 'src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java')
-rw-r--r-- | src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java b/src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java index 4180771..8c1fa4b 100644 --- a/src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java +++ b/src/main/java/dev/mayaqq/ygasi/gui/BranchGui.java @@ -74,6 +74,18 @@ public class BranchGui { ); } + for (int i = 13; i <=15; i += 2) { + gui.setSlot(i, new GuiElementBuilder() + .setItem(Items.BARRIER) + .setName(Text.translatable("gui.ygasi.branch.wip").formatted(Formatting.RED)) + ); + } + gui.setSlot(26, new GuiElementBuilder() + .setItem(Items.BARRIER) + .setName(Text.translatable("gui.ygasi.branch.wip").formatted(Formatting.RED)) + ); + + /* //wizardry gui button if (!AdvUtils.getAdvancementProgress(player, "minecraft", "ygasi/wizardry")) { gui.setSlot(13, new GuiElementBuilder() @@ -124,6 +136,7 @@ public class BranchGui { .setCallback((index, clickType, actionType) -> ExtraGui.gui(player)) ); } + */ //info item button gui.setSlot(18, new GuiElementBuilder() @@ -136,7 +149,7 @@ public class BranchGui { ); //reset item button gui.setSlot(8, new GuiElementBuilder() - .setItem(Items.BARRIER) + .setItem(Items.TNT) .setName(Text.translatable("gui.ygasi.branch.reset.title")) .addLoreLine(Text.translatable("gui.ygasi.branch.reset.lore")) .addLoreLine(Text.translatable("gui.ygasi.branch.reset.lore2")) @@ -189,6 +202,7 @@ public class BranchGui { Class<?> guiClass = BRANCH_TO_GUI.get(branch); if (hasMercenary || hasWizadry || hasDrudiry) { player.sendMessage(Text.translatable("gui.ygasi.branch.no.unlock"), true); + player.playSound(SoundEvents.BLOCK_ANVIL_BREAK, SoundCategory.PLAYERS, 1.0F, 1.0F); player.closeHandledScreen(); } else { AdvUtils.grantAdvancementCriterion(player, advancementId, advancementCriterion); @@ -204,6 +218,7 @@ public class BranchGui { //if the player doesn't have enough skill points } else { player.sendMessage(Text.translatable("gui.ygasi.branch.no.skill"), true); + player.playSound(SoundEvents.BLOCK_ANVIL_BREAK, SoundCategory.PLAYERS, 1.0F, 1.0F); player.closeHandledScreen(); } } |