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.

[SOLVED][Mac][1.7.2/1.7.10] Jar Errors: Assets and Crashing?

Featured Replies

Posted

Running Mac OS X 10.9.4

(Take it easy, I'm a beginner!)

 

When I exported my mod, I got the jar file as expected. I pasted it into my game, and both the names and textures were missing! I unarchived the .jar and opened up the folder, only to find out that for some reason none of the assets exported. I pasted the correct assets and the folder hierarchies, then I renamed the folder to be a .jar (just as a test), and Minecraft Forge ran it perfectly (regardless of 1.7.2 or 1.7.10), the textures working. I then used Terminal to turn the .jar folder into a compressed jar, but when I did this, it crashed Minecraft each and every time I tried, with naming conventions or otherwise.

 

Can anybody explain why the assets didn't register in the first place, or why the compressed jar isn't working?

Developer of small, unreleased, basic, and incomplete mods since 2014!

  • Author

To export my jar file from my Forge environment: ./gradlew build

To export my jar file from folder to .jar:

 jar cf OresPlus-1.7.2-1.0 OresPlus-1.0.jar 

 

Perhaps the name change was what tripped up?

 

 

 

My project setup (In the Jar):

|assets

|emeraldsplus

  |lang

  -en_US.lang

  |textures

  |blocks

  |items

    -flimsyEmeraldAxe.png

    -flimsyEmeraldHoe.png

    -flimsyEmeraldPickaxe.png

    -flimsyEmeraldShovel.png

    -flimsyEmeraldSword.png

    -sturdyEmerald.png

    -sturdyEmeraldAxe.png

    -sturdyEmeraldHoe.png

    -sturdyEmeraldPickaxe.png

    -sturdyEmeraldShovel.png

    -sturdyEmeraldSword.png

|com

|LazerBeans

  |EmeraldsPlus

  |EmeraldsPlus.class

  |*.class files for each of the above textured items*

-mcmod.info

|META-INF

  -MANIFEST.MF

 

 

My Forge environment is the same regarding the assets.

 

 

 

Developer of small, unreleased, basic, and incomplete mods since 2014!

  • Author

The reason I used a command was to repack the jar, although I found a way to edit the jar without unarchiving/recompressing (but it stills crashes).

 

I see. I didn't have the assets in the src/main/resources folder, but in the src/main/java...

 

When I test run Minecraft through eclipse, it had always loaded fine.

 

I just rebuilt the jar and pasted it in my mods folder. The crash report is different, although it still crashes. The previous time it would crash during preinitialization. This time, it crashed during initialization, providing me with this:

Time: 8/3/14 12:12 PM
Description: Initializing game

java.lang.NullPointerException: Initializing game
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:506)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:815)
at net.minecraft.client.main.Main.main(SourceFile:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:506)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:815)
at net.minecraft.client.main.Main.main(SourceFile:103)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

-- System Details --
Details:
Minecraft Version: 1.7.2
Operating System: Mac OS X (x86_64) version 10.9.4
Java Version: 1.6.0_65, Apple Inc.
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
Memory: 139972888 bytes (133 MB) / 232198144 bytes (221 MB) up to 1060372480 bytes (1011 MB)
JVM Flags: 5 total; -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.03 FML v7.2.211.1121 Minecraft Forge 10.12.2.1121 9 mods loaded, 0 mods active
mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) 
FML{7.2.211.1121} [Forge Mod Loader] (forge-1.7.2-10.12.2.1121.jar) 
Forge{10.12.2.1121} [Minecraft Forge] (forge-1.7.2-10.12.2.1121.jar) 
examplemod{1.0} [Example Mod] (Ores+-1.0.jar) 
Emeralds+{1.7.2} [Emeralds+] (Ores+-1.0.jar) 
basic{1.0.2} [basic] (Ores+-1.0.jar) 
Emeralds+{1.7.2} [Emeralds+] (OresPlus Stuff) 
examplemod{1.0} [examplemod] (OresPlus Stuff) 
basic{1.0.2} [basic] (OresPlus Stuff) 
Launched Version: 1.7.2-Forge10.12.2.1121
LWJGL: 2.9.1
OpenGL: ATI Radeon HD 4670 OpenGL Engine GL version 2.1 ATI-8.24.15, ATI Technologies Inc.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Packs: [Arcanumcraft]
Current Language: English (UK)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
Anisotropic Filtering: Off (1)

 

Developer of small, unreleased, basic, and incomplete mods since 2014!

  • Author

The jar was in build/libs. I pasted into my ~/Library/Application Support/minecraft/mods folder. There are multiple mods because I created a test mod for getting to know Eclipse and the project setup. These assets actually DID work, as they were in the correct folder(s). And what do you mean by loaded multiple times? I

Developer of small, unreleased, basic, and incomplete mods since 2014!

  • Author

Okay, there were some folders in my mods folder (not sure why, they were supposed to be moved out). The game no longer crashes, but now the latest jar doesn't have ANY assets loaded.

 

All of the assets are in src/main/resources...

Developer of small, unreleased, basic, and incomplete mods since 2014!

  • Author

When I was reading tutorials, I was instructed to put the assets in src/main/java. Not a good idea?

Developer of small, unreleased, basic, and incomplete mods since 2014!

  • Author

I don't know how, but the wrong assets were in the resources. I rebuilt the jar and installed, runs perfectly. Thanks!

Developer of small, unreleased, basic, and incomplete mods since 2014!

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...

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.