Jump to content

Recommended Posts

Posted (edited)

Version: forge-1.12.2-14.23.5.2768-mdk

Using IntelliJ Community 2018.3

 

I'm relatively new to this whole thing, and I'm having an issue where importing certain classes within the same packages into a certain other file fails for some reason.

"MessageMod" is the main "@Mod" class.

So my issue is that in MessageEvent I can do "import a.b.MessageMod" just fine. I've compiled MessageEvent repeatedly but no issues with that so far. The same with the other three classes calling any other things from within the package.

But I need to register the MessageEvent, and so from MessageMod I have to import MessageEvent. But inside MessageMod.java, "import a.b.event.MessageEvent" invariably fails:

I've tried building the other packages and files all first, restarting, clearing the cache, compiling the whole project all at once, etc. but still haven't gotten it to build properly yet. Also checked the import names a bunch, used the "auto-complete" one from IntelliJ (didn't work) and typed it myself (still didn't work).

in short IntelliJ can auto-complete the package name and "knows" it's there, but the error doesn't show up until I try to compile, at which time it tells me that the package does not exist.

Googling doesn't do much as the few things that do pop up tell me to do things I can't find or have no idea how to do, or are several years old.

Anybody know how to fix this?

Edited by lightningdragonx5
Posted

Post your code as a GitHub repo

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted

Could you tell me what you mean by "compile" by the way, how are you building your mod?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted (edited)
  On 12/16/2018 at 3:01 AM, DaemonUmbra said:

Could you tell me what you mean by "compile" by the way, how are you building your mod?

Expand  

By "compile" I mean either attempt to run the MC client, or right-clicking the individual file and selecting "Recompile filename.java".

 

How am I building the mod? Not quite sure, I followed the directions on the readthedocs site

(https://mcforge.readthedocs.io/en/latest/gettingstarted/#terminal-free-intellij-idea-configuration)

as best as I could but I may have missed something. I have no idea what I'm missing so that's why I'm here to begin with, to see if packages not finding each other is a common error that could be solved by something I don't know about.

 

Anyhow it worked fine when I didn't have files referencing each other - for instance when it was just the main mod class by itself it compiled and showed up in the Mods section of the MC client.

Edited by lightningdragonx5
Posted

Check your GitHub

  • Thanks 1

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted (edited)

lmao, apparently the extensions just flat out don't show on intellij (at least not by default)

 

Thanks for helping me out btw, now I know to watch out for that kind of thing in the future

Edited by lightningdragonx5
Posted

Because it doesn't get counted as a source file

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • "I want to understand how complex mods with ASM transformation and coremods work, such as Xray or AntiXray. Why do they break when you simply rename packages? What features of their architecture make refactoring difficult? And what techniques are used to protect these mods? I am interested in technical aspects in order to better understand the bytecode and Forge loader system."
    • I can't figure out if you're looking for help trying to steal someone elses work, or cheat at the game....
    • Title: Why Is It So Hard to Rename and Restructure Mods Like Xray or AntiXray? 🤔 Post text: Hey everyone! I’ve been digging into Minecraft modding for a while and have one big question that I can’t figure out on my own. Maybe someone with more experience could help or give me some advice. Here’s the issue: When I take a “normal” Minecraft mod — for example, one that just adds some blocks or new items — I can easily change its structure, package names, or even rebrand it entirely. It’s straightforward. But as soon as I try this with cheat-type mods like XrayMod or AntiXray, everything falls apart. Even if I just rename the classes, refactor the packages, or hide its identity somehow, the mod either breaks or stops working properly. XrayMod in particular is proving to be a nightmare to modify without losing its core function. So my question is — why is this so much harder with cheat mods like Xray? Is there something fundamentally different about how they’re coded, loaded, or protected that prevents simple renaming or restructuring? And if so, how can I actually learn to understand someone else’s cheat mod enough to safely refactor it without breaking the core features? I’ve already been spending over two months trying to figure this out and haven’t gotten anywhere. It feels like there must be some trick or knowledge I’m missing. Would really appreciate any thoughts, tips, or references — maybe there are guides or techniques for understanding cheat-mod internals? Or if you’ve successfully “disguised” a cheat mod like Xray before, I’d love to hear how you did it. Thanks in advance for any help or discussion. ✌️
    • just started making cinamatic contect check it out on my channel or check out my facebook page    Humbug City Minecraft Youtube https://www.youtube.com/watch?v=v2N6OveKwno https://www.facebook.com/profile.php?id=61575866982337  
    • Where did you get the schematic? Source/Link? And do use an own modpack or a pre-configured from curseforge? If yes, which one On a later time, I can make some tests on my own - but I need the schematic and the modpack name
  • Topics

×
×
  • Create New...

Important Information

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