Hello, im new to planet minecraft, im developing a mod about more building blocks to make more variety, well, im having problems with applying textures to the new blocks, there are five new blocks (of course y will put more blocks on new versions).
althrought i tried put the block textures on /minecraft/textures/blocks the textures dont work, i tried to put them outside, and in all the locations possible, but nothing, same missing texture.
im using modloader, here is my code
Code for Block classes:
althrought i tried put the block textures on /minecraft/textures/blocks the textures dont work, i tried to put them outside, and in all the locations possible, but nothing, same missing texture.
im using modloader, here is my code
package net.minecraft.src;
public class mod_lolmanbuilderAlpha1 extends BaseMod
{
public static final Block Cement = (new BlockCement(243).setHardness(3F).setResistance(60F).setLightValue(0F).setUnlocalizedName("Cement"));
public static final Block SmoothObsidian = (new BlockSmoothObsidian(245).setHardness(4F).setResistance(2000F).setLightValue(0F).setUnlocalizedName("SmoothObsidian"));
public static final Block SmoothEndstone = (new BlockSmoothEndstone(165).setHardness(4F).setResistance(60F).setLightValue(0F).setUnlocalizedName("SmoothEndstone"));
public static final Block NetherQuartzBricks = (new BlockNetherQuartzBricks(164).setHardness(1F).setResistance(20F).setLightValue(0F).setUnlocalizedName("NetherQuartzBricks"));
public static final Block EndstoneBrick = (new BlockEndstoneBrick(166).setHardness(2F).setResistance(20F).setLightValue(0F).setUnlocalizedName("EndstoneBrick"));
public void load()
{
ModLoader.registerBlock(Cement);
ModLoader.addName(Cement, "Block of cement");
ModLoader.registerBlock(SmoothObsidian);
ModLoader.addName(SmoothObsidian, "Smooth Obsidian");
ModLoader.registerBlock(SmoothEndstone);
ModLoader.addName(SmoothEndstone, "Smooth Endstone");
ModLoader.registerBlock(NetherQuartzBricks);
ModLoader.addName (NetherQuartzBricks, "Nether Quartz Bricks");
ModLoader.registerBlock(EndstoneBrick);
ModLoader.addName(EndstoneBrick, "Endstone Bricks");
}
public String getVersion() {
// TODO Auto-generated method stub
return null;
}
} Code for Block classes:
package net.minecraft.src;
import java.util.Random;
public class BlockName extends Block
{
public BlockName(int i)
{
super(i, Material.wood);
}
public int idDropped(int i, Random random, int j)
{ return mod_lolmanbuilderAlpha1.BlockName.blockID; }
public int quantityDropped(Random random)
{
return 1;
}
}
8
Thanks, finally resolved my problem, I was misplacing textures and some coding errors.
I wont change to forge, it doesnt have compatibility and i prefer modloader on all aspects.
Otherwise im going to learn to create a block instance , and more things, because my mod is going to have also special blocks (slabs,fences,stairs), just is my first "prototype" of a mod
I wont change to forge, it doesnt have compatibility and i prefer modloader on all aspects.
Otherwise im going to learn to create a block instance , and more things, because my mod is going to have also special blocks (slabs,fences,stairs), just is my first "prototype" of a mod
www.Youtube.com/Darnmyhat
I have recently done a tutorial for new blocks and items :3
If that one doesn't help you I have tonnes more that will.
Also, If they are basic blocks, IE cement just being a hard block, Why make a new file for it?
just create a new block instance not blockcement, no need for a whole new file for a basic block :p
I have recently done a tutorial for new blocks and items :3
If that one doesn't help you I have tonnes more that will.
Also, If they are basic blocks, IE cement just being a hard block, Why make a new file for it?
just create a new block instance not blockcement, no need for a whole new file for a basic block :p
1) Change to forge
2) Use meta-data for them (Google some tutorials)
Now for your question
Dont use the above methods
Dont create 100's of new block files, rather use
TerraBricks = new Block(2004, Material.rock).setStepSound(Block.soundPowderFootstep).setHardness(2.1F).setResistance(10.0F).setCreativeTab(AthariaMod.Blocks).setUnlocalizedName("TerraBricks");
2) Use meta-data for them (Google some tutorials)
Now for your question
Dont use the above methods
Dont create 100's of new block files, rather use
TerraBricks = new Block(2004, Material.rock).setStepSound(Block.soundPowderFootstep).setHardness(2.1F).setResistance(10.0F).setCreativeTab(AthariaMod.Blocks).setUnlocalizedName("TerraBricks");
i need to put it once, or duplicate it to register every block
and a stupid question:
BlockIcon need to be changed to a MyBlockNameIcon or just leave it?
and a stupid question:
BlockIcon need to be changed to a MyBlockNameIcon or just leave it?
leave it
u need to put this code into every block class, and items too, but they a have a little different code (just change block icon to item icon)
u need to put this code into every block class, and items too, but they a have a little different code (just change block icon to item icon)
see if this code works
put this in the block's class file -
and put the textures in the "textures" folder in ur mod in the src folder
put this in the block's class file -
public void registerIcons(IconRegister reg) {
this.blockIcon = reg.registerIcon("mod_Name:PicName");
}
and put the textures in the "textures" folder in ur mod in the src folder
i dont like forge too much, because forge mods are not compatible with modloader, and i use lots of modloader mods
You shoud use forge, but have you tried to put the texture files in the texture folder and not yous rigth in the jar, I have exsperinsed that somthimes
