Jump to content

[SOLVED] Class not found with proper file structure?


firstdwarf

Recommended Posts

Sorry to post in an area that's well documented, but I'm at my wits' end!

 

My package is firstdwarf.StarTech and my class is StarTech. As far as I can tell, I'm following the mod packaging guidelines laid out extensively on this forum. I have tried multiple package names so as to only have one file instead of two. When I create a zip file, the name of the zip file itself shouldn't matter, should it? Every example I find from a mod has a zip name they set themselves.

 

When I unzip the file, it creates a folder whose name shouldn't matter. Inside that folder, the first folder is firstdwarf, the second StarTech, and StarTech contains every file for my mod, including the class file StarTech.class. So I don't understand why I get a class not found error for firstdwarf.StarTech.StarTech!!!

 

From extensive testing and throwing different configurations at it, the mod only seems to work when the file that is zipped is the firstdwarf folder itself- that is, when i unzip the file, it creates the folder firstdwarf. This does not appear to be the case with any other mod I can find, please help!!!

Link to comment
Share on other sites

Open up the zip in something like WinRar

 

At the zip root should be a folder called firstdwarf

 

If there isn't, you've done it wrong.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I'm on a mac, so I can't use winrar without exporting to the windows side of my machine, which I did. However, I'm not sure what you mean by zip root and my best efforts at googling have been fruitless. Sorry to ask, but could you explain further? On simply extracting the files, where would the zip root be located? Is it not extracted?

Link to comment
Share on other sites

Capture.png

 

My main class is draco18s.wispy.WispyBase so the first directory I see inside my zipped folder is "draco18s"

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

From extensive testing and throwing different configurations at it, the mod only seems to work when the file that is zipped is the firstdwarf folder itself- that is, when i unzip the file, it creates the folder firstdwarf. This does not appear to be the case with any other mod I can find, please help!!!

You found the way it works.

I assure you, all other mods are doing the exact same.

Link to comment
Share on other sites

Solved it! After checking as you suggested, I discovered an issue with compressing on a mac (though, as always, I could be mistaken in the warning to follow).

 

A WARNING TO MAC USERS:

 

Recent versions come with a handy dandy tool for compressing and opening .zip files. This works perfectly to open any file you choose. When opening a file, it creates a folder with the same name as the original zip file.

 

HOWEVER when you select right click on your file and select compress, the tool appears to make a zip file of your original folder; i.e. StarTechRelease becomes File.zip-->StarTechRelease-->whatever else. It can't convert your file straight to file.zip with the contents directly underneath like it does when opening files. The process works differently depending on whether you are zipping or unzipping. Furthermore, there is an extra upper level to the zip file containing  folder that appears to identify the file as made on a mac, or possibly compatible with mac utilities.

 

Moral of the story: the archive utility adds to your .zip AND hides those additions when you try to open your zip. I would recommend using a third party application to compress your files; only a third party application showed me the hidden files ruining my mod.

 

EDIT: @GotoLink, I realize that other mods are run the same way now. The compressing tool opened all files in a way that created an additional folder in front. Combined with being unable to easily create any .zip with whatever files you choose directly underneath, it makes for a dangerous combination.

Link to comment
Share on other sites

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 had an amazing experience with The Hack Angels. I had given up hope, but they managed to recover my bitcoins from an online scammer. I was able to retrieve what I had thought was lost forever because of their knowledge and commitment. I heartily endorse the services of The Hack Angels to anyone in need of help recovering cryptocurrency. They really are authorities in their domain.  (Web: https://thehackangels.com)     Whats Ap; +1 520) - 200, 23  20 ) ,  Mail Box; support@thehackangels. com
    • I got my model to render from the models renderToBuffer method. But still not quite what I want. I want to render the model from my renderer's render method. I feel that having access to the renderer and it's methods will open some doors for me later down the line. //EntityRendererProvider.Context pContext = ; I want this //ToaPlayerRenderer render = new ToaPlayerRenderer(pContext, false); // if I can get the above line to work, having the methods from the renderer class would be incredibly helpful down the line RenderType rendertype = model.renderType(p.getSkinTextureLocation()); // this should be something like render.getTextureLocation() VertexConsumer vertexconsumer = buffer.getBuffer(rendertype); model.renderToBuffer(stack, vertexconsumer, paLights, 1, 1, 1, 1, 1); // I don't want the render to happen here since it doesn't use the renderer //model.render(p, 1f, pTicks, stack, buffer, paLights); I want to render the model using this It is certainly getting closer though. Probably. I am still worried that even if pContext is initialized this new instance of the renderer class will still hit me with the classic and all too familiar "can't use static method in non-static context"
    • Hello, I am learning how to create Multipart Entities and I tried creating a PartEntity based on the EnderDragonPart code. However, when I tested summoning the entity in the game, the PartEntity appeared at position x 0, y 0, z 0 within the game. I tried to make it follow the main entity, and after testing again, the part entity followed the main entity but seemed to teleport back to x 0, y 0, z 0 every tick (I'm just guessing). I don't know how to fix this can someone help me? My github https://github.com/SteveKK666/Forge-NewWorld-1.20.1/tree/master/src/main/java/net/kk/newworldmod/entity/custom Illustration  https://drive.google.com/file/d/157SPvyQCE8GcsRXyQQkD4Dyhalz6LjBn/view?usp=drive_link Sorry for my English; I’m not very good at it. 
    • its still crashing with the same message
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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