Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.