1

Help with mod textures

seba24000 6/19/13 3:42 pm
293
6/19/2013 7:53 pm
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

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;
}
}
Posted by
seba24000
Level 1 : New Miner
0

  Have something to say?

JoinSign in

8

seba24000
06/19/2013 7:53 pm
Level 1 : New Miner
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
1
HyJaffa
06/19/2013 7:43 pm
Level 43 : Master Modder
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
1
duke_Frans
06/19/2013 7:03 pm
Level 66 : High Grandmaster Modder
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");
1
seba24000
06/19/2013 5:37 pm
Level 1 : New Miner
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?
1
Nulcheck
06/19/2013 6:23 pm
Level 34 : Artisan Modder
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)
1
Nulcheck
06/19/2013 5:01 pm
Level 34 : Artisan Modder
see if this code works

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
1
seba24000
06/19/2013 3:50 pm
Level 1 : New Miner
i dont like forge too much, because forge mods are not compatible with modloader, and i use lots of modloader mods
1
MrViolentPotion
06/19/2013 3:48 pm
Level 12 : Journeyman Modder
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
1

Welcome