MachineMusePowersuits icon indicating copy to clipboard operation
MachineMusePowersuits copied to clipboard

[Feature Request] Add Morph-O-Tool module.

Open eyeonus opened this issue 7 years ago • 9 comments

Obviously super-low priority, get a release out first.

The reasoning behind the feature request is basically, the OmniWrench is no longer Omni, as there are quite few mods it doesn't work as a wrench for, and because of the way it works, this tool does Omni.

https://github.com/Vazkii/Morph-o-Tool

Not even sure if it's possible to make a module out of the tool, also because of the way the tool works, and if not, no worries. If it is possible, Vazkii could probably tell you better than I.

eyeonus avatar Oct 08 '18 11:10 eyeonus

Probably easy to implement, but I don't see where it does anything other than rotate blocks: https://github.com/Vazkii/Morph-o-Tool/blob/master/src/main/java/vazkii/morphtool/ItemMorphTool.java#L28-L34

lehjr avatar Oct 08 '18 13:10 lehjr

It does everything a wrench by any name does. The way it works is, when you craft the Morph-O-Tool with a wrench, which includes items that aren't wrenches but do the same thing a wrench does, such as Astral Sorcery's Resonating Wand or Thermal Expansion's Crescent Hammer, it will suck that tool into the Morph-O-Tool.

From that point on, whenever you look at any block for which the Morph-O-Tool has sucked in the "wrench" of, it will morph into that tool.

So when you're looking at a bunch of Thermal Dynamics item ducts, all of sudden you're holding a Crescent Hammer, when you're looking at a bunch of Immersive Engineering machines, now you're holding an Engineer's Hammer, and when you're looking at IC2 components, now you're holding an IC2 electric wrench.

Here's Vazkii's demonstration video from way back when he first made the mod: https://www.youtube.com/watch?v=Rd1IqQnZylU

eyeonus avatar Oct 08 '18 20:10 eyeonus

Yeah, that's a lot different than it looks in code. Now I have to figure out how it works.

lehjr avatar Oct 08 '18 20:10 lehjr

ok, so it's all here where the "magic" happens: https://github.com/Vazkii/Morph-o-Tool/blob/master/src/main/java/vazkii/morphtool/MorphingHandler.java

lehjr avatar Oct 08 '18 21:10 lehjr

I'll look into it, but it's going to be weird to do because there's no API and it's done with an event handler.

lehjr avatar Oct 09 '18 00:10 lehjr

Yeah. Like I said, not even sure if it's possible.

The way I imagine it, the module icon would change the way the MoT does when the module is active, but the fist itself would stay a fist.

eyeonus avatar Oct 09 '18 03:10 eyeonus

the way the code works in that event handler, it looks like it swaps the item out for another and back again.

lehjr avatar Oct 09 '18 17:10 lehjr

Yeah, it literally uses the actual item itself, but with the name overridden and with a metadata tag to indicate that's it the MoT morphed into said tool.

eyeonus avatar Oct 09 '18 18:10 eyeonus

I might actually try this in 1.16.5 or 1.17.x using "data generators"

lehjr avatar Nov 04 '21 18:11 lehjr