I have exactly the same issue, the tools are "unnamed"... If I change some things in the file, it has a name but does not work... And, in both cases, nothing shows up in the Creative tab.
I also have the unnamed problem. Apparently, if you use maxDamage, the item becomes "Unnamed" because it is looking for the name in the wrong location.
On the other hand, adding items to creative works just find for me, though I haven't tested adding things to a custom creative tab.
@CubeX2 - I have noticed that the problem with the 2nd [1] metadata of an torch showing up in NEI seems to apply to all blocks and even items now. For some reason, when you use addToCreative[0] = false for an item or block, the 2nd metadata will show up in NEI even if that block/item metadata doesn't exist.
I also have the unnamed problem. Apparently, if you use maxDamage, the item becomes "Unnamed" because it is looking for the name in the wrong location.
On the other hand, adding items to creative works just find for me, though I haven't tested adding things to a custom creative tab.
@CubeX2 - I have noticed that the problem with the 2nd [1] metadata of an torch showing up in NEI seems to apply to all blocks and even items now. For some reason, when you use addToCreative[0] = false for an item or block, the 2nd metadata will show up in NEI even if that block/item metadata doesn't exist.
In my current dev version this doesn't happen. I can set addToCreative[0] = false and the 2nd metadata won't show up. I have either fixed it between the last release and now or I'm not able to reproduce it. Could you post the file of a block that does this strange thing.
Rollback Post to RevisionRollBack
I'm on twitter: @CubeX2_. Follow me for upcoming features and other stuff ;).
In my current dev version this doesn't happen. I can set addToCreative[0] = false and the 2nd metadata won't show up. I have either fixed it between the last release and now or I'm not able to reproduce it. Could you post the file of a block that does this strange thing.
Currently using:
Minecraft 1.5.2
Forge 7.7.1.611
CodeChickenCore 0.8.6.4
NEI 1.5.2.11
Custom Stuff 0.10.2b
All blocks and items seem to currently do this, but here are some of the files I have tested:
cobaltElecTorchOn.js (torch type)
Note that on all 4 of these, setting addToCreative to true causes the non-existent metadata block/item to be removed from NEI
I will update Not Enough Items to see if that makes any difference and update this post.
Edit: Updating to CCC 0.8.6.15 and NEI 1.5.2.25 did not fix the problem, so either you fixed the problem in your dev build or there is something else in my blocks/items that seems to attribute to the problem.
Interestingly, grabbing the non-existent metadata item will give you the item with no crash, but the item will be invisible, not even showing the missing texture image that shows up in Not Enough Items.
I think this is a bug in the current version of CS2 that people have brought up a few times. Hopefully it will get fixed in the next version, but I don't remember if CubeX2 said anything about this bug so there is no telling. =\
Edit: @CubeX2 - Once you have added Thaumcraft 2 support to CS2, would it be possible to add plants to what the straw golem will try harvesting? Of course, you would also need to add a way of telling the smart straw golem how to replant the plants (which item to use). Also, it would be nice to be able to specify if the golems should only take the top block (like sugar cane) or to start from the bottom (wheat/flax). I would love to be able to use straw golems to automate a custom plant farm. =P
if(itemstack.getIntData("repairCounter") >= 100 && itemstack.getDamage() > 0) {
//triggers every 5 seconds (100/20=5) but only if the item is undamaged
itemstack.setDamage(itemstack.getDamage() - 1);
}
You used the wrong type of quotes in your test sword item file when calling the script. If you used double quotes for the trigger, then you need to use single quotes for all strings such as file names that are within the trigger. Here is the fixed version as an example:
onUpdate = "mod.loadScript('auto-repair.js');";
On your auto-repair.js, you need to add a statement to increment the repairCounter variable by one. Also, you need to include a line somewhere that will reset the repairCounter to 0 regardless of if the item is damaged, unless you set the item to only increment repairCounter when the item is already damaged.
I'm fairly well when it comes to adding items, blocks or whatever (you learn while you do )
Still I got my roblems when it comes to more complex things... :/
My Error after editing things:
TestSword.js (located in /items)
id = config.getItemId("TestSwordID");
name[0] = "TestSword";
displayName[0] = "TestSword";
And could you give me an example for the script??? please... :/I read what you wrote, but I really don't understand that much xD sry dude.... but thanks for helping everyone out here, it's so good to know you're still around all the time when it comes to this mod
The problem now is that the metadata tag [0] on several of the attributes should not be there. If you are using the documentation, the attribute pages that show [0] or [31] in them require them while the ones that do not have the metadata tag do not. It would probably make more sense to look at the examples on the wiki though. I have already updated the item-type pages to use the current syntax.
Here is the corrected form of your test sword item file: (The order I put it in isn't require, it just helps me think)
As for the script example, here is basically what I was suggesting:
if(itemstack.getIntData("repairCounter") >= 100) {
//triggers ever 5 seconds (100/20=5)
itemstack.setIntData("repairCounter", 0); //resets counter regardless of damage
if(itemstack.getDamage() > 0) {
//Only triggers if item is damaged and previous if statement succeeded
itemstack.setDamage(itemstack.getDamage() - 1);
}
} else {
itemstack.setIntData("repairCounter", itemstack.getIntData("repairCounter") + 1);
}
Hopefully that helps. I am sorry if I confuse you with the English. I am trying to give hints and tips without just giving the answers. I love scripting so I am happy to help out with fun projects like this.
@CubeX2 - Once you have added Thaumcraft 2 support to CS2, would it be possible to add plants to what the straw golem will try harvesting? Of course, you would also need to add a way of telling the smart straw golem how to replant the plants (which item to use). Also, it would be nice to be able to specify if the golems should only take the top block (like sugar cane) or to start from the bottom (wheat/flax). I would love to be able to use straw golems to automate a custom plant farm. =P
Yes, it will be possible. I have to make a new item type for it to work, though. So expect an plantable item type that can be used to create wheat or sugar cane like plants.
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at cubex2.cs2core.InformationFile.create(InformationFile.java:55)
at cubex2.cs2core.CustomStuff2Core.postInit(CustomStuff2Core.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:186)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:166)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:103)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:696)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:213)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:448)
at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56)
at net.minecraft.client.Minecraft.run(Minecraft.java:733)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 992c9b78 ----------
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at cubex2.cs2core.InformationFile.create(InformationFile.java:55)
at cubex2.cs2core.CustomStuff2Core.postInit(CustomStuff2Core.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:186)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:166)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:103)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:696)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:213)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:448)
at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56)
at net.minecraft.client.Minecraft.run(Minecraft.java:733)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 992c9b78 ----------
It did not happen before the update..
Okay, try 0.10.3b.
Rollback Post to RevisionRollBack
I'm on twitter: @CubeX2_. Follow me for upcoming features and other stuff ;).
Just curious of
Is it possible to make some apis that allows some other make
plugins which can hook their own events / function / attribution to cs2?
I don't know about programing very much
But I think
In this way , it can reduce the works you have to do by letting some other do it themselves .
There are too many mods in mc
And I though you won't have enough time to make every mod supported.
Besides , some function requested can be made by wrap the old function easily.
Ask this just for curious
If you feel I am rude , please forgive me
Rollback Post to RevisionRollBack
I hate anyone asking questions without trying to find answer by himself. It does not only waste our time,but also waste his.
Can someone post pictures of the thickness[0]: attribute in action? I want to see what it looks like to understand if I can make use of it.
@CubeX2 (or anyone who edits the documentation): Do you mind adding examples to the documentation such as in hardness, you could say dirt is x, stone is x, obsidian is x, etc. or in harvestLevel, which level belongs to each of the vanilla tools, and possibly even pictures of it in action? I can provide the pictures if you'd like.
Can someone post pictures of the thickness[0]: attribute in action? I want to see what it looks like to understand if I can make use of it.
@CubeX2 (or anyone who edits the documentation): Do you mind adding examples to the documentation such as in hardness, you could say dirt is x, stone is x, obsidian is x, etc. or in harvestLevel, which level belongs to each of the vanilla tools, and possibly even pictures of it in action? I can provide the pictures if you'd like.
dirt , wood..etc - hand 0
stone..etc - wooden pickaxe 1
gold ore..etc - iron pickaxe 2
obsidian - diamond pickaxe 3
As I know
No absolutely correct
Rollback Post to RevisionRollBack
I hate anyone asking questions without trying to find answer by himself. It does not only waste our time,but also waste his.
Hey there CubeX2!!
When trying out the updated version: customStuff2-0.10.3b-universal I won't even get into my Minecraft any more :/
Here's the Error-log
last part:
java.lang.NullPointerException
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1056)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:870)
at net.minecraft.client.Minecraft.run(Minecraft.java:759)
at java.lang.Thread.run(Unknown Source)
the whole error message:
---- Minecraft Crash Report ----
// Everything's going to plan. No, really, that was supposed to happen.
java.lang.NullPointerException
at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1056)
at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:870)
at net.minecraft.client.Minecraft.run(Minecraft.java:759)
at java.lang.Thread.run(Unknown Source)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
Just curious of
Is it possible to make some apis that allows some other make
plugins which can hook their own events / function / attribution to cs2?
I don't know about programing very much
But I think
In this way , it can reduce the works you have to do by letting some other do it themselves .
There are too many mods in mc
And I though you won't have enough time to make every mod supported.
Besides , some function requested can be made by wrap the old function easily.
Ask this just for curious
If you feel I am rude , please forgive me
I've already thought about doing an API and I'm sure I'll do it. Of course other things have priority first.
Can someone post pictures of the thickness[0]: attribute in action? I want to see what it looks like to understand if I can make use of it.
@CubeX2 (or anyone who edits the documentation): Do you mind adding examples to the documentation such as in hardness, you could say dirt is x, stone is x, obsidian is x, etc. or in harvestLevel, which level belongs to each of the vanilla tools, and possibly even pictures of it in action? I can provide the pictures if you'd like.
I also have the unnamed problem. Apparently, if you use maxDamage, the item becomes "Unnamed" because it is looking for the name in the wrong location.
On the other hand, adding items to creative works just find for me, though I haven't tested adding things to a custom creative tab.
@CubeX2 - I have noticed that the problem with the 2nd [1] metadata of an torch showing up in NEI seems to apply to all blocks and even items now. For some reason, when you use addToCreative[0] = false for an item or block, the 2nd metadata will show up in NEI even if that block/item metadata doesn't exist.
In my current dev version this doesn't happen. I can set addToCreative[0] = false and the 2nd metadata won't show up. I have either fixed it between the last release and now or I'm not able to reproduce it. Could you post the file of a block that does this strange thing.
Currently using:
Minecraft 1.5.2
Forge 7.7.1.611
CodeChickenCore 0.8.6.4
NEI 1.5.2.11
Custom Stuff 0.10.2b
All blocks and items seem to currently do this, but here are some of the files I have tested:
cobaltElecTorchOn.js (torch type)
cobaltOre.js (normal type)
debugStick.js (normal type)
cobaltAxe.js //while testing maxDamage problem
I will update Not Enough Items to see if that makes any difference and update this post.
Edit: Updating to CCC 0.8.6.15 and NEI 1.5.2.25 did not fix the problem, so either you fixed the problem in your dev build or there is something else in my blocks/items that seems to attribute to the problem.
Interestingly, grabbing the non-existent metadata item will give you the item with no crash, but the item will be invisible, not even showing the missing texture image that shows up in Not Enough Items.
The author seems to have gone and the mod is under CC BY-NC-SA 3.0 so it's fair game to fix.
For some reason the items in inventory/hand all look the same, but in world they look correct (http://hanfox.co.uk/...-mc/cs_wood.png).
All the code is here: http://hanfox.co.uk/bunyanColoredWood/
BDcraft.net BDcraft Web Admin
I think this is a bug in the current version of CS2 that people have brought up a few times. Hopefully it will get fixed in the next version, but I don't remember if CubeX2 said anything about this bug so there is no telling. =\
Edit:
@CubeX2 - Once you have added Thaumcraft 2 support to CS2, would it be possible to add plants to what the straw golem will try harvesting? Of course, you would also need to add a way of telling the smart straw golem how to replant the plants (which item to use). Also, it would be nice to be able to specify if the golems should only take the top block (like sugar cane) or to start from the bottom (wheat/flax). I would love to be able to use straw golems to automate a custom plant farm. =P
Unless you're already aware: http://141.28.27.36:8080/job/IC2_lf/?
As I know
Ic2 is rewriting their api due to the old one is too messy
So cubeX2 may be correct
You used the wrong type of quotes in your test sword item file when calling the script. If you used double quotes for the trigger, then you need to use single quotes for all strings such as file names that are within the trigger. Here is the fixed version as an example:
On your auto-repair.js, you need to add a statement to increment the repairCounter variable by one. Also, you need to include a line somewhere that will reset the repairCounter to 0 regardless of if the item is damaged, unless you set the item to only increment repairCounter when the item is already damaged.
The problem now is that the metadata tag [0] on several of the attributes should not be there. If you are using the documentation, the attribute pages that show [0] or [31] in them require them while the ones that do not have the metadata tag do not. It would probably make more sense to look at the examples on the wiki though. I have already updated the item-type pages to use the current syntax.
Here is the corrected form of your test sword item file: (The order I put it in isn't require, it just helps me think)
As for the script example, here is basically what I was suggesting:
Yes, it will be possible. I have to make a new item type for it to work, though. So expect an plantable item type that can be used to create wheat or sugar cane like plants.
I've looked at it, but it is not a priority at the moment.
at java.lang.String.substring(Unknown Source)
at cubex2.cs2core.InformationFile.create(InformationFile.java:55)
at cubex2.cs2core.CustomStuff2Core.postInit(CustomStuff2Core.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:494)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:186)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:166)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:103)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:696)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:213)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:448)
at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56)
at net.minecraft.client.Minecraft.run(Minecraft.java:733)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 992c9b78 ----------
It did not happen before the update..
Okay, try 0.10.3b.
It works now, thanks! I'm glad to see NEI support is back!
Just curious of
Is it possible to make some apis that allows some other make
plugins which can hook their own events / function / attribution to cs2?
I don't know about programing very much
But I think
In this way , it can reduce the works you have to do by letting some other do it themselves .
There are too many mods in mc
And I though you won't have enough time to make every mod supported.
Besides , some function requested can be made by wrap the old function easily.
Ask this just for curious
If you feel I am rude , please forgive me
@CubeX2 (or anyone who edits the documentation): Do you mind adding examples to the documentation such as in hardness, you could say dirt is x, stone is x, obsidian is x, etc. or in harvestLevel, which level belongs to each of the vanilla tools, and possibly even pictures of it in action? I can provide the pictures if you'd like.
dirt , wood..etc - hand 0
stone..etc - wooden pickaxe 1
gold ore..etc - iron pickaxe 2
obsidian - diamond pickaxe 3
As I know
No absolutely correct
I can't see anything related to CS2. Are you sure this is caused by CS2?
I've already thought about doing an API and I'm sure I'll do it. Of course other things have priority first.
Here you go:
thickness from left to right: 0.25, 0.5, 0.75.
I'll add some examples to these attributes.
Thank you very much