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

Fixed gadget being indicated as repairable, but isn't. #557

Merged

Conversation

hvdklauw
Copy link
Contributor

@hvdklauw hvdklauw commented Dec 2, 2020

Gadget should never be repairable, as it's powered.

/*@Override
public boolean isRepairable() {
@Override
public boolean isRepairable(ItemStack stack) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

You you look into the Block.Properties class and see if there is a property to set this in the constructor? This might be why I commented this out but might have used the wrong one. If you check Item class you should be able to see if this method uses one of those properties, if not then I'll accept 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see what you mean, canRepair should do the trick.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, maxDamage(1) on all the gadgets also needs to be fixed, this is likely why we have the durability issue as well as needing to set the canRepair prop.

@hvdklauw hvdklauw force-pushed the 552_fix_gadget_repairable branch 2 times, most recently from ee5d626 to 214a39f Compare December 2, 2020 09:20
@hvdklauw hvdklauw changed the title Fixed gadget not implementing the isRepairable method. Fixed gadget showing as repairable while it isn't Dec 2, 2020
@hvdklauw hvdklauw changed the title Fixed gadget showing as repairable while it isn't Fixed gadget being indicated as repairable, but isn't. Dec 2, 2020
Also removed the damage as we use energy for durability.
@MichaelHillcox MichaelHillcox merged commit 0afb57e into Direwolf20-MC:1.16 Dec 20, 2020
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.

2 participants