1

Error with this.setBlockName and others

_Jxcob's Avatar _Jxcob9/1/14 9:29 am
1 emeralds 780 8
9/1/2014 10:06 am
_Jxcob's Avatar _Jxcob
Hey, I have problem with blocks

If I will write this:
this.setBlockName("Ruby Ore");
or
this.setHardness(4f);
etc.

I have errors like this:
The method setBlockName(String) is undefined for BlockRubyOre
Any1 will tell me why?

(Become so after recompile mod)
Posted by _Jxcob's Avatar
_Jxcob
Level 1 : New Modder
11

Create an account or sign in to comment.

8

_Jxcob
09/01/2014 10:06 am
Level 1 : New Modder
_Jxcob's Avatar
Ehh...

1
dunem666
09/01/2014 9:57 am
Level 44 : Master Network
dunem666's Avatar
replace your blockfloortile with ruby ore, i edited a example quickly. this is 1.7.10
1
dunem666
09/01/2014 9:56 am
Level 44 : Master Network
dunem666's Avatar
public static Block RubyOre = new BlockFloortile1(Material.rock).setBlockName("rubyore").setHardness(8.0F).setStepSound(Block.soundTypeStone).setResistance(6.0F).setCreativeTab(yourtabname);;


package yourpackagenamehere;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;

public class rubyore extends Block {

public rubyore(Material material) {
super(material);
this.setCreativeTab(CreativeTabs.tabYOURCTABNAMEHERE);

}

public void registerBlockIcons(IIconRegister iconRegister) {
blockIcon = iconRegister.registerIcon("yourmodname:rubyore");
}
}
1
dunem666
09/01/2014 9:53 am
Level 44 : Master Network
dunem666's Avatar
whats are you making here?

a forge mod block? or another mod launcher?
1
_Jxcob
09/01/2014 9:55 am
Level 1 : New Modder
_Jxcob's Avatar
I am making a forge mod block
1
TheXFactor117
09/01/2014 9:35 am
Level 60 : High Grandmaster Programmer
TheXFactor117's Avatar
Use this instead:

public RubyOre()
{
setBlockName("RubyOre");
}
1
_Jxcob
09/01/2014 9:39 am
Level 1 : New Modder
_Jxcob's Avatar
Don't work
1
MonarchOfMadness
09/01/2014 9:32 am
Level 55 : Grandmaster Grump
MonarchOfMadness's Avatar
Are you using mods?

Never mind I think I see you are making a mod...
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome