The most ideal way for me would be to have it write a file that gives errors like "Error: Invalid value in ExampleBlock.js - "<>:0 1" is not a valid value for attribute "drop"." or something so I know immediately what it doesn't like... or at least what attribute is causing the problem. Something like that.
Flamarow's suggestion is kinda on the same line (I think).
As Always, thanks for making this mod and for answering question. You're one of the greats CubeX2!
I will implement it like that, but I think without line numbers.
Rollback Post to RevisionRollBack
I'm on twitter: @CubeX2_. Follow me for upcoming features and other stuff ;).
I will implement it like that, but I think without line numbers.
Hey, anything is better than nothing when it comes to figuring out what I'm doing wrong with this mod.
Thank you.
Edit: Also, and forgive me if this was all in my head, but did you remove the part of the documentation where it shows which attributes can use metadata? I could have sworn that was in there previously. Either way, will you please (re-)add it when you have time?
Sorry to be so needy.
Edit Again: OOooh. OK. Anything that has a value of "_____Array" (IntegerArray, etc.) is going to be a metadata-enabled attribute. I see.
@CubeX2: Question for you: Why can't metadata be used with slabs anymore? I'm really hoping that this is temporary.
If it's because of the way ceiling-slabs are handled just restrict the metadata to values 0 - 7 since the ceiling versions use 8 - 15 anyway. Also, if possible, can you have it where the values for the ceiling versions are automatically filled in by the lower versions? Thanks.
@CubeX2: Question for you: Why can't metadata be used with slabs anymore? I'm really hoping that this is temporary.
If it's because of the way ceiling-slabs are handled just restrict the metadata to values 0 - 7 since the ceiling versions use 8 - 15 anyway. Also, if possible, can you have it where the values for the ceiling versions are automatically filled in by the lower versions? Thanks.
It is because of the ceiling-slabs, but it is temporary. It won't fill 8 to 15, but it will use 0 for 8, 1 for 9,...
Hey I was wondering if there were any tutorials for custom stuff 2, that help file didn't help at all. this is completely different than customstuff 1 and the wiki is all customstuff 1 stuff... I used to always use the wiki
Hey I was wondering if there were any tutorials for custom stuff 2, that help file didn't help at all. this is completely different than customstuff 1 and the wiki is all customstuff 1 stuff... I used to always use the wiki
There isn't really a tutorial done yet for CS2. The help file and the example that CubeX2 provided should be about all you need to understand the basics of CS2 to make simple mods. To add the example into the game, you can either just put the zip into .minecraft/config/CustomStuff/mods OR you can unzip it to a folder with the same name as the zip and put the folder in that same location. As for the wiki, it is being slowly updated to CS2 and enough to do any of the basics is on the wiki. I have even updated the cherry blossom tree example if you want to reference it for some scripting examples. Not much in the scripts has actually changed other than origin is now position. A few links to updated pages on the wiki:
Between those pages, the help file, and the example mod, you should have everything necessary to figure out almost anything in CS2. I wish you luck and feel free to ask if you have any specific questions.
Only 1 reason to hate forge mods: Not compatible with Magic Launcher. It doesn't show up as a mod when using it and without using the launcher, you have to use default minecraft which has a snapshot installed. Why can't we use all? or why people use forge? Can someone explain please?
Can somebody help? My block doesn't show up in TooManyItems or the creative menu, and doesn't craft. Here is my code. Note that I DO have the images in the right place and the right name.
This is all in C:\Documents and Settings\-----\Application Data\.minecraft\config\CustomStuff\mods
and textures is in the folder Overhaul (the name of the .zip) inside of the .zip.
Only 1 reason to hate forge mods: Not compatible with Magic Launcher. It doesn't show up as a mod when using it and without using the launcher, you have to use default minecraft which has a snapshot installed. Why can't we use all? or why people use forge? Can someone explain please?
Don't use a snapshot then. Also, most big mods wouldn't be able to work without forge.
Only 1 reason to hate forge mods: Not compatible with Magic Launcher. It doesn't show up as a mod when using it and without using the launcher, you have to use default minecraft which has a snapshot installed. Why can't we use all? or why people use forge? Can someone explain please?
I have not used magic launcher so I do not know much about it, but the magic launcher page itself seems to say it supports forge just fine unless it is just a problem with the 1.3.2 versions. Personally, I love forge. It even has hooks to core game files that allows even more features for mods than Modloader seems allows. I especially love forge's new coremods folder that can load mods that normally would have to go into the jar. The new forge modloader is even attempts to be compatible to most (sadly not all) modloader mods. If you install forge, then I would not see much use for magic launcher other than having a menu to remove mods with.
Can somebody help? My block doesn't show up in TooManyItems or the creative menu, and doesn't craft. Here is my code. Note that I DO have the images in the right place and the right name.
This is all in C:\Documents and Settings\-----\Application Data\.minecraft\config\CustomStuff\mods
and textures is in the folder Overhaul (the name of the .zip) inside of the .zip.
The only problem real I see is with adding the coalBlock alias. You either need to make a variable with the id value or possibly use the getBlockIdProperty directly in the addAlias method.
mod.addAlias(config.getBlockIdProperty("coalBlockID"), "coalBlock");
//or if that doesn't work
var coalBlockIdValue = config.getBlockIdProperty("coalBlockID");
mod.addAlias(coalBlockIdValue, "coalBlock");
Hopefully fixing that should allow your item to show up in game, but if it doesn't, check the ForgeModLoader-client-0.txt and give us the first set of [STDERR] lines from it.
I have not used magic launcher so I do not know much about it, but the magic launcher page itself seems to say it supports forge just fine unless it is just a problem with the 1.3.2 versions. Personally, I love forge. It even has hooks to core game files that allows even more features for mods than Modloader seems allows. I especially love forge's new coremods folder that can load mods that normally would have to go into the jar. The new forge modloader is even attempts to be compatible to most (sadly not all) modloader mods. If you install forge, then I would not see much use for magic launcher other than having a menu to remove mods with.
The only problem real I see is with adding the coalBlock alias. You either need to make a variable with the id value or possibly use the getBlockIdProperty directly in the addAlias method.
mod.addAlias(config.getBlockIdProperty("coalBlockID"), "coalBlock");
//or if that doesn't work
var coalBlockIdValue = config.getBlockIdProperty("coalBlockID");
mod.addAlias(coalBlockIdValue, "coalBlock");
Hopefully fixing that should allow your item to show up in game, but if it doesn't, check the ForgeModLoader-client-0.txt and give us the first set of [STDERR] lines from it.
Neither of those worked, and here is what I got from the txt, using the first example:
2012-09-16 17:15:05 [INFO] [STDERR] org.mozilla.javascript.EvaluatorException: Can't find method cubex2.mods.customstuff2.scripting.ScriptableMod.addAlias(org.mozilla.javascript.Undefined,string). (mod.js#7)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.Context.reportRuntimeError(Context.java:945)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.Context.reportRuntimeError(Context.java:1001)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.Context.reportRuntimeError1(Context.java:964)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:166)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1._c_script_0(mod.js:7)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1.call(mod.js)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1.call(mod.js)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1.exec(mod.js)
2012-09-16 17:15:05 [INFO] [STDERR] at org.mozilla.javascript.Context.evaluateString(Context.java:1111)
2012-09-16 17:15:05 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.evaluateMainModFile(Mod.java:142)
2012-09-16 17:15:05 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.loadModFromArchive(Mod.java:122)
2012-09-16 17:15:05 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.<init>(Mod.java:97)
2012-09-16 17:15:05 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.CustomStuffEngine.loadMods(CustomStuffEngine.java:83)
2012-09-16 17:15:05 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.CustomStuffEngine.initialize(CustomStuffEngine.java:57)
2012-09-16 17:15:05 [INFO] [STDERR] at cubex2.mods.customstuff2.CustomStuff.postInit(CustomStuff.java:82)
2012-09-16 17:15:05 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-16 17:15:05 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:15:05 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:15:05 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-16 17:15:05 [INFO] [STDERR] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:371)
2012-09-16 17:15:05 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-16 17:15:05 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:15:05 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:15:05 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-16 17:15:05 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-09-16 17:15:05 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-09-16 17:15:05 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-09-16 17:15:05 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-09-16 17:15:05 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-09-16 17:15:05 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124)
2012-09-16 17:15:05 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-16 17:15:05 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:15:05 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:15:05 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-16 17:15:05 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-09-16 17:15:05 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-09-16 17:15:05 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-09-16 17:15:05 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-09-16 17:15:05 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-09-16 17:15:05 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)
2012-09-16 17:15:05 [INFO] [STDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:642)
2012-09-16 17:15:05 [INFO] [STDERR] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:177)
2012-09-16 17:15:05 [INFO] [STDERR] at net.minecraft.client.Minecraft.a(Minecraft.java:450)
2012-09-16 17:15:05 [INFO] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:737)
2012-09-16 17:15:05 [INFO] [STDERR] at java.lang.Thread.run(Unknown Source)
Here's what I got from using the second one:
2012-09-16 17:18:18 [INFO] [STDERR] org.mozilla.javascript.EcmaError: TypeError: Cannot find function getBlockIdProperty in object cubex2.mods.customstuff2.scripting.ScriptableConfig@ea0567. (mod.js#7)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3785)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3763)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3791)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3810)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3881)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThisHelper(ScriptRuntime.java:2360)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2327)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1._c_script_0(mod.js:7)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1.call(mod.js)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1.call(mod.js)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1.exec(mod.js)
2012-09-16 17:18:18 [INFO] [STDERR] at org.mozilla.javascript.Context.evaluateString(Context.java:1111)
2012-09-16 17:18:18 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.evaluateMainModFile(Mod.java:142)
2012-09-16 17:18:18 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.loadModFromArchive(Mod.java:122)
2012-09-16 17:18:18 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.<init>(Mod.java:97)
2012-09-16 17:18:18 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.CustomStuffEngine.loadMods(CustomStuffEngine.java:83)
2012-09-16 17:18:18 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.CustomStuffEngine.initialize(CustomStuffEngine.java:57)
2012-09-16 17:18:18 [INFO] [STDERR] at cubex2.mods.customstuff2.CustomStuff.postInit(CustomStuff.java:82)
2012-09-16 17:18:18 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-16 17:18:18 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:18:18 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:18:18 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-16 17:18:18 [INFO] [STDERR] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:371)
2012-09-16 17:18:18 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-16 17:18:18 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:18:18 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:18:18 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-16 17:18:18 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-09-16 17:18:18 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-09-16 17:18:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-09-16 17:18:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-09-16 17:18:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-09-16 17:18:18 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124)
2012-09-16 17:18:18 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-16 17:18:18 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:18:18 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-16 17:18:18 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-16 17:18:18 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-09-16 17:18:18 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-09-16 17:18:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-09-16 17:18:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-09-16 17:18:18 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-09-16 17:18:18 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)
2012-09-16 17:18:18 [INFO] [STDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:642)
2012-09-16 17:18:18 [INFO] [STDERR] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:177)
2012-09-16 17:18:18 [INFO] [STDERR] at net.minecraft.client.Minecraft.a(Minecraft.java:450)
2012-09-16 17:18:18 [INFO] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:737)
2012-09-16 17:18:18 [INFO] [STDERR] at java.lang.Thread.run(Unknown Source)
If I take out the alias completely and make the recipe use the ID, it works perfectly. However, that is not what I want.
Only 1 reason to hate forge mods: Not compatible with Magic Launcher. It doesn't show up as a mod when using it and without using the launcher, you have to use default minecraft which has a snapshot installed. Why can't we use all? or why people use forge? Can someone explain please?
You're doing something wrong. I use Magic Launcher exclusively and I've had (almost) no problems. Heck, it's actually solved quite a few that I was having before I started using it.
Here's a tip: try keeping copies of your .minecraft folder saved in different locations and using the Advanced tab of ML's setup to draw the root folder and jar from the one you're using. Also, install Forge into your jar manually. Sometimes ML's mod installer thing doesn't like a certain build.
Okay I got over the last thing, much people probably won't be using my mod anyway. I'm trying to make a custom furnace, but when I place the block, it crashes. Here's my code:
Okay I got over the last thing, much people probably won't be using my mod anyway. I'm trying to make a custom furnace, but when I place the block, it crashes. Here's my code:
EDIT: I changed a few things (which I posted ^) and now just entering a world crashes it.
If you changed an id since placing any custom blocks, that could be why you are crashing upon entering the world unless you are even crashing on a freshly generated world. Anyways, the main problem I see is that you used "grinder" as the type in your mod.js instead of "furnace". It should be like this.
Also, adding config properties is kind of pointless if the recipes do not even use them. The variable method from my earlier post should have worked just fine since it was even in the example mod unless it was removed in the 0.9.1 version. Look at the example mod to see what I mean since apparently you didn't understand what I meant in the example I gave you.
I have a few questions i would like to have addressed, first where can i find a tutorial or an example of how to program the custom blocks and items for CS2 since i absolutely know i am writing my code wrong and would like to prevent future error messages or at least lessen them contributed by me. Second, is world gen added or will it be added in a future update? it was pretty important for what i was using this mod for. Lastly I would like to know how to add a custom interface, i plan on making a magic spells mod myself and i will need to make it use a spell maker table or something like that that would be you trade a certain item for unlocking a magic spell. Although it may be easier to just add that in the mod itself. I have used this mod before and i love how versatile it is and how much it lets you do. And is crucial to my server. Thanks.
I have a few questions i would like to have addressed, first where can i find a tutorial or an example of how to program the custom blocks and items for CS2 since i absolutely know i am writing my code wrong and would like to prevent future error messages or at least lessen them contributed by me. Second, is world gen added or will it be added in a future update? it was pretty important for what i was using this mod for. Lastly I would like to know how to add a custom interface, i plan on making a magic spells mod myself and i will need to make it use a spell maker table or something like that that would be you trade a certain item for unlocking a magic spell. Although it may be easier to just add that in the mod itself. I have used this mod before and i love how versatile it is and how much it lets you do. And is crucial to my server. Thanks.
There isn't really a tutorial atm, but you should refer to the 3rd post on this page (210). As for the world generation, it has been added back. I have not messed with it much yet, so I would refer to the help file for the details about that. About the spell maker table, if you mean that you want to add a crafting table with it's own recipe list separate from vanilla recipes, it is possible. You will need to look at the gui section of the help file though for now since I have not worked with adding gui's yet though. Most of the information on the wiki is still accurate, just needs name changes, so you might also use the wiki pages for each one to help you with what everything means. Good luck.
If you changed an id since placing any custom blocks, that could be why you are crashing upon entering the world unless you are even crashing on a freshly generated world. Anyways, the main problem I see is that you used "grinder" as the type in your mod.js instead of "furnace". It should be like this.
Also, adding config properties is kind of pointless if the recipes do not even use them. The variable method from my earlier post should have worked just fine since it was even in the example mod unless it was removed in the 0.9.1 version. Look at the example mod to see what I mean since apparently you didn't understand what I meant in the example I gave you.
This didn't work. It does exactly what it did: crash. Here is my stderr thingamajig:
2012-09-17 16:17:24 [INFO] [STDERR] org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: Invalid value: stringText (mod.js#78)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1786)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:183)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1._c_script_0(mod.js:78)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1.call(mod.js)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1.call(mod.js)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.gen.mod_js_1.exec(mod.js)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.Context.evaluateString(Context.java:1111)
2012-09-17 16:17:24 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.evaluateMainModFile(Mod.java:142)
2012-09-17 16:17:24 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.loadModFromArchive(Mod.java:122)
2012-09-17 16:17:24 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.<init>(Mod.java:97)
2012-09-17 16:17:24 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.CustomStuffEngine.loadMods(CustomStuffEngine.java:83)
2012-09-17 16:17:24 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.CustomStuffEngine.initialize(CustomStuffEngine.java:57)
2012-09-17 16:17:24 [INFO] [STDERR] at cubex2.mods.customstuff2.CustomStuff.postInit(CustomStuff.java:82)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:371)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-09-17 16:17:24 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-09-17 16:17:24 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-09-17 16:17:24 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-09-17 16:17:24 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-09-17 16:17:24 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-09-17 16:17:24 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-09-17 16:17:24 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-09-17 16:17:24 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-09-17 16:17:24 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-09-17 16:17:24 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)
2012-09-17 16:17:24 [INFO] [STDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:642)
2012-09-17 16:17:24 [INFO] [STDERR] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:177)
2012-09-17 16:17:24 [INFO] [STDERR] at net.minecraft.client.Minecraft.a(Minecraft.java:450)
2012-09-17 16:17:24 [INFO] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:737)
2012-09-17 16:17:24 [INFO] [STDERR] at java.lang.Thread.run(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] Caused by: java.lang.IllegalArgumentException: Invalid value: stringText
2012-09-17 16:17:24 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.getAttributes(Mod.java:210)
2012-09-17 16:17:24 [INFO] [STDERR] at cubex2.mods.customstuff2.guis.GuiManager.addGui(GuiManager.java:84)
2012-09-17 16:17:24 [INFO] [STDERR] at cubex2.mods.customstuff2.scripting.ScriptableMod.addGui(ScriptableMod.java:745)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-17 16:17:24 [INFO] [STDERR] at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
2012-09-17 16:17:24 [INFO] [STDERR] ... 45 more
Also, I did use the example to start out, and I understood perfectly what you said, it just didn't work. It doesn't matter though because I don't plan on this being a popular mod, lol.
I will implement it like that, but I think without line numbers.
Thank you.
Edit:Also, and forgive me if this was all in my head, but did you remove the part of the documentation where it shows which attributes can use metadata? I could have sworn that was in there previously. Either way, will you please (re-)add it when you have time?
Sorry to be so needy.
Edit Again: OOooh. OK. Anything that has a value of "_____Array" (IntegerArray, etc.) is going to be a metadata-enabled attribute. I see.
Learning!
If it's because of the way ceiling-slabs are handled just restrict the metadata to values 0 - 7 since the ceiling versions use 8 - 15 anyway. Also, if possible, can you have it where the values for the ceiling versions are automatically filled in by the lower versions? Thanks.
It is because of the ceiling-slabs, but it is temporary. It won't fill 8 to 15, but it will use 0 for 8, 1 for 9,...
You have to use >= for the stack size, so it allows more or equal 10.
There isn't really a tutorial done yet for CS2. The help file and the example that CubeX2 provided should be about all you need to understand the basics of CS2 to make simple mods. To add the example into the game, you can either just put the zip into .minecraft/config/CustomStuff/mods OR you can unzip it to a folder with the same name as the zip and put the folder in that same location. As for the wiki, it is being slowly updated to CS2 and enough to do any of the basics is on the wiki. I have even updated the cherry blossom tree example if you want to reference it for some scripting examples. Not much in the scripts has actually changed other than origin is now position. A few links to updated pages on the wiki:
.
mod.js
coalBlock.js
This is all in C:\Documents and Settings\-----\Application Data\.minecraft\config\CustomStuff\mods
and textures is in the folder Overhaul (the name of the .zip) inside of the .zip.
Don't use a snapshot then. Also, most big mods wouldn't be able to work without forge.
I have not used magic launcher so I do not know much about it, but the magic launcher page itself seems to say it supports forge just fine unless it is just a problem with the 1.3.2 versions. Personally, I love forge. It even has hooks to core game files that allows even more features for mods than Modloader seems allows. I especially love forge's new coremods folder that can load mods that normally would have to go into the jar. The new forge modloader is even attempts to be compatible to most (sadly not all) modloader mods. If you install forge, then I would not see much use for magic launcher other than having a menu to remove mods with.
The only problem real I see is with adding the coalBlock alias. You either need to make a variable with the id value or possibly use the getBlockIdProperty directly in the addAlias method.
Hopefully fixing that should allow your item to show up in game, but if it doesn't, check the ForgeModLoader-client-0.txt and give us the first set of [STDERR] lines from it.
Neither of those worked, and here is what I got from the txt, using the first example:
Here's what I got from using the second one:
If I take out the alias completely and make the recipe use the ID, it works perfectly. However, that is not what I want.
Here's a tip: try keeping copies of your .minecraft folder saved in different locations and using the Advanced tab of ML's setup to draw the root folder and jar from the one you're using. Also, install Forge into your jar manually. Sometimes ML's mod installer thing doesn't like a certain build.
grinder.js (gui)
grinder.js (tileentity)
grinder.js (block)
EDIT: I changed a few things (which I posted ^) and now just entering a world crashes it.
If you changed an id since placing any custom blocks, that could be why you are crashing upon entering the world unless you are even crashing on a freshly generated world. Anyways, the main problem I see is that you used "grinder" as the type in your mod.js instead of "furnace". It should be like this.
Also, adding config properties is kind of pointless if the recipes do not even use them. The variable method from my earlier post should have worked just fine since it was even in the example mod unless it was removed in the 0.9.1 version. Look at the example mod to see what I mean since apparently you didn't understand what I meant in the example I gave you.
You could use the onDestroyedByPlayer or onBreak together with world.spawnItem.
I don't know if it is possible, but if it is, I will make it compatible with it.
There isn't really a tutorial atm, but you should refer to the 3rd post on this page (210). As for the world generation, it has been added back. I have not messed with it much yet, so I would refer to the help file for the details about that. About the spell maker table, if you mean that you want to add a crafting table with it's own recipe list separate from vanilla recipes, it is possible. You will need to look at the gui section of the help file though for now since I have not worked with adding gui's yet though. Most of the information on the wiki is still accurate, just needs name changes, so you might also use the wiki pages for each one to help you with what everything means. Good luck.
This didn't work. It does exactly what it did: crash. Here is my stderr thingamajig:
Also, I did use the example to start out, and I understood perfectly what you said, it just didn't work. It doesn't matter though because I don't plan on this being a popular mod, lol.