Skip to content

Added a config option for block swapped by reversing hoe#178

Open
Spaghetti-OberNub wants to merge 5 commits into
masterfrom
hoe-config
Open

Added a config option for block swapped by reversing hoe#178
Spaghetti-OberNub wants to merge 5 commits into
masterfrom
hoe-config

Conversation

@Spaghetti-OberNub

@Spaghetti-OberNub Spaghetti-OberNub commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

also added wheat, carrots and potatoes to the crop reversal options

Closes Issue 160

@Spaghetti-OberNub Spaghetti-OberNub added the enhancement New feature or request label Jun 25, 2026
setTextureName("utilitiesinexcess:reversing_hoe");
setUnlocalizedName("reversing_hoe");
if (ReversingHoeConfig.unbreakable) setMaxDamage(0);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Config parsing needs to happen after postInit(), and the item constructor is called during preInit(). Otherwise conversions involving blocks from other mods won't work (verified with test config utilitiesinexcess:giga_torch->ExtraUtilities:magnumTorch), since they haven't been added to the registry yet.

Either the parsing can be added to a method that's called in postInit or the parsing can happen the first time it's used. postInit method is probably cleaner.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I did it on first time of onItemUse (not sure how to cleanly get the Hoe class instance in postInit)

Comment on lines +37 to +39
String[] parts = transformation.split("->");
Block sourceBlock = Block.getBlockFromName(parts[0].trim());
Block targetBlock = Block.getBlockFromName(parts[1].trim());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You should add a way to also set the block meta

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Reference destruction pickaxe

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Make Reversing Hoe Configurable

3 participants