Is there a way in CS2 to make blocks transparent? I'm trying to make glass, but I can see through whatever block I place it against and using transparent[] = true; isn't working.
EDIT: nevermind, it's just not an array attribute... :I If anyone else was wondering how to do this, you just use transparent = true;
EDIT2: Ok, so new question. Is there a way to make it not render the side of the block next to it if the block next to it is also transparent? :C
Is there a way in CS2 to make blocks transparent? I'm trying to make glass, but I can see through whatever block I place it against and using transparent[] = true; isn't working.
EDIT: nevermind, it's just not an array attribute... :I If anyone else was wondering how to do this, you just use transparent = true;
EDIT2: Ok, so new question. Is there a way to make it not render the side of the block next to it if the block next to it is also transparent? :C
In response to EDIT2:
Yes, you must set tileTransparent[] = false; examples and pictures for this are provided in the documentation download for further help.
In response to EDIT2:
Yes, you must set tileTransparent[] = false; examples and pictures for this are provided in the documentation download for further help.
If it's not too much trouble, could I get a little bit of assistance here?
My game keeps crashing at startup, and I can't seem to figure out why exactly.
My code:
mod.js
---- Minecraft Crash Report ----
// Shall we play a game?
Time: 9/2/13 5:35 PM
Description: Initializing game
org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (mod.js#41)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1473)
at script(mod.js:41)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)
at org.mozilla.javascript.Context.evaluateReader(Context.java:1110)
at cubex2.cs2.DefaultMod.init(DefaultMod.java:132)
at cubex2.cs2.ModLoader.initMods(ModLoader.java:41)
at cubex2.cs2.CustomStuff2.postInit(CustomStuff2.java:85)
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:540)
at sun.reflect.GeneratedMethodAccessor1.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:313)
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:194)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)
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:313)
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:105)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:701)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:231)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:506)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
at net.minecraft.client.main.Main.main(SourceFile:101)
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 net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
Caused by: java.lang.NullPointerException
at cubex2.cs2.util.GeneralHelper.getItemStack(GeneralHelper.java:66)
at cubex2.cs2.scripting.ScriptableMod.addSmeltingRecipe_do(ScriptableMod.java:604)
at cubex2.cs2.scripting.ScriptableMod.addSmeltingRecipe(ScriptableMod.java:583)
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 org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
... 47 more
Rollback Post to RevisionRollBack
This is a signature. You read it, then you go about your business.
If it's not too much trouble, could I get a little bit of assistance here?
My game keeps crashing at startup, and I can't seem to figure out why exactly.
My code:
mod.js
---- Minecraft Crash Report ----
// Shall we play a game?
Time: 9/2/13 5:35 PM
Description: Initializing game
org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (mod.js#41)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1473)
at script(mod.js:41)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)
at org.mozilla.javascript.Context.evaluateReader(Context.java:1110)
at cubex2.cs2.DefaultMod.init(DefaultMod.java:132)
at cubex2.cs2.ModLoader.initMods(ModLoader.java:41)
at cubex2.cs2.CustomStuff2.postInit(CustomStuff2.java:85)
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:540)
at sun.reflect.GeneratedMethodAccessor1.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:313)
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:194)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)
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:313)
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:105)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:701)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:231)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:506)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
at net.minecraft.client.main.Main.main(SourceFile:101)
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 net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
Caused by: java.lang.NullPointerException
at cubex2.cs2.util.GeneralHelper.getItemStack(GeneralHelper.java:66)
at cubex2.cs2.scripting.ScriptableMod.addSmeltingRecipe_do(ScriptableMod.java:604)
at cubex2.cs2.scripting.ScriptableMod.addSmeltingRecipe(ScriptableMod.java:583)
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 org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
... 47 more
Try setting up the config.getItemId() outside of the mod.addAlias(), like so
ironNugget = config.getItemId("nuggetIron");
mod.addAlias(ironNugget, "nuggetIron");
2 Suggestions:
1st: Could a way to insert stuff into other config files be added? Maybe with 2 different ways, one will just add a new line at the end of the file (useful for e.g. Forge Multipart block registering), the other way will let you specify a certain line (So if you type "54", it will insert whatever you say into line 54 and and everything after that line will be shifted down one line, of course)
2nd: Could you maybe add a way for a mod to support different localization files? Like vanilla Minecraft, with en_US or de_DE or es_AR etc. I would really appreciate that.
Keep on your nice work!
1. I'll see what I can do.
2. This is already a planned feature but one with a low priority.
The Meaning of Life, the Universe, and Everything.
Join Date:
1/15/2011
Posts:
100
Minecraft:
Pants_WP
Member Details
I have ran into another problem, for some reason my 'Ender Sword' is not rendering as an actually sword. It acts like a regular item and I have set toolClass to 'sword', but it just doesn't seem to register. I have also looked up on the wiki and the documentation and still no luck.
I am having trouble with the .addPotionEffect(). What is the string I am supposed to be using? I have am trying to make an Item to give the player Fire Resistance, and I have tried 'Fire Resistance', 'fire resistance', 'FireResistance', 12, and 3. None of them seem to work. Has anyone else gotten this to work?
I am having trouble with the .addPotionEffect(). What is the string I am supposed to be using? I have am trying to make an Item to give the player Fire Resistance, and I have tried 'Fire Resistance', 'fire resistance', 'FireResistance', 12, and 3. None of them seem to work. Has anyone else gotten this to work?
I think the string is supposed to be the name used in the source code. You can find an exact list on the official minecraft wiki found here under the "in the source code" section. I think you are supposed to skip "potion" in the string so the fire resistance effect should be the following:
player.addPotionEffect('fireResistance', 200, 1); //fire resist I for 10 seconds
Capitalization does matter for these. If the above doesn't work, then try potion.fireResistance, though that shouldn't be necessary. I hope that helps.
I think the string is supposed to be the name used in the source code. You can find an exact list on the official minecraft wiki found here under the "in the source code" section. I think you are supposed to skip "potion" in the string so the fire resistance effect should be the following:
player.addPotionEffect('fireResistance', 200, 1); //fire resist I for 10 seconds
Capitalization does matter for these. If the above doesn't work, then try potion.fireResistance, though that shouldn't be necessary. I hope that helps.
Thank you for your help, I got it working now. Funny thing is, I was looking at that page, but never noticed that table...
I have ran into another problem, for some reason my 'Ender Sword' is not rendering as an actually sword. It acts like a regular item and I have set toolClass to 'sword', but it just doesn't seem to register. I have also looked up on the wiki and the documentation and still no luck.
It seems the metadata changes everytime I hit an entity. So, for example, the root ID is 3761. Everytime I hit something it goes up by on, thus: 3761:1, 3761:2, 3761:3, etc.
It seems the metadata changes everytime I hit an entity. So, for example, the root ID is 3761. Everytime I hit something it goes up by on, thus: 3761:1, 3761:2, 3761:3, etc.
It seems that is fixed but the damage is still very low.
It seems that is fixed but the damage is still very low.
Metadata and damage are the same thing. You cannot use any metadata other than 0 on an item that has a maxUses attribute attached to it. This is not a bug, it is simply how the minecraft engine handes metadata. All vanilla blocks that use metadata use it the same way.
Also, as far as our ender sword goes, a lot of those attributes need a metadata value to work properly, even if they do not throw an error for not having one. And don't use damage[]; use one of the lines from my earlier post about damage. I believe it's about halfway down 318 or 319. If all else fails, I'll be posting updated examples on the wiki when I get home. (Sorry for any misspellings, it's 2:30 am local time, I'm at work, and this is an iPod touch.)
The Meaning of Life, the Universe, and Everything.
Join Date:
4/3/2012
Posts:
48
Minecraft:
killergoonie
Xbox:
Thekillergoonie
Member Details
just saying but i love your multi-page chest. i use it all the time since useful chest hasn't updated since 1.5.2 i think. but i was wondering is there any chance that you can add a sort button on it? i mean the useful chest had the sort button to put the items in id order which was really helpful, if you can't i understand but it would make this mod like 50% better.
EDIT: nevermind, it's just not an array attribute... :I If anyone else was wondering how to do this, you just use transparent = true;
EDIT2: Ok, so new question. Is there a way to make it not render the side of the block next to it if the block next to it is also transparent? :C
In response to EDIT2:
Yes, you must set tileTransparent[] = false; examples and pictures for this are provided in the documentation download for further help.
Oh. I tried setting it to true. Thanks!
My game keeps crashing at startup, and I can't seem to figure out why exactly.
My code:
mod.js
//Default Ids
config.addItemIdProperty("nuggetIron",7000);
config.addItemIdProperty("armorWoolBeanie",7001);
config.addItemIdProperty("armorWoolShirt",7002);
config.addItemIdProperty("armorWoolBritches",7003);
config.addItemIdProperty("armorWoolBooties",7004);
config.addItemIdProperty("mutton",7005);
mod.addItem("nuggetIron.js", "normal");
mod.addItem("armorWoolBeanie.js", "armor");
mod.addItem("armorWoolShirt.js", "armor");
mod.addItem("armorWoolBritches.js", "armor");
mod.addItem("armorWoolBooties.js", "armor");
mod.addItem("mutton.js", "food");
mod.addMobDrop(91, config.getItemId("mutton"), 2, .75);
//Aliases
mod.addAlias(265, "ingotIron");
mod.addAlias(66, "rail");
mod.addAlias(101, "ironBars");
mod.addAlias(35, "wool");
mod.addAlias(config.getItemId("nuggetIron"), "nuggetIron");
mod.addAlias(config.getItemId("armorWoolBeanie"), "beanie");
mod.addAlias(config.getItemId("armorWoolShirt"), "shirt");
mod.addAlias(config.getItemId("armorWoolBritches"), "britches");
mod.addAlias(config.getItemId("armorWoolBooties"), "booties");
//Crafting Recipes
mod.addShapelessRecipe("nuggetIron 9", "ingotIron");
mod.addRecipe("ingotIron", 3, 3, "nuggetIron", "nuggetIron", "nuggetIron", "nuggetIron", "nuggetIron", "nuggetIron", "nuggetIron", "nuggetIron", "nuggetIron");
mod.addRecipe("beanie", 3, 2, "wool", "wool", "wool", "wool", 0, "wool");
mod.addRecipe("shirt", 3, 3, "wool", 0, "wool", "wool", "wool", "wool", "wool", "wool", "wool");
mod.addRecipe("britches", 3, 3, "wool", "wool", "wool", "wool", 0, "wool", "wool", 0, "wool");
mod.addRecipe("booties", 3, 2, "wool", 0, "wool", "wool", 0, "wool");
//Smelting Recipes
mod.addSmeltingRecipe("nuggetIron 3", "rail");
mod.addSmeltingRecipe("nuggetIron 3", "ironBars");
mod.addSmeltingRecipe("mutton:1", "mutton:0");
---- Minecraft Crash Report ----
// Shall we play a game?
Time: 9/2/13 5:35 PM
Description: Initializing game
org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException (mod.js#41)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1473)
at script(mod.js:41)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)
at org.mozilla.javascript.Context.evaluateReader(Context.java:1110)
at cubex2.cs2.DefaultMod.init(DefaultMod.java:132)
at cubex2.cs2.ModLoader.initMods(ModLoader.java:41)
at cubex2.cs2.CustomStuff2.postInit(CustomStuff2.java:85)
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:540)
at sun.reflect.GeneratedMethodAccessor1.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:313)
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:194)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:174)
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:313)
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:105)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:701)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:231)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:506)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
at net.minecraft.client.main.Main.main(SourceFile:101)
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 net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
Caused by: java.lang.NullPointerException
at cubex2.cs2.util.GeneralHelper.getItemStack(GeneralHelper.java:66)
at cubex2.cs2.scripting.ScriptableMod.addSmeltingRecipe_do(ScriptableMod.java:604)
at cubex2.cs2.scripting.ScriptableMod.addSmeltingRecipe(ScriptableMod.java:583)
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 org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
... 47 more
Try setting up the config.getItemId() outside of the mod.addAlias(), like so
ironNugget = config.getItemId("nuggetIron");
mod.addAlias(ironNugget, "nuggetIron");
Doing that works for me, anyways.
Now, though, I have an issue with my crafting recipes not working correctly in-game.
For example, putting a block of stone in the crafting grid results in a single iron nugget, when my code is:
Have you actually crafted an iron nugget in this manner, or are you using a mod to see the recipes?
From what I've read on earlier posts, I believe so. Someone mentioned that the recipe shown was wrong, but thankfully non-functional.
Sigh...bye bye 42 posts...
1. I'll see what I can do.
2. This is already a planned feature but one with a low priority.
Yeah, I think I'll give the flat block type some volume.
Both will be implemented at some point.
You can not use that at the moment. The folder is just created because I missed to make it not create when I did a release.
At some point, yes.
I think I get bugfix 4 released tomorrow.
name = "enderSword";
creativeTab = "combat";
full3d = true;
toolClass = "sword";
harvestLevel = 3;
maxDamage = 1999;
displayName[0] = "Ender Sword";
addToCreative[0] = true;
damage[0] = 10;
efficiency[0] = 6.0;
onHitEntity[0] = "itemstack.damageItem(1);";
onBlockDestroyed[0] = "itemstack.damageItem(1);";
textureFile[0] = "/diamond_sword.png";
mod.addItem("enderSword.js", "normal");
# item
####################
item {
I:enderSword=3761
}
I think the string is supposed to be the name used in the source code. You can find an exact list on the official minecraft wiki found here under the "in the source code" section. I think you are supposed to skip "potion" in the string so the fire resistance effect should be the following:
Capitalization does matter for these. If the above doesn't work, then try potion.fireResistance, though that shouldn't be necessary. I hope that helps.
Thank you for your help, I got it working now. Funny thing is, I was looking at that page, but never noticed that table...
It seems the metadata changes everytime I hit an entity. So, for example, the root ID is 3761. Everytime I hit something it goes up by on, thus: 3761:1, 3761:2, 3761:3, etc.
It seems that is fixed but the damage is still very low.
Metadata and damage are the same thing. You cannot use any metadata other than 0 on an item that has a maxUses attribute attached to it. This is not a bug, it is simply how the minecraft engine handes metadata. All vanilla blocks that use metadata use it the same way.
Also, as far as our ender sword goes, a lot of those attributes need a metadata value to work properly, even if they do not throw an error for not having one. And don't use damage[]; use one of the lines from my earlier post about damage. I believe it's about halfway down 318 or 319. If all else fails, I'll be posting updated examples on the wiki when I get home. (Sorry for any misspellings, it's 2:30 am local time, I'm at work, and this is an iPod touch.)