Skip to content

Update enchantments for remembering last 2 - #14

Open
1JackBlack1 wants to merge 2 commits into
MouseyPounds:masterfrom
1JackBlack1:master
Open

Update enchantments for remembering last 2#14
1JackBlack1 wants to merge 2 commits into
MouseyPounds:masterfrom
1JackBlack1:master

Conversation

@1JackBlack1

Copy link
Copy Markdown

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

primarycolor commented Nov 28, 2022

Copy link
Copy Markdown

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

1JackBlack1 commented Nov 29, 2022

Copy link
Copy Markdown
Author

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