I finally have time to work on updating my CS mod to CS2 and have run into a couple problems that I am hoping someone can help me with. I am trying to break my slabs out into thir seperate files and can not get them to work.
- snip -
For starters, "drop" is an array attribute. So it should look like this:
drop[0] = config.getBlockId("mudslab1ID");
I don't know if that's the extent of your problems, but it's a good place to start. I didn't see any other errors, but I admittedly just skimmed it since I'm short on time atm.
Hope that helps you.
I'm personally just going to wait until CubeX2 has metadata-enabled slabs so I don't have to part mine out more than necessary. Hopefully that'll be in the next version.
@CubeX2: I'll probably just wait on adding the chests then. Thanks for letting me know.
I finally have time to work on updating my CS mod to CS2 and have run into a couple problems that I am hoping someone can help me with. I am trying to break my slabs out into thir seperate files and can not get them to work.
Here is the mudslab1.js file.
// Slab Config
id = config.getBlockId("mudslab1ID");
name = "mudslab1";
displayName[0] = "Black Mud Brick Slab";
// Add the chest components. 'exampleChest.js' is the file and 'chest' is the type.
// mod.addTileEntity("exampleChest.js", "chest");
// mod.addGui("exampleChest.js", "chest");
mod.addBlock("mudslab1.js", "slab");
// Add a recipe for the chest. Here you can use your aliases.
// mod.addRecipe("exampleChest", 3, 3, "roseRed", "roseRed", "roseRed", "roseRed", "chest", "roseRed", "roseRed", "roseRed", "roseRed");
And I am geting an error in ForgeModLoader-client-0 log file
2012-09-25 14:58:46 [FINER] [ForgeModLoader] Posting state event cpw.mods.fml.common.event.FMLPostInitializationEvent@75de3d3d to mod CustomStuff2
2012-09-25 14:58:47 [INFO] [STDERR] org.mozilla.javascript.EvaluatorException: missing ; before statement (mod.js#4)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.DefaultErrorReporter.runtimeError(DefaultErrorReporter.java:109)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.DefaultErrorReporter.error(DefaultErrorReporter.java:96)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Parser.addError(Parser.java:230)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Parser.addError(Parser.java:208)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Parser.reportError(Parser.java:265)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Parser.reportError(Parser.java:252)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Parser.reportError(Parser.java:245)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Parser.autoInsertSemicolon(Parser.java:1109)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Parser.statementHelper(Parser.java:1086)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Parser.statement(Parser.java:943)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Parser.parse(Parser.java:568)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Parser.parse(Parser.java:530)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Context.compileImpl(Context.java:2403)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Context.compileReader(Context.java:1328)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Context.compileReader(Context.java:1300)
2012-09-25 14:58:47 [INFO] [STDERR] at org.mozilla.javascript.Context.evaluateReader(Context.java:1139)
2012-09-25 14:58:47 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.evaluateMainModFile(Mod.java:145)
2012-09-25 14:58:47 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.loadModFromDirectory(Mod.java:110)
2012-09-25 14:58:47 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.Mod.<init>(Mod.java:93)
2012-09-25 14:58:47 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.CustomStuffEngine.loadMods(CustomStuffEngine.java:83)
2012-09-25 14:58:47 [INFO] [STDERR] at cubex2.mods.customstuff2.engine.CustomStuffEngine.initialize(CustomStuffEngine.java:57)
2012-09-25 14:58:47 [INFO] [STDERR] at cubex2.mods.customstuff2.CustomStuff.postInit(CustomStuff.java:82)
2012-09-25 14:58:47 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-25 14:58:47 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-25 14:58:47 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-25 14:58:47 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-25 14:58:47 [INFO] [STDERR] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:371)
2012-09-25 14:58:47 [INFO] [STDERR] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
2012-09-25 14:58:47 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-25 14:58:47 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-25 14:58:47 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-09-25 14:58:47 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-09-25 14:58:47 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-09-25 14:58:47 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-09-25 14:58:47 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-09-25 14:58:47 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:124)
2012-09-25 14:58:47 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2012-09-25 14:58:47 [INFO] [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2012-09-25 14:58:47 [INFO] [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2012-09-25 14:58:47 [INFO] [STDERR] at java.lang.reflect.Method.invoke(Unknown Source)
2012-09-25 14:58:47 [INFO] [STDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:69)
2012-09-25 14:58:47 [INFO] [STDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
2012-09-25 14:58:47 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:317)
2012-09-25 14:58:47 [INFO] [STDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:300)
2012-09-25 14:58:47 [INFO] [STDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:268)
2012-09-25 14:58:47 [INFO] [STDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:81)
2012-09-25 14:58:47 [INFO] [STDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:642)
2012-09-25 14:58:47 [INFO] [STDERR] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:177)
2012-09-25 14:58:47 [INFO] [STDERR] at net.minecraft.client.Minecraft.a(Minecraft.java:450)
2012-09-25 14:58:47 [INFO] [STDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:737)
2012-09-25 14:58:47 [INFO] [STDERR] at java.lang.Thread.run(Unknown Source)
2012-09-25 14:58:47 [FINER] [ForgeModLoader] State event cpw.mods.fml.common.event.FMLPostInitializationEvent@75de3d3d delivered to mod CustomStuff2
I am using Forge 4.1.1.251 and CS 2.0.9.1
The current error is probably caused because "gwydion-mudslab1ID" is not a valid variable name but "gwydion_mudslab1ID" would be valid if I remember correctly. Also, the textureFile attribute is NOT an array attribute, so the [0] might cause problems as well.
What Alvoria said about the drop attribute is correct, but might as well go all the way in case you didn't notice when CubeX2 posted about it.
The current error is probably caused because "gwydion-mudslab1ID" is not a valid variable name but "gwydion_mudslab1ID" would be valid if I remember correctly. Also, the textureFile attribute is NOT an array attribute, so the [0] might cause problems as well.
What Alvoria said about the drop attribute is correct, but might as well go all the way in case you didn't notice when CubeX2 posted about it.
For starters, "drop" is an array attribute. So it should look like this:
drop[0] = config.getBlockId("mudslab1ID");
I don't know if that's the extent of your problems, but it's a good place to start. I didn't see any other errors, but I admittedly just skimmed it since I'm short on time atm.
Hope that helps you.
I'm personally just going to wait until CubeX2 has metadata-enabled slabs so I don't have to part mine out more than necessary. Hopefully that'll be in the next version.
@CubeX2: I'll probably just wait on adding the chests then. Thanks for letting me know.
I knew I could count on you 2 to tell me where I went wrong. It was in deed the missing [0] on drop, the "-" in the variable name, the addition of [0] on the texture file attribute, and I also capitalized a texture index attribute when it is should have been lower case. Now I can continue updating.
Please help how to make ice?
I'm doing a translucent texture, but when I go to the game, it is not transparent.
What to do?
The transparent attribute is for when you can already see through the block such as glass where the texture is completely see-through. The attribute to make something like ice is semiTransparent. Also, currently the values for tileTransparent is the opposite of what they should be (unless cubex2 secretly updated it) so if you want it to tile like glass, you should set it to true until the next update.
Could make this work with the iron chests mod? That'd be awesome. Please and thank you.
P.S. This is a great mod, and so are your others, keep up the great work. All modders should be appreciated more.
When using the multi page chest I can shift click while placing things only on the first page. When putting anything in the other pages they vanish when you exit a reenter.
Correction; they are not vanishing they just end up back in your inventory. They seem to stay after the second deposit though.
When using the multi page chest I can shift click while placing things only on the first page. When putting anything in the other pages they vanish when you exit a reenter.
Correction; they are not vanishing they just end up back in your inventory. They seem to stay after the second deposit though.
I am having a similar problem. They don't stay on the second try sometimes take 5 or 6. Or place them and save world to keep them in the chest. Can only shift click items to the first page, any other page and they go to the first page anyway. Any Suggestions?
Hey, I done a John Smith texture and GUI with the more furnaces mod, Tell me what ya think?
They're basically just the normal furnaces with their corresponding material!
When using the multi page chest I can shift click while placing things only on the first page. When putting anything in the other pages they vanish when you exit a reenter.
Correction; they are not vanishing they just end up back in your inventory. They seem to stay after the second deposit though.
I am having a similar problem. They don't stay on the second try sometimes take 5 or 6. Or place them and save world to keep them in the chest. Can only shift click items to the first page, any other page and they go to the first page anyway. Any Suggestions?
The shift click issue is fixed now. The other problem happens because of the huge amount of slots in the chest. You have to wait a few seconds before using it when loading the world. In the current update, the time between closing and opening again to work correct should be decreased.
So does the fuel works and the smelting recipe not?
You have to use the 'chestBlock' type for the tile entity if you don't use the 'chest' block type.
The shift click issue is fixed now. The other problem happens because of the huge amount of slots in the chest. You have to wait a few seconds before using it when loading the world. In the current update, the time between closing and opening again to work correct should be decreased.
You have to remove the whitespaces in the harvestBlocks attribute. What help do you need on containerItem and information?
Just give me a quick example of both, please. I just don't know how to use them.
This is what I have for growing a sheep's wool. I want it to activate when the mob is a sheep. If true, I want it to grow wool and deplete a Wool Fertilizer. What's wrong? I'm not getting an error but it is not working.
This is what I have for growing a sheep's wool. I want it to activate when the mob is a sheep. If true, I want it to grow wool and deplete a Wool Fertilizer. What's wrong? I'm not getting an error but it is not working.
it should be
if (living.getName() == "Sheep")
{
living.growSheepWool();
itemstack.setStackSize(itemstack.getStackSize() - 1);
}
Rollback Post to RevisionRollBack
I'm on twitter: @CubeX2_. Follow me for upcoming features and other stuff ;).
I don't know if that's the extent of your problems, but it's a good place to start. I didn't see any other errors, but I admittedly just skimmed it since I'm short on time atm.
Hope that helps you.
I'm personally just going to wait until CubeX2 has metadata-enabled slabs so I don't have to part mine out more than necessary. Hopefully that'll be in the next version.
@CubeX2: I'll probably just wait on adding the chests then. Thanks for letting me know.
The current error is probably caused because "gwydion-mudslab1ID" is not a valid variable name but "gwydion_mudslab1ID" would be valid if I remember correctly. Also, the textureFile attribute is NOT an array attribute, so the [0] might cause problems as well.
What Alvoria said about the drop attribute is correct, but might as well go all the way in case you didn't notice when CubeX2 posted about it.
Make sure to test if you need drop[8] too in case ceiling slabs drop ceiling slabs instead.
I knew I could count on you 2 to tell me where I went wrong. It was in deed the missing [0] on drop, the "-" in the variable name, the addition of [0] on the texture file attribute, and I also capitalized a texture index attribute when it is should have been lower case. Now I can continue updating.
I'm doing a translucent texture, but when I go to the game, it is not transparent.
What to do?
The transparent attribute is for when you can already see through the block such as glass where the texture is completely see-through. The attribute to make something like ice is semiTransparent. Also, currently the values for tileTransparent is the opposite of what they should be (unless cubex2 secretly updated it) so if you want it to tile like glass, you should set it to true until the next update.
That should cause your block to look like ice.
P.S. This is a great mod, and so are your others, keep up the great work. All modders should be appreciated more.
mod.addSmeltingRecipeFor("s", 5, 5001);
usedRecipeLists = "s";
Correction; they are not vanishing they just end up back in your inventory. They seem to stay after the second deposit though.
I wrote this for effective and harvestBlocks but it crashed:
Here's the whole file if necessary:
I am having a similar problem. They don't stay on the second try sometimes take 5 or 6. Or place them and save world to keep them in the chest. Can only shift click items to the first page, any other page and they go to the first page anyway. Any Suggestions?
It looks pretty good.
So does the fuel works and the smelting recipe not?
You have to use the 'chestBlock' type for the tile entity if you don't use the 'chest' block type.
The shift click issue is fixed now. The other problem happens because of the huge amount of slots in the chest. You have to wait a few seconds before using it when loading the world. In the current update, the time between closing and opening again to work correct should be decreased.
You have to remove the whitespaces in the harvestBlocks attribute. What help do you need on containerItem and information?
Just give me a quick example of both, please. I just don't know how to use them.
The containerItem is the item that remains when you use it in crafting. Like an empty bucket remains if you craft a cake with a milk bucket.
onUseOnEntity = "getName(Sheep)(living.growSheepWool(); removeFromSlot(getCurrentSlot(), 1););";
This is what I have for growing a sheep's wool. I want it to activate when the mob is a sheep. If true, I want it to grow wool and deplete a Wool Fertilizer. What's wrong? I'm not getting an error but it is not working.
it should be
So does this mean I need to run a script file?
You can also put it in one line:
Alright, thanks.