Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix consumables, chargeables items#1140

Open
FDUTCH wants to merge 7 commits intodf-mc:masterfrom
FDUTCH:fix-usable-items
Open

fix consumables, chargeables items#1140
FDUTCH wants to merge 7 commits intodf-mc:masterfrom
FDUTCH:fix-usable-items

Conversation

Copy link
Contributor

FDUTCH commented Dec 6, 2025

No description provided.

Copy link
Contributor Author

FDUTCH commented Dec 6, 2025

can anyone test this?

DaPigGuy reviewed Dec 7, 2025
if p.usingItem {
p.tryChargeItem(usable, false)
return
} else if time.Since(p.serverChargedItem) <= time.Millisecond*100 {
Copy link
Member

DaPigGuy Dec 7, 2025

Choose a reason for hiding this comment

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

Is there no way at all to distinguish the client wants to finish charging a crossbow vs. release it?

p.handleUseContext(useCtx)
p.updateState()
if p.usingItem {
p.tryChargeItem(usable, false)
Copy link
Member

DaPigGuy Dec 7, 2025

Choose a reason for hiding this comment

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

Is there even a reason to care about the client finishing the charge anymore if we are handling it on player tick? I believe players get ticked before the transactions executed by packet handlers are handled, so player tick would beat UseItem in most cases unless the client sends too early, in which case the charge finish would be rejected anyway.

But if the UseItem charge attempt does not get rejected, would there not be an issue of crossbow releases sometimes having an artificial delay of 100ms and sometimes not?

Copy link
Contributor Author

FDUTCH Dec 7, 2025

Choose a reason for hiding this comment

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

idk if we should care about client finishing the charge, but I think it would be better to remove this option

I found that vanilla has a slight delay

Copy link
Member

DaPigGuy Dec 7, 2025

Choose a reason for hiding this comment

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

Ok we can see if any players end up complaining about that delay later then

DaPigGuy self-assigned this Dec 8, 2025
Copy link

shawtymarco commented Jan 2, 2026

can this get merged already i tested it out on 400+ms and worked perfectly fine

Copy link

shawtymarco commented Jan 2, 2026

this aged like fine wine xd

DaPigGuy removed their assignment Jan 4, 2026
Copy link
Member

Sandertv commented Feb 5, 2026

@DaPigGuy what's your verdict? And have more people been able to test this to make sure it works properly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

DaPigGuy DaPigGuy left review comments

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants