Jump to content

Material.rock Not Found


RsLeafy

Recommended Posts

I'm attempting to run my mod outside of Eclipse but I keep getting a NoSuchFieldError. It said it cannot find rock. I assume it is talking about Material.rock. I don't understand why it would be causing this error. I have sent it to my friend and he gets the same error.

 

Error Log: http://pastebin.com/iuYB4YcA

 

The only class that uses Material.rock is my class for ColoredBrick

 

package Shurtugal.common.block;

import java.util.List;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

import Shurtugal.Colors;
import Shurtugal.ShurtugalMod;
import net.minecraft.block.*;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;

public class BlockColoredBrick extends Block
{

public Icon[] icons;

public BlockColoredBrick(int par1)
{
	super(par1, Material.rock);
	this.setCreativeTab(ShurtugalMod.tabShurtugal);
}

@Override
public int damageDropped(int metadata)
{
	return metadata;
}

@Override
public Icon getIcon(int par1, int par2)
{
	return icons[par2];
}

@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IconRegister par1IconRegister)
{
	icons = new Icon[Colors.ColorNames.length];
	for (int i = 0; i < Colors.ColorNames.length; i++)
	{
		String str = Colors.ColorNames[i].toLowerCase() + "brick";
		str = "shurtugal:brick/" + str;
		icons[i] = par1IconRegister.registerIcon(str);
	}

}

@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(int unknown, CreativeTabs tab, List subItems)
{
	for (int ix = 0; ix < Colors.ColorNames.length; ix++)
	{
		subItems.add(new ItemStack(this, 1, ix));
	}
}

}

 

package Shurtugal.common.block;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemBlock;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import Shurtugal.Colors;
import Shurtugal.ShurtugalMod;
import Shurtugal.client.forge.ClientProxy;
import Shurtugal.common.Handlers.ConfigHandler;

public class BlockHandler
{
public static Block Brick;

public static Block Egg;

public static Block brightSteelOre;

public static Block RedTempleTrigger;

public static Block YellowTempleTrigger;

public static Block PurpleTempleTrigger;

public static Block GreenTempleTrigger;

public static Block WhiteTempleTrigger;

public static Block BlackTempleTrigger;

public static Block PinkTempleTrigger;

public static Block IronFurnaceIdle;
public static Block IronFurnaceActive;

public void onInti()
{
	brightSteelOre = new BlockBrightSteelOre(ConfigHandler.brightSteelOreID, Material.rock).setHardness(3F).setResistance(5F).setLightValue(1.0F).setUnlocalizedName("brightsteelore")
			.setCreativeTab(CreativeTabs.tabBlock);

	RedTempleTrigger = new TempleTrigger(ConfigHandler.RedTempleBlockID, Colors.Red).setUnlocalizedName("TriggerRed");

	YellowTempleTrigger = new TempleTrigger(ConfigHandler.YellowTempleBlockID, Colors.Yellow).setUnlocalizedName("TriggerYellow");

	PurpleTempleTrigger = new TempleTrigger(ConfigHandler.PurpleTempleBlockID, Colors.Purple).setUnlocalizedName("TriggerRurple");

	GreenTempleTrigger = new TempleTrigger(ConfigHandler.GreenTempleBlockID, Colors.Green).setUnlocalizedName("TriggerGreen");

	WhiteTempleTrigger = new TempleTrigger(ConfigHandler.WhiteTempleBlockID, Colors.White).setUnlocalizedName("TriggerWhite");

	BlackTempleTrigger = new TempleTrigger(ConfigHandler.BlackTempleBlockID, Colors.Black).setUnlocalizedName("TriggerBlack");

	PinkTempleTrigger = new TempleTrigger(ConfigHandler.PinkTempleBlockID, Colors.Pink).setUnlocalizedName("TriggerPink");

	IronFurnaceIdle = new BlockIronFurnace(ConfigHandler.IronFurnaceIdleID, false).setUnlocalizedName("IronFunace");

	IronFurnaceActive = new BlockIronFurnace(ConfigHandler.IronFurnaceActiveID, true).setUnlocalizedName("IronFunace");

	Brick = new BlockColoredBrick(ConfigHandler.BrickID).setHardness(1.5F).setResistance(10F).setUnlocalizedName("Brick");

	Egg = new DragonEggBlock(ConfigHandler.EggID).setUnlocalizedName("dragonEgg");

	GameRegistry.registerBlock(Egg, ItemBlockEgg.class, "DragonEgg");

	GameRegistry.registerBlock(Brick, ItemBlockBrick.class, "DragonBrick");

	registerBlock(brightSteelOre, "BrightSteelOre");
	registerBlock(RedTempleTrigger, "RedTempleTrigger");
	registerBlock(YellowTempleTrigger, "YellowTempleTrigger");
	registerBlock(PurpleTempleTrigger, "PurpleTempleTrigger");
	registerBlock(GreenTempleTrigger, "GreenTempleTrigger");
	registerBlock(WhiteTempleTrigger, "WhiteTempleTrigger");
	registerBlock(BlackTempleTrigger, "BlackTempleTrigger");
	registerBlock(PinkTempleTrigger, "PinkTempleTrigger");

	registerBlock(IronFurnaceIdle, "IronFurnace");
	registerBlock(IronFurnaceActive, "IronFurnaceIdle");

	// extra stuff
	brightSteelOre.setCreativeTab(ShurtugalMod.tabShurtugal);

}

/**
 * Registers the Block with both GameRegistry and LanguageRegistry
 * @param block
 * @param name
 */
public static void registerBlock(Block block, String name)
{
	registerBlock(block, ItemBlock.class, name);
}

/**
 * Registers the Block with both GameRegistry and LanguageRegistry
 * @param block
 * @param name
 * @param itemBlock Class
 */
public static void registerBlock(Block block, Class<? extends ItemBlock> itemBlock, String name)
{
	GameRegistry.registerBlock(block, itemBlock, name, ShurtugalMod.modID);
}

}

 

Please help!

 

~RsLeafy

 

Link to comment
Share on other sites

I am installing it like someone who downloaded it would. I selected the forge profile and put the .zip of my mod in the mods folder.

 

Sorry if I'm missing something obvious, I haven't been into mod making for about a year and a half. Trying to get back into the swing of things.

Link to comment
Share on other sites

Use lowercase for packages.

I know, I plan on overhauling it. It's not my original code, I'm revamping it for a friend who no longer wants to do it.

 

I think you are having exporting issues, my friend. Are you running recompile.bat and then reobfuscate.bat?

I just redid my entire forge/mcp set up while keeping the source code. It looks to be working fine now. It probably was a recompile or reobf and resetting everything fixed it. Thank you!
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.