java - Minecraft Modding - Blocks taking the same name as each other -


hello stackoverflow community. having problem mod making minecraft, , reason, blocks taking names of eachother.

main mod class code involving blocks:

public static final block bloodstone = new blockbloodstone(160, 0).setcreativetab(creativetabs.tabblock).sethardness(5f).setresistance(6f).setstepsound(block.soundstonefootstep).getindirectpoweroutput("bloodstone"); /* conflict 1: */ public static final block darkstone = new blockdarkstone(161, 0).setcreativetab(creativetabs.tabblock).sethardness(5f).setresistance(6f).setstepsound(block.soundstonefootstep); /* conflict 1: */public static final block darkstonebrick = new blockdarkstonebrick(162, 0).setcreativetab(creativetabs.tabblock).sethardness(5f).setresistance(6f).setstepsound(block.soundstonefootstep); /* conflict 1: */ public static final block darkglowstone = new blockdarkglowstone(163, 0).setcreativetab(creativetabs.tabblock).sethardness(5f).setresistance(6f).setstepsound(block.soundstonefootstep).setlightvalue(0.8f); /* conflict 1: */ public static final block darkstonepillar = new blockdarkstonepillar(164).setcreativetab(creativetabs.tabblock).sethardness(5f).setresistance(6f).setstepsound(block.soundstonefootstep); /* conflict 1: */ public static final block darkstonesmooth = new block(165, block.stone.blockmaterial).setcreativetab(creativetabs.tabblock).sethardness(5f).setresistance(6f).setstepsound(block.soundstonefootstep).getindirectpoweroutput("darkstonetop"); /* conflict 1: */ public static final block darklog = new blockdarklog(166).setcreativetab(creativetabs.tabblock).sethardness(5f).setresistance(6f).setstepsound(block.soundstonefootstep); public static final block darkwood = new block(167, block.wood.blockmaterial).setcreativetab(creativetabs.tabblock).sethardness(5f).setresistance(6f).setstepsound(block.soundstonefootstep).getindirectpoweroutput("darkwood"); /* conflict 1: */ public static final block darkwoodfence = new blockfence(168, "darkwood", block.fence.blockmaterial).setcreativetab(creativetabs.tabdecorations); /* conflict 2: */ public static final block darkgrass = new blockdarkgrass(169, 0).setcreativetab(creativetabs.tabblock).sethardness(1f).setresistance(2f).setstepsound(block.soundgrassfootstep).getindirectpoweroutput("darkstonetop"); public static final block darkdirt = new block(170, block.dirt.blockmaterial).setcreativetab(creativetabs.tabblock).sethardness(1f).setresistance(2f).setstepsound(block.soundgrassfootstep).getindirectpoweroutput("darkdirt"); 

modloader.addname(bloodstone, "\u00a74bloodstone"); /* conflict 1 */ modloader.addname(darkstone, "\u00a78darkstone"); /* conflict 1 */ modloader.addname(darkstonebrick, "\u00a78dark stonebrick"); /* conflict 1 */ modloader.addname(darkglowstone, "\u00a78dark glowbrick"); modloader.addname(darkstonechunk, "\u00a78darkstone chunk"); modloader.addname(darkstoneingot, "\u00a78darkstone brick"); /* conflict 1 */ modloader.addname(darkstonepillar, "\u00a78darkstone pillar"); /* conflict 2 */ modloader.addname(darkstonesmooth, "\u00a78smooth darkstone"); /* conflict 1 */ modloader.addname(darklog, "\u00a78smooth dark log"); modloader.addname(darkwood, "\u00a78darkwood"); /* conflict 1 */ modloader.addname(darkwoodfence, "\u00a78darkwood fence"); /* conflict 2 */ modloader.addname(darkgrass, "\u00a78dark grass"); modloader.addname(darkdirt, "\u00a78dark dirt"); 

modloader.registerblock(bloodstone); /* conflict 1 */ modloader.registerblock(darkstone); /* conflict 1 */ modloader.registerblock(darkstonebrick); /* conflict 1 */ modloader.registerblock(darkglowstone); /* conflict 2 */ modloader.registerblock(darkstonesmooth); /* conflict 1 */ modloader.registerblock(darkstonepillar); /* conflict 1 */ modloader.registerblock(darklog); modloader.registerblock(darkwood); /* conflict 1 */ modloader.registerblock(darkwoodfence); /* conflict 2 */ modloader.registerblock(darkgrass); modloader.registerblock(darkdirt); 

two class examples conflict 1:

public class blockdarkstonebrick extends block {  public static icon[] textures = new icon[2];  @override public void registericons(iconregister par1iconregister) {      textures[0] = par1iconregister.registericon("darkstonebrick");     textures[1] = par1iconregister.registericon("darkstonetop");  }  public icon getblocktexturefromsideandmetadata(int i, int j) {      if (i == 0) return textures[1];     if (i == 1) return textures[1];     else         return textures[0]; }  protected blockdarkstonebrick(int par1, int j) {      super(par1, material.iron);     this.setcreativetab(creativetabs.tabblock); }  public int iddropped(int i, random random, int j) {      return mod_darkcraft.darkstonebrick.blockid; }  public int quantitydropped(random random) {      return 1; } } 

public class blockdarkstone extends block {  public static icon[] textures = new icon[2];  @override public void registericons(iconregister par1iconregister) {      textures[0] = par1iconregister.registericon("darkstoneside");     textures[1] = par1iconregister.registericon("darkstonetop");  }  public icon getblocktexturefromsideandmetadata(int i, int j) {      if (i == 0) return textures[1];     if (i == 1) return textures[1];     else         return textures[0]; }  protected blockdarkstone(int par1, int j) {      super(par1, material.iron);     this.setcreativetab(creativetabs.tabblock); }  public int iddropped(int i, random random, int j) {      return mod_darkcraft.darkstone.blockid; }  public int quantitydropped(random random) {      return 1; } } 

blockdarkgrass class, , darkstonesmooth code conflict 2:

public class blockdarkgrass extends block {  public static icon[] textures = new icon[3];  @override public void registericons(iconregister par1iconregister) {      textures[0] = par1iconregister.registericon("darkgrassside");     textures[1] = par1iconregister.registericon("darkgrasstop");     textures[2] = par1iconregister.registericon("darkdirt");  }  public icon getblocktexturefromsideandmetadata(int i, int j) {      if (i == 0) return textures[2];     if (i == 1) return textures[1];     else         return textures[0]; }  protected blockdarkgrass(int par1, int j) {      super(par1, material.grass);     this.setcreativetab(creativetabs.tabblock); }  public int iddropped(int i, random random, int j) {      return mod_darkcraft.darkdirt.blockid; }  public int quantitydropped(random random) {      return 1; } } 

public static final block darkstonesmooth = new block(165, block.stone.blockmaterial).setcreativetab(creativetabs.tabblock).sethardness(5f).setresistance(6f).setstepsound(block.soundstonefootstep).getindirectpoweroutput("darkstonetop"); 

all of blocks under conflict 1 taking name of darkwood fence of blocks under conflict 2 taking name of dark grass

if can thank if not, that's fine. sorry if there question that's solved or anything, tried looking, internet horrible. ones looked through did not solve problem.

i having same problem! believe fixed using .setunlocalizedname("") example:

public static final block bloodstone = new blockbloodstone(160, 0) .setcreativetab(creativetabs.tabblock).sethardness(5f) .setresistance(6f).setstepsound(block.soundstonefootstep) .getindirectpoweroutput("bloodstone").setunlocalizedname("bloodstone"); 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -