OK, I have stairs, the problem is that I can't get my own texture on them as you can see here:
My Block code:
import java.util.Random;
public class BlockName extends BlockStairs
{
public BlockName(int i, int j)
{
super(i, Block.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_Name.Name.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
return false;
}
public int getRenderType()
{
return 10;
}
}
With names changed to Name, so if anyone knows what to do please tell me.
OK, I have stairs, the problem is that I can't get my own texture on them as you can see here:
My Block code:
import java.util.Random;
public class BlockName extends BlockStairs
{
public BlockName(int i, int j)
{
super(i, Block.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_Name.Name.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
return false;
}
public int getRenderType()
{
return 10;
}
}
With names changed to Name, so if anyone knows what to do please tell me.
Post your mod_ class please.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
package net.minecraft.src;
public class mod_Name extends BaseMod
{
public static Block Name = new BlockName(224, 0).setHardness(1.0F).setResistance(2.0F).setBlockName("Name");
public String getVersion()
{
return "1.1.0";
}
public mod_Name()
{
}
public void load()
{
ModLoader.RegisterBlock(Name);
Name.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Koadmod/FS.png");
ModLoader.AddName(Name, "Stairs");
ModLoader.AddRecipe(new ItemStack(Name, 1), new Object[]
" # ", Character.valueOf('#'), Block.dirt
});
}
}
I think I must have done something wrong, as when I change the "super(i, Block.wood);" line so that it reads: "super(i, Block.stone);" it will change the stair block so that it looks like stone.
And sorry to put you on the spot, I know that you will do a tutorial on this eventually, but I feel as though I am close.
Chill out :tongue.gif: . I posted a tutorial here because people requested it ages ago and you didn't make a tutorial on it + I didn't find any on the internet at all. So I posted it here because people wanted to know it here...
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
But I have that already, except that it [my PNG] is in a folder, but that shouldn't make a difference as I have made some other blocks that are linked to PNGs in a folder and it worked fine for them.
Actually I think that my problem is bigger then that, because if I change this line: "super(i, Block.wood);" to this "super(i, Block.pumpkin);" I will get pumpkin steps :blink.gif:
but the lighting is off. So I have no idea what I am doing, so I will wait for a tutorial on this topic.
Edit: couldn't stop thinking about it, so I did more testing and I have figured out that my override isn't working (although it will still say: 'Overriding /terrain.png with /Koadmod/name' when I run startclient) as whenever I change the "super(i, Block.whatever);" it will change the texture to the texture of the block that I use to replace 'whatever', but in the process I got a cool picture:
It is glowstone stairs! They don't give off light though, but it looks cool at night.
package net.minecraft.src;
public class mod_supersword extends BaseMod {
public static final Item supersword = new supersword(5000).setItemName("Super Sword"); public void load() { supersword.iconIndex = ModLoader.addOverride("/gui/items.png","/skupy/supersword.png");ModLoader.AddName(supersword, "Super Sword"); ModLoader.AddRecipe(new ItemStack(supersword, 1), new Object [] {"#", "*", "#", Character.valueOf('#'), Item.diamond, Character.valueOf('*'), Item.stick}); }
public String getVersion() {
return "1.1";
} }
supersword:
package net.minecraft.src;
public class supersword extends Item {
public ItemNamehere(int i) {
super(i);
maxStackSize = 1;
} }
java.lang.ClassFormatError: Incompatible magic value 1885430635 in class file mod_supersword
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ModLoader.addMod(ModLoader.java:264)
at ModLoader.readFromModFolder(ModLoader.java:1305)
at ModLoader.init(ModLoader.java:820)
at ModLoader.AddAllRenderers(ModLoader.java:189)
at afq.<init>(afq.java:80)
at afq.<clinit>(afq.java:9)
at net.minecraft.client.Minecraft.a(SourceFile:265)
at net.minecraft.client.Minecraft.run(SourceFile:648)
at java.lang.Thread.run(Unknown Source)
Feb 17, 2012 5:12:02 PM ModLoader init
FINE: Mod Loaded: "mod_ReiMinimap v3.0_01 [1.1]"
Feb 17, 2012 5:12:02 PM ModLoader init
FINE: Mod Loaded: "mod_TooManyItems 1.1 2012-01-12a"
Feb 17, 2012 5:12:02 PM ModLoader AddAllRenderers
FINE: Initialized
Could someone please help??
This is my first mod, so please, take it easy on me :3
EDIT: Tried moving the skupy folder into Minecraft.jar,
same error...
package net.minecraft.src;
public class mod_supersword extends BaseMod {
public static final Item supersword = new supersword(5000).setItemName("Super Sword"); public void load() { supersword.iconIndex = ModLoader.addOverride("/gui/items.png","/skupy/supersword.png");ModLoader.AddName(supersword, "Super Sword"); ModLoader.AddRecipe(new ItemStack(supersword, 1), new Object [] {"#", "*", "#", Character.valueOf('#'), Item.diamond, Character.valueOf('*'), Item.stick}); }
public String getVersion() {
return "1.1";
} }
supersword:
package net.minecraft.src;
public class supersword extends Item {
public ItemNamehere(int i) {
super(i);
maxStackSize = 1;
} }
java.lang.ClassFormatError: Incompatible magic value 1885430635 in class file mod_supersword
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ModLoader.addMod(ModLoader.java:264)
at ModLoader.readFromModFolder(ModLoader.java:1305)
at ModLoader.init(ModLoader.java:820)
at ModLoader.AddAllRenderers(ModLoader.java:189)
at afq.<init>(afq.java:80)
at afq.<clinit>(afq.java:9)
at net.minecraft.client.Minecraft.a(SourceFile:265)
at net.minecraft.client.Minecraft.run(SourceFile:648)
at java.lang.Thread.run(Unknown Source)
Feb 17, 2012 5:12:02 PM ModLoader init
FINE: Mod Loaded: "mod_ReiMinimap v3.0_01 [1.1]"
Feb 17, 2012 5:12:02 PM ModLoader init
FINE: Mod Loaded: "mod_TooManyItems 1.1 2012-01-12a"
Feb 17, 2012 5:12:02 PM ModLoader AddAllRenderers
FINE: Initialized
Could someone please help??
This is my first mod, so please, take it easy on me :3
EDIT: Tried moving the skupy folder into Minecraft.jar,
same error...
In your 'supersword' class, you still have the constructor called 'ItemNamehere', but you have the name of the class as 'supersword'. Change 'ItemNamehere' to 'supersword' and it should work.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
In your 'supersword' class, you still have the constructor called 'ItemNamehere', but you have the name of the class as 'supersword'. Change 'ItemNamehere' to 'supersword' and it should work.
Yea, tried that and it still doesn't work :\
How do you make it kill things instantly??
Well, then I believe the issue lies that you have your new class called supersword, and that is also the declared name of your item in your mod_ class. Use something like this:
package net.minecraft.src;
public class mod_supersword extends BaseMod
{
public static final Item supersword = new ItemSuperSword(5000).setItemName("Super Sword");
public void load()
{
supersword.iconIndex = ModLoader.addOverride("/gui/items.png","/skupy/supersword.png");
ModLoader.AddName(supersword, "Super Sword");
ModLoader.AddRecipe(new ItemStack(supersword, 1), new Object [] {"#", "*", "#", Character.valueOf('#'), Item.diamond, Character.valueOf('*'), Item.stick});
}
public String getVersion()
{
return "1.1";
}
}
package net.minecraft.src;
public class ItemSuperSword extends Item
{
public ItemSuperSword(int i)
{
super(i);
maxStackSize = 1;
}
}
You should try and format your code like that too, it makes it a lot easier for people to read if you get errors.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I think that I did something wrong with my stairs code because, as I said, the override doesn't work and I can change one thing to change the look to any vanilla item. So I will wait for you to make the tutorial.
-Thank You-
I think that I did something wrong with my stairs code because, as I said, the override doesn't work and I can change one thing to change the look to any vanilla item. So I will wait for you to make the tutorial.
-Thank You-
Ok, it should be out today/tomorrow (depends on your time zone).
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I got a random question that i've asked around a lot and nobody seems to answer. I would like to know how to give a mob a walking animation. I used techne and it is 4 limbs basicly a biped but with a hunchback. Let me know if you have suggestions.
TechGuy543 I mean make a recipe with a custom item.
Like a custom item in the crafting for make other custom item or bock.
Thanks!
Well, say you have 2 items(these are just for example). You have a camera, and want to make it into a tripod with some iron as well. So you have your public static final lines
public static final Item Camera = new Item(2456).setItemName("camera");
public static final Item CameraOnTripod = new Item(2457).setItemName("camontripod");
For the recipe of the tripod with the camera on it, it would be:
I got a random question that i've asked around a lot and nobody seems to answer. I would like to know how to give a mob a walking animation. I used techne and it is 4 limbs basicly a biped but with a hunchback. Let me know if you have suggestions.
~~~Thanks~~~
This is what is used for the animation. Put it in your ModelNamehere code and change the names. Have a backup of your Model class first in case something goes wrong. It shouldn't, but just in case.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Well, say you have 2 items(these are just for example). You have a camera, and want to make it into a tripod with some iron as well. So you have your public static final lines
public static final Item Camera = new Item(2456).setItemName("camera");
public static final Item CameraOnTripod = new Item(2457).setItemName("camontripod");
For the recipe of the tripod with the camera on it, it would be:
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
If you're going to write tutorials. Make your own topic. Don't post on mine.
Post your mod_ class please.
together they are powerful beyond imagination."
OK, sure
And sorry to put you on the spot, I know that you will do a tutorial on this eventually, but I feel as though I am close.
~~Thanks~~~
You do it like that and just put the name of the biome from BiomeGenBase there. For multiple biomes, just separate with a comma.
KMeister originally showed me how to do this. :smile.gif:
So why couldn't you just put a simple link?
together they are powerful beyond imagination."
But I have that already, except that it [my PNG] is in a folder, but that shouldn't make a difference as I have made some other blocks that are linked to PNGs in a folder and it worked fine for them.
Actually I think that my problem is bigger then that, because if I change this line: "super(i, Block.wood);" to this "super(i, Block.pumpkin);" I will get pumpkin steps :blink.gif:
but the lighting is off. So I have no idea what I am doing, so
I will wait for a tutorial on this topic.Edit: couldn't stop thinking about it, so I did more testing and I have figured out that my override isn't working (although it will still say: 'Overriding /terrain.png with /Koadmod/name' when I run startclient) as whenever I change the "super(i, Block.whatever);" it will change the texture to the texture of the block that I use to replace 'whatever', but in the process I got a cool picture:
It is glowstone stairs! They don't give off light though, but it looks cool at night.
And how i put a custom item for be crafted ?
Srry for be too dumb...
You have great tuts for you !!!
I'm getting errors, somebody help :smile.gif:
mod_supersword:
supersword:
Could someone please help??
This is my first mod, so please, take it easy on me :3
EDIT: Tried moving the skupy folder into Minecraft.jar,
same error...
Nice :smile.gif:
You put it in the same folder like you would with an item's texture. So if you had an item texture override like this for example:
then you would have your mob texture line like this to put it in the same folder:
Changing all the names of course.
I'm not quite sure what you mean with the custom item crafting.
In your 'supersword' class, you still have the constructor called 'ItemNamehere', but you have the name of the class as 'supersword'. Change 'ItemNamehere' to 'supersword' and it should work.
together they are powerful beyond imagination."
Yea, tried that and it still doesn't work :\
How do you make it kill things instantly??
You should try and format your code like that too, it makes it a lot easier for people to read if you get errors.
together they are powerful beyond imagination."
-Thank You-
Ok, it should be out today/tomorrow (depends on your time zone).
together they are powerful beyond imagination."
Like a custom item in the crafting for make other custom item or bock.
Thanks!
Awesome! Now I will be able to see what I did wrong :biggrin.gif: Thanks for all the help already.
~~~Thanks~~~
Well, say you have 2 items(these are just for example). You have a camera, and want to make it into a tripod with some iron as well. So you have your public static final lines
For the recipe of the tripod with the camera on it, it would be:
Long story short, you just put the name you gave the item in the public static final line and use it in the recipe.
This is what is used for the animation. Put it in your ModelNamehere code and change the names. Have a backup of your Model class first in case something goes wrong. It shouldn't, but just in case.
together they are powerful beyond imagination."
Thanks!!!!
I might.
together they are powerful beyond imagination."