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 enchantments for remembering last 2 #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

1JackBlack1
Copy link

This patch updates the code for predicting enchantments to bring it in line with remember the last 2 enchantments that have been applied to the item.

This shows the 3 possible enchantments that can be applied, and in the tooltip shows the requirements to obtain each.

@primarycolor
Copy link

primarycolor commented Nov 28, 2022

I wonder if you have noticed that watering can and hoe not made of iridium cannot enchant "Reaching"?Apart from the iridium watering can, there are only two optional enchantments.
Translated from Chinese:
不知你是否注意到,非铱制喷壶和锄头无法附魔“范围”?尤其是非铱制的喷壶,它们只有两个可选的附魔。

@1JackBlack1
Copy link
Author

1JackBlack1 commented Nov 29, 2022

Yes, this is the expected behaviour.
If your watering can is not made of iridium, to upgrade its reach you need to upgrade it.
If it is made of iridium, then you can upgrade its reach with the enchant.
As this only applies to these, and would result in doubling the enchantment list, and I thought most people would focus on the iridium upgrade, I decided not to worry about it.

For reference, the code for the reaching Enchantment has this:
public override bool CanApplyTo(Item item) { if (item is Tool && (item is WateringCan || item is Hoe)) { return (item as Tool).UpgradeLevel == 4; } return false; }
This also means if a mod adds in a higher teir upgrade, they need to make sure this is taken care of.

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