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

package com.kingz101.armor;

import com.kingz101.lib.RefStrings;

import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor.ArmorMaterial;
import net.minecraftforge.common.util.EnumHelper;

public class Marmor {

public static void mainRegistry() {
	initalizeItems();
	registerItems();
	registerToolMaterial();
}
public static Item FH , FP , FL , FB;

public static ArmorMaterial F;


public static void registerItems() {
	GameRegistry.registerItem(FH, "FH");
	GameRegistry.registerItem(FP, "FP");
	GameRegistry.registerItem(FL, "FL");
	GameRegistry.registerItem(FB, "FB");
}

public static void initalizeItems() {
	FH = new FA(F, 3000, 0).setUnlocalizedName("FH").setTextureName(":FH");
	FP = new FA(F, 3001, 1).setUnlocalizedName("FP").setTextureName(":FP");
	FL = new FA(F, 3002, 2).setUnlocalizedName("FL").setTextureName(":FL");
	FB = new FA(F, 3003, 3).setUnlocalizedName("FB").setTextureName(":FB");
}



public static void registerToolMaterial() {

F = EnumHelper.addArmorMaterial("FARMOR", 66, new int[]{3, 4, 5, 6}, 30);


}
}

_______________________________________________________________________________________________________________________

package com.kingz101.armor;

import com.kingz101.MCreativeTabs.tab;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;

public class FA extends ItemArmor {


public FA(ArmorMaterial p_i45325_1_, int p_i45325_2_, int p_i45325_3_) {
	super(p_i45325_1_, p_i45325_2_, p_i45325_3_);
	this.setCreativeTab(tab.tab);
}

public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {

	if(stack.getItem() == Marmor.FH || stack.getItem() == Marmor.FP || stack.getItem() == Marmor.FB) {

		return":textures/models/armor/FA_1.png";
	}
	if(stack.getItem() == Marmor.FL) {
		return":textures/models/armor/FA_1.png";
	}

	else return null;
}


}

____________________________________________________________________________________________________________________________

package com.kingz101.main;


import com.kingz101.armor.Marmor;
import com.kingz101.blocks.MBlocks;
import com.kingz101.item.MItems;
import com.kingz101.lib.RefStrings;
import com.kingz101.ore.Ore;


import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;

@Mod(modid = RefStrings.MODID , name = RefStrings.NAME , version = RefStrings.VERSION)
public class MainRegistry {

@SidedProxy(clientSide = RefStrings.CLIENTSIDE , serverSide = RefStrings.SERVERSIDE)
public static ServerProxy proxy;

@EventHandler
public static void PreLoad(FMLPreInitializationEvent PreEvent) {
	MItems.mainRegistry();
	MBlocks.mainRegistry();
	Marmor.mainRegistry();
	Ore.mainRegistry();
	CraftingManager.mainRegistry();
	proxy.registerRenderInfo () ;
}
@EventHandler
public static void load(FMLInitializationEvent event) {

}
@EventHandler
public static void PostLoad(FMLPostInitializationEvent PostEvent) {

}

 

Define "making the game crash." Crashing when it starts up? When you put it on? Post the crash report.

Check out my mod, Realms of Chaos, here.

 

If I helped you, be sure to press the "Thank You" button!

Oh, now I see the problem. You are trying to use a tool material when it is still null. Add the toolmaterial before your item.

Check out my mod, Realms of Chaos, here.

 

If I helped you, be sure to press the "Thank You" button!

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.