Skip to content

Commit

Permalink
fix: add hint if beaver is not upgraded
Browse files Browse the repository at this point in the history
  • Loading branch information
klikli-dev committed Aug 9, 2024
1 parent f4ab99e commit 571e839
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/generated/resources/assets/occultism/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,7 @@
"debug.occultism.debug_wand.printed_glyphs": "Printed glyphs",
"debug.occultism.debug_wand.spirit_selected": "Selected spirit with id %s",
"debug.occultism.debug_wand.spirit_tamed": "Tamed spirit with id %s",
"dialog.occultism.beaver.no_upgrade": "A Blacksmith Familiar needs to upgrade the Beaver before he dispenses snacks!",
"dialog.occultism.beaver.snack_on_cooldown": "Hey now, don't be greedy!",
"dialog.occultism.dragon.pet": "purrr",
"dialog.occultism.mummy.kapow": "KAPOW!",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ public InteractionResult mobInteract(Player pPlayer, InteractionHand pHand) {
if (this.getOwner() == pPlayer) {

if (!pPlayer.isShiftKeyDown() && itemstack.isEmpty()) {
if(this.level().getGameTime() > this.lastSnackTime + SNACK_INTERVAL){
if (!this.hasBlacksmithUpgrade()) {
pPlayer.displayClientMessage(Component.translatable("dialog.occultism.beaver.no_upgrade"), true);
} else if (this.level().getGameTime() > this.lastSnackTime + SNACK_INTERVAL) {
this.lastSnackTime = this.level().getGameTime();
ItemHandlerHelper.giveItemToPlayer(pPlayer, new ItemStack(OccultismItems.BEAVER_NUGGET.get()));
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3191,6 +3191,7 @@ private void addDialogs() {
this.add("dialog.occultism.dragon.pet", "purrr");
this.add("dialog.occultism.mummy.kapow", "KAPOW!");
this.add("dialog.occultism.beaver.snack_on_cooldown", "Hey now, don't be greedy!");
this.add("dialog.occultism.beaver.no_upgrade", "A Blacksmith Familiar needs to upgrade the Beaver before he dispenses snacks!");
}

private void addModonomiconIntegration() {
Expand Down

0 comments on commit 571e839

Please sign in to comment.