Skip to content

Commit

Permalink
fix: shift-rightclick with book of calling no longer works as of #108…
Browse files Browse the repository at this point in the history
…7365 (#1307)
  • Loading branch information
ThePixelatedCat authored Feb 25, 2025
1 parent 501fe08 commit ac0c23b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.klikli_dev.occultism.common.item.spirit.BookOfCallingItem;
import com.klikli_dev.occultism.registry.OccultismMemoryTypes;
import com.klikli_dev.occultism.registry.OccultismSounds;
import com.klikli_dev.occultism.registry.OccultismTags;
import com.mojang.serialization.Dynamic;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
Expand Down Expand Up @@ -679,12 +680,16 @@ public void remove(RemovalReason reason) {

@Override
public InteractionResult interactAt(Player player, Vec3 vec, InteractionHand hand) {
ItemStack itemStack = player.getItemInHand(hand);

if (!(itemStack.is(OccultismTags.Items.BOOK_OF_CALLING_FOLIOT) || itemStack.is(OccultismTags.Items.BOOK_OF_CALLING_DJINNI))) {
if (this.isTame() && player.isShiftKeyDown()) {
this.openScreen(player);
return InteractionResult.SUCCESS;
}
}

return super.interactAt(player, vec, hand);
return super.interactAt(player, vec, hand);
}

@Override
Expand Down

0 comments on commit ac0c23b

Please sign in to comment.