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

My config file is being created and all properly but the Item ids are not being used and block ids are.

 

Moonrock.cfg

# Configuration file
# Generated on 29/12/12 14:49

####################
# block
####################

block {
    I:"MoonRock ID"=1000
}


####################
# item
####################

item {
    I:"MoonAxe ID"=4005
    I:"MoonBoots ID"=4003
    I:"MoonChest ID"=4001
    I:"MoonHelm ID"=4000
    I:"MoonHoe ID"=4007
    I:"MoonLegs ID"=4002
    I:"MoonPickaxe ID"=4004
    I:"MoonShovel ID"=4008
    I:"MoonSword ID"=4006
}


 

pre init

public void Preload(FMLPreInitializationEvent event){
    	Configuration config = new Configuration(event.getSuggestedConfigurationFile());
    	
    	config.load();
    	
    	MoonRockID = config.getBlock("MoonRock ID", 1000).getInt();
    	
    	MoonHelmetID = config.getItem("MoonHelm ID", 4000).getInt();
    	MoonChestID = config.getItem("MoonChest ID", 4001).getInt();
    	MoonLeggingsID = config.getItem("MoonLegs ID", 4002).getInt();
    	MoonBootsID = config.getItem("MoonBoots ID", 4003).getInt();
    	
    	MoonPickaxeID = config.getItem("MoonPickaxe ID", 4004).getInt();
    	MoonAxeID = config.getItem("MoonAxe ID", 4005).getInt();
    	MoonSwordID = config.getItem("MoonSword ID", 4006).getInt();
    	MoonHoeID = config.getItem("MoonHoe ID", 4007).getInt();
    	MoonShovelID = config.getItem("MoonShovel ID", 4008).getInt();
    	
    	config.save();		
    }

 

ModBlocks(only part)

 
Moonrock1 = (new MoonBlock(Moonrock.MoonRockID, 1,  Material.rock)).setHardness(3.0F).setLightOpacity(3).setStepSound(Block.soundGlassFootstep).setBlockName("Moonrock").setCreativeTab(CreativeTabs.tabBlock);

 

ModItems(only part)

//Armour
    	
    	MoonHelmet = new MoonArmor(Moonrock.MoonHelmetID, MOON, 3, 0).setIconCoord(0,0).setItemName("moonhelm") ;
    	MoonChest = new MoonArmor(Moonrock.MoonChestID, MOON, 3, 1).setIconCoord(1,0).setItemName("moonchest");
    	MoonLeggings = new MoonArmor(Moonrock.MoonLeggingsID, MOON, 3, 2).setIconCoord(2,0).setItemName("moonleg");
    	MoonBoots = new MoonArmor(Moonrock.MoonBootsID, MOON, 3, 3).setIconCoord(3,0).setItemName("moonboots"); 
    	
    	//tools

    	MoonPickaxe = new MoonPickaxe(Moonrock.MoonPickaxeID, MOONT).setIconCoord(0, 1).setItemName("MoonPick");
    	MoonAxe = new MoonAxe(Moonrock.MoonAxeID, MOONT).setIconCoord(0, 2).setItemName("Moonaxe");
    	MoonSword = new MoonSword(Moonrock.MoonSwordID, MOONT).setIconCoord(0, 3).setItemName("Moonsword");
    	MoonHoe = new MoonHoe(Moonrock.MoonHoeID, MOONT).setIconCoord(0, 4).setItemName("Moonhoe");
    	MoonShovel = new MoonShovel(Moonrock.MoonShovelID, MOONT).setIconCoord(0, 5).setItemName("Moonshovel");
    	

 

Thanks,

Mrmishboy

  • Author

Sorry guys I was being a noob. I just looked into the Item class and it shows that it adds 256

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.