Using Mixins on this mod #2105
-
Hello everyone, I am fairly new to Minecraft Mod Development, but I am trying to make this addon mod for CC:Tweaked that adds Forge Energy compatibility to it. Could someone please tell me if this mod supports mixins and a rough idea on how to utilize them for my goal? I'm on 1.20.1 Forge. Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
When you say Forge Energy compatibility, what do you mean? Do you mean requiring computers to use Forge Energy? I would recommend reading #1690 (comment) if so, though obviously I can't stop you doing it if you really want to. :p Mixins work with any mod (or indeed, all Java code) — it's part of the mod loader, so not something you can opt in/out of. As far as where to mix in, you probably want to target somewhere around here — you probably want to check you have enough energy before turning the computer on, and then consume energy for every tick that it is on. If it runs out of energy, then shutdown. |
Beta Was this translation helpful? Give feedback.
When you say Forge Energy compatibility, what do you mean? Do you mean requiring computers to use Forge Energy? I would recommend reading #1690 (comment) if so, though obviously I can't stop you doing it if you really want to. :p
Mixins work with any mod (or indeed, all Java code) — it's part of the mod loader, so not something you can opt in/out of.
As far as where to mix in, you probably want to target somewhere around here — you probably want to check you have enough energy before turning the computer on, and then consume energy for every tick that it is on. If it runs out of energy, then shutdown.