Jump to content

Problem With CreativeTabs


yesiwearpants

Recommended Posts

Edited:

I am Trying To Make My Block Change Creative Tab via Config. I can Successfully Disable a Tab if I Like But The Blocks are Not Showing up.

i can post specific code if asked but I dont Know What all Is needed here ( I thought I did but If I knew That Id Have It Working)

this is my  Blocks constructor

	public BlockCarvable(int i) {
this(Material.rock, i);
if(Configurations.tabMod == true && i == 2) {
setCreativeTab(ChiselTabs.tabModdedChiselBlocks);
} else if((Configurations.tabBlocks == true && i == 1) || Configurations.tabMod == false) {
setCreativeTab(ChiselTabs.tabChiselBlocks);
} else {
setCreativeTab(ChiselTabs.tabChisel);
}
}
public BlockCarvable(Material m, int i) {
super(m);
if (m == Material.rock || m == Material.iron) {
setHarvestLevel("pickaxe", 0);
}
carverHelper = new CarvableHelper();
setResistance(10.0F);
setHardness(2.0F);
if(Configurations.tabMod == true && i == 2) {
setCreativeTab(ChiselTabs.tabModdedChiselBlocks);
} else if((Configurations.tabBlocks == true && i == 1) || Configurations.tabMod == false) {
setCreativeTab(ChiselTabs.tabChiselBlocks);
} else {
setCreativeTab(ChiselTabs.tabChisel);
}
}

 

This is a Snippet from the enum where there Blocks are Initialized

BOOKSHELF {
@Override
void addBlocks() {
BlockCarvable bookshelf = (BlockCarvable) new BlockCarvableBookshelf(1).setHardness(1.5F).setStepSound(Block.soundTypeWood);
Carving.chisel.addVariation("bookshelf", Blocks.bookshelf, 0, 0);
bookshelf.carverHelper.addVariation("tile.bookshelf.1.desc", 1, "bookshelf/rainbow");
bookshelf.carverHelper.addVariation("tile.bookshelf.2.desc", 2, "bookshelf/necromancer-novice");
bookshelf.carverHelper.addVariation("tile.bookshelf.3.desc", 3, "bookshelf/necromancer");
bookshelf.carverHelper.addVariation("tile.bookshelf.4.desc", 4, "bookshelf/redtomes");
bookshelf.carverHelper.addVariation("tile.bookshelf.5.desc", 5, "bookshelf/abandoned");
bookshelf.carverHelper.addVariation("tile.bookshelf.6.desc", 6, "bookshelf/hoarder");
bookshelf.carverHelper.addVariation("tile.bookshelf.7.desc", 7, "bookshelf/brim");
bookshelf.carverHelper.addVariation("tile.bookshelf.8.desc", 8, "bookshelf/historician");
bookshelf.carverHelper.registerAll(bookshelf, "bookshelf");
bookshelf.setHarvestLevel("axe", 0);
Carving.chisel.registerOre("bookshelf", "bookshelf");
}
},

private static void loadBlocks() {
Chisel.logger.info("Loading blocks...");
int num = 0;
for (Features f : values()) {
if (f.enabled()) {
f.addBlocks();
++num;
} else {
logDisabled(f);
}
}
Chisel.logger.info(num + " Feature's blocks loaded.");
Chisel.logger.info("Loading Tile Entities...");
Chisel.proxy.registerTileEntities();
Chisel.logger.info("Tile Entities loaded.");
}

static void preInit() {
Chisel.logger.info("Starting pre-init...");
loadBlocks();
loadItems();
Chisel.logger.info("Pre-init finished.");
}

 

This Is My ConFig  https://github.com/yesimwearingpants/Chisel-2/blob/dev/src/main/java/com/cricketcraft/chisel/config/Configurations.java

 

This Is My The Mod Class

https://github.com/yesimwearingpants/Chisel-2/blob/dev/src/main/java/com/cricketcraft/chisel/Chisel.java

 

No This Isnt My Mod But This Is A New Feature Im Triny To Add

 

Thanks in advance

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.