1

Need help with config file code

yoganut's Avatar yoganut4/10/14 7:08 pm
1 emeralds 250 3
4/11/2014 10:10 pm
Giraffestock's Avatar Giraffestock
Koslaw99I need some help with adding a config file to my mod.

Here is my base code. (Removed some stuff so no spoilers are released.):
http://pastie.org/private/qr6haraipqb5xy4edj4yg

Here is the crash log:
http://pastie.org/private/tyqh2qzcequyaaqbglz0xw

It's a Null Pointer Exception

The error is in here:
http://pastie.org/private/xrsw1kinvctodonxftbrfa

When I give the blocks their own Ids instead of the config, the game launchers. The items don't crash it.


i believe the issue is (i know ALOT about java errors) that you havent initalized a tab called "Blocks" for the creative menu and therefore the game exits because it cannot initlize and sort the blocks (not a coder, mod maker, ect.) (im looking to be one tho)
Posted by yoganut's Avatar
yoganut
Level 2 : Apprentice Network
1

Create an account or sign in to comment.

3

Giraffestock
04/11/2014 10:10 pm
Level 51 : Grandmaster Narwhal
Giraffestock's Avatar
What's the default integer for blocks in the config?
1
deadrecon98
04/11/2014 6:08 pm
Level 38 : Artisan Programmer
deadrecon98's Avatar
I can help you, do you have skype?
1
bmanrules
04/10/2014 7:24 pm
Level 57 : Grandmaster Programmer
bmanrules's Avatar
yoganut
Koslaw99I need some help with adding a config file to my mod.

Here is my base code. (Removed some stuff so no spoilers are released.):
http://pastie.org/private/qr6haraipqb5xy4edj4yg

Here is the crash log:
http://pastie.org/private/tyqh2qzcequyaaqbglz0xw

It's a Null Pointer Exception

The error is in here:
http://pastie.org/private/xrsw1kinvctodonxftbrfa

When I give the blocks their own Ids instead of the config, the game launchers. The items don't crash it.


i believe the issue is (i know ALOT about java errors) that you havent initalized a tab called "Blocks" for the creative menu and therefore the game exits because it cannot initlize and sort the blocks (not a coder, mod maker, ect.) (im looking to be one tho)


Nope, it's not actually a null pointer exception (read the crash log closely koslaw ;D)
The problem is block4 is set to have an ID of 0 in your config file, which in Minecraft is air. You can't replace Air's ID with your own (causes a conflict) and crashes.

Caused by: java.lang.IllegalArgumentException: Slot 0 is already occupied by net.minecraft.block.Block@1a618a48 when adding net.minecraft.block.Block@79bd8a7f
at net.minecraft.block.Block.<init>(Block.java:349)
at AdventureTime.Main.AdventureTimeMain.<clinit>(AdventureTimeMain.java:165)
... 35 more

I'm on a tablet so I may have a few typos but meh
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome