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

Update to 1.21.4 #62

Draft
wants to merge 25 commits into
base: master
Choose a base branch
from
Draft

Update to 1.21.4 #62

wants to merge 25 commits into from

Conversation

CodeDoctorDE
Copy link

Based on #61 but I couldn't test it currently

@CodeDoctorDE
Copy link
Author

okay sword works, bow not

@lowercasebtw
Copy link

yo uh, can u make this use consumable on sword items now instead of shield cuz shield is ahh

1.21.4+ now has third/first person animations for consumable block

kernitus/BukkitOldCombatMechanics#769

@CodeDoctorDE
Copy link
Author

Hmm, yeah...
I need to find time working on it again..
I will see what I can do

@BradBot1 BradBot1 mentioned this pull request Jan 8, 2025
@im-a-blobfish
Copy link

hello, is this PR finished / usable on a production server?

@CodeDoctorDE
Copy link
Author

No, I'm currently struggeling getting the bow done, if you find a way, feel free to continue here

@lowercasebtw
Copy link

Whats wrong with the bow?

@CodeDoctorDE
Copy link
Author

It doesn't shoot an arrow

@im-a-blobfish
Copy link

is everything apart from the bow working correctly as far as you know?

@im-a-blobfish
Copy link

@CodeDoctorDE
Switching out PlayerUseItemEvent with PlayerCancelItemUseEvent in VanillaBowFeature seems to fix bow shooting

Copy link
Owner

@TogAr2 TogAr2 left a comment

Choose a reason for hiding this comment

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

Most of it looks good to me! You can fix bows and tridents by using the item use cancel event instead. Also we need a way to handle food item consuming.

player.setItemInHand(hand, stack.withAmount(stack.amount() - 1));
}
}
// ItemStack leftOver = consumable.usingConvertsTo();
Copy link
Owner

Choose a reason for hiding this comment

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

Is there any alternative to this?

Copy link
Author

Choose a reason for hiding this comment

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

I don't know, this method is no longer in there, i need to check if there are alternatives

Copy link
Owner

Choose a reason for hiding this comment

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

There doesn't seem to be, I wrote a method to get this manually since it doesn't have a lot of exceptions

Choose a reason for hiding this comment

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

They replaced this with its own component afaik?

Choose a reason for hiding this comment

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

image

It comes from the "use_remainder" component

@CodeDoctorDE
Copy link
Author

Thanks for the review. Most of these changes are from the previous pr so credit to it.
I will try to fix your comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants