Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

eyeonus

Members
  • Joined

  • Last visited

Everything posted by eyeonus

  1. No way! I can put code that does different things into different stuff? I never knew that. </sarcasm> Your comments have been universally useless. Goodbye.
  2. Yes, thank you for that knee jerk, thoughtless comment that contributes nothing to the conversation.
  3. Yes, well, OnRightClick is exactly the use case I'm talking about, so they aren't doing it wrong. I've already spoken with lehjr about going the Morph-O-Tool route and changing the item to be the item from the other mod. In his opinion, that is entirely too much work to be worth it, especially since in his view it's a unstable solution in laggy servers. He's decided to make anything that requires another mod be in an addon package for the main mod, thus avoiding this problem altogether. Thank you for your time.
  4. You are entirely missing the point. I don't get to choose how the items in the mod are activated. The vast majority, if not all, of the items in the other mods use ItemStack modItem = playerIn.getHeldItem(handIn) to determine what item has just been used.
  5. The modules have to be registered during initialization. The loading phase, the part before you get to the main menu. Whatever you want to call it. I call it init because it's 4 letters. The modules have to be registered at the same time every other Minecraft item has to be registered, because otherwise they don't exist in the game and can't be crafted. If it's something you want players to be able to craft, it has to be registered. The distinction being made between "module" and "item" in my earlier post is to prevent confusion between talking about the item in MPS that acts as an interface to an item on another mod, and the item in the other mod. The modules ARE STILL ITEMS as far as Minecraft is concerned. You can't pass an ItemStack to a method that doesn't take an ItemStack parameter. I never said you can pass an item.
  6. As I just said, you CAN'T. You can't pass an ItemStack AT ALL. That's the problem. The right-click method doesn't have an ItemStack parameter. Items have to be registered during init. If you don't register them during init, they can't be registered later. Anything with a crafting recipe has to be registered. The registration has to be during the initialization phase.
  7. No, but it needs to be REGISTERED during init, because the modules, which are not items in the sense that they have any direct functionality, are items in the sense that they are things you can craft and put into your inventory. The problem is that most items can't have their functionality called indirectly. That's why the Morph-O-Tool literally transforms into whatever item you're wanting to use. You can't say tell the other mod's code "Hey, pretend this thing which isn't your item actually is and do the thing that item does." You can't pass an ItemStack of the actual item the module is pretending to be, in other words.
  8. To answer your question, no, I'm not a mod developer per se. I am a "contributor", in that I help out lehjr with development on MPS from time to time, which does include writing code for the mod.
  9. Except, according to lehjr, the module has to registered before we can check if the other mod is installed. The module isn't used directly. The module is installed into the Power Fist item, the Power Fist is what the player is using. (Install leaf blower module into Fist, select leaf blower as active module, right-click of Fist now makes leaves blow. Select other module as active, now right-click activates that module instead.) The point is being able to have multiple modules that can be cycled through so that one item - the power fist- can do the same thing as many items from many mods.
  10. For clarification, the "module" is the thing in MPS that depends on something from another mod to do whatever it does. The "item" is the thing in the other mod. So, the leaf blower module is a bit of code that references the leaf blower item in IC2. The module doesn't do anything on its own. It's just an interface to the item. Registered or not, it needs to not show in game if the mod it depends on isn't installed, because it's literally just a useless waste of space in that case. But disabling an item isn't the issue.
  11. Okay, so final question: When I'm testing the code in a dev environment, would I need to have the mods such items depend on installed? In other words, if I'm working on the code for an item that depends on ModA, but I also have another item that depends on ModB, which I'm not working on, do I still need to have ModB installed in my dev environment to run the dev build?
  12. You told me what. Not how. If you can point to a tutorial or reference library or something that explains how, that's fine. I don't need my hand held. But when you say soft dependency, the only way to do a soft dependency that I know how to do is the optional interface thing that doesn't exist anymore. And is a soft dependency soft in dev too, or is it still a hard dependency in a dev environment like it was back when optional interfaces was a thing that existed?
  13. Okay. How do you do that?
  14. It is 100% completely true. The code that makes the leaves be blown is in IC2, not MPS. The MPS module uses the same item image as the IC2 blower. EVERY module in MPS is just an interface to the actual item from the mod it's dependent on. The module can't exist without the mod it is dependent on because the module doesn't have any code to do the thing. The leaf blower module uses the code in IC2 to blow leaves. The One Probe module uses the code in TheOneProbe to do the probing. The oxygen tank module uses the code from GalactiCraft to store and use Oxygen.
  15. It means it's not possible to make the item not depend on another mod. For example, one of the items in the 1.12 version is a module that adds the IC2 leaf blower as an installable module in MPS' Power Fist, meaning that the Power Fist can act as the Leaf Blower. The Leaf Blower module depends on IC2. It can't exist without IC2 also being installed.
  16. Registering an item that depends on a mod that isn't installed will throw an error and crash the game.
  17. Pretty sure the doesn't exist at pre-load, and IIRC, that's when items need to be registered.
  18. Well, the problem is, and I'm directly quoting the guy working on the mod:
  19. 1.12 and before had "@Optional.Interface" for interacting with other mods without requiring the other mods as dependencies. If the other mod is installed do something, if not, don't do it. Example: https://github.com/MachineMuse/MachineMusePowersuits/blob/1.12.2-experimental/src/main/java/net/machinemuse/powersuits/item/tool/ItemPowerFist.java#L64-L74 1.13 & 1.14 don't have the Optional.Interface thing. Does it have something else instead and if so what is it? Is there a way in >=1.13 to do what the Optional.Interface for <=1.12 did, and if so, what is it?

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.