Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename LivingEntity setCurrentHand -> tryStartUsing and add javadoc #653

Open
wants to merge 7 commits into
base: 24w45a
Choose a base branch
from

Conversation

supersaiyansubtlety
Copy link
Contributor

@supersaiyansubtlety supersaiyansubtlety commented Oct 11, 2024

Setting the current hand is only one of the things it does:

/**
 * If the passed {@link net.minecraft.util.Hand hand} holds an
 * {@link net.minecraft.item.ItemStack item} and one is not already being used,
 * starts using the held {@link net.minecraft.item.ItemStack item}.
 */
public void tryStartUsing(Hand hand) {
    ItemStack lv = this.getStackInHand(hand);
    if (!lv.isEmpty() && !this.isUsingItem()) {
        this.activeItemStack = lv;
        this.itemUseTimeLeft = lv.getUseTicks(this);
        if (!this.getWorld().isClient) {
            this.setLivingFlag(1, true);
            this.setLivingFlag(2, hand == Hand.OFF_HAND);
            this.emitGameEvent(GameEvent.ITEM_INTERACT_START);
        }
    }
}

@supersaiyansubtlety supersaiyansubtlety added bug something isn't working correctly t: refactor proposes a refactor v: snapshot targets a snapshot version of minecraft reviews needed please review this PR s: tiny PRs with less than 50 lines labels Oct 11, 2024
@supersaiyansubtlety supersaiyansubtlety self-assigned this Oct 11, 2024
@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Oct 11, 2024
Copy link
Contributor

🚀 Target branch has been updated to 1.21.2-pre3

@github-actions github-actions bot changed the base branch from 1.21.2-pre2 to 1.21.2-pre3 October 11, 2024 16:29
@github-actions github-actions bot removed the update-base used to notify github actions that the base branch should be updated label Oct 11, 2024
@supersaiyansubtlety supersaiyansubtlety changed the title rename LivingEntity setCurrentHand -> startUsing rename LivingEntity setCurrentHand -> tryStartUsing and add javadoc Oct 11, 2024
Copy link
Member

@ix0rai ix0rai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gorge!

@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Oct 17, 2024
@github-actions github-actions bot changed the base branch from 1.21.2-pre3 to 1.21.2-pre5 October 17, 2024 02:13
Copy link
Contributor

🚀 Target branch has been updated to 1.21.2-pre5

@github-actions github-actions bot removed the update-base used to notify github actions that the base branch should be updated label Oct 17, 2024
@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Oct 17, 2024
Copy link
Contributor

🚀 Target branch has been updated to 1.21.2-rc1

@github-actions github-actions bot changed the base branch from 1.21.2-pre5 to 1.21.2-rc1 October 17, 2024 16:26
@github-actions github-actions bot removed the update-base used to notify github actions that the base branch should be updated label Oct 17, 2024
@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Oct 22, 2024
@github-actions github-actions bot changed the base branch from 1.21.2-rc1 to 1.21.2 October 22, 2024 22:48
Copy link
Contributor

🚀 Target branch has been updated to 1.21.2

@github-actions github-actions bot removed the update-base used to notify github actions that the base branch should be updated label Oct 22, 2024
@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Oct 23, 2024
@github-actions github-actions bot changed the base branch from 1.21.2 to 1.21.3 October 23, 2024 16:18
Copy link
Contributor

🚀 Target branch has been updated to 1.21.3

@github-actions github-actions bot removed the update-base used to notify github actions that the base branch should be updated label Oct 23, 2024
@supersaiyansubtlety supersaiyansubtlety added v: release targets a release version of minecraft and removed v: snapshot targets a snapshot version of minecraft labels Oct 31, 2024
@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

🚀 Target branch has been updated to 24w44a

@github-actions github-actions bot changed the base branch from 1.21.3 to 24w44a November 5, 2024 22:59
@github-actions github-actions bot added v: snapshot targets a snapshot version of minecraft and removed update-base used to notify github actions that the base branch should be updated v: release targets a release version of minecraft labels Nov 5, 2024
@ix0rai ix0rai added the update-base used to notify github actions that the base branch should be updated label Nov 7, 2024
@github-actions github-actions bot changed the base branch from 24w44a to 24w45a November 7, 2024 02:46
Copy link
Contributor

github-actions bot commented Nov 7, 2024

🚀 Target branch has been updated to 24w45a

@github-actions github-actions bot removed the update-base used to notify github actions that the base branch should be updated label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working correctly reviews needed please review this PR s: tiny PRs with less than 50 lines t: refactor proposes a refactor v: snapshot targets a snapshot version of minecraft
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants