Jump to content

Recommended Posts

Posted

Petersfun: That has NOTHING to do with the error.

yanksrock: You need to package your mod properly. Package structure needs to match the folder structure.

 

lol i ment to say and you can change your code to look like that i just think it looks nicer

 

also yanksrock post your source code copy paste it into a code bbcode and boom we can help you

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Posted
package mods.puplet;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import mods.puplet.pupletArmor;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
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;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = "puplet", name = "puplet_mod", version = "1.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class puplet_mod {

@Instance("puplet")
public static puplet_mod Instance;

@SidedProxy(clientSide = "mods.puplet.clientproxypuplet", serverSide = "mods.puplet.ServerProxy")
public static ServerProxy proxy;

//IDs
public static Block pupletOre;

int pupletOreID = 500;

public static Item ingotPuplet;

public static EnumToolMaterial PUPLET1 = EnumHelper.addToolMaterial("PUPLET", 3, 20000, 10, 8, 10);

public static Item pupletHelmet;

public int pupletHelmetID = 1006;

public static Item pickaxePuplet;

public static Item pupletChestplate;

public int pupletChestplateID = 1007;

public static Item pupletBoots;

public int pupletBootsID = 1008;

public static Item pupletLeggings;

public int pupletLeggingsID = 1009;

public int pickaxePupletID = 1001;

public static Item axePuplet;

public int axePupletID = 1002;

public static Item swordPuplet;

public int swordPupletID = 1003;

public static Item hoePuplet;

public int hoePupletID = 1004;

public static Item shovelPuplet;

public int shovelPupletID = 1005;

public int ingotPupletID = 1000;

@PreInit
public void preInit(FMLPreInitializationEvent event){

}

@Init
public void load(FMLInitializationEvent event){
	proxy.registerRenderers();

	//Items and Blocks
	ingotPuplet = new ingotPuplet(ingotPupletID).setUnlocalizedName("ingotPuplet");

	pupletOre = new pupletOre(pupletOreID, Material.rock).setUnlocalizedName("pupletOre").setHardness(2.0F);

	pickaxePuplet = new pickaxePuplet(pickaxePupletID, PUPLET1).setUnlocalizedName("pickaxePuplet");

	axePuplet = new axePuplet(axePupletID, PUPLET1).setUnlocalizedName("axePuplet");

	swordPuplet = new swordPuplet(swordPupletID, PUPLET1).setUnlocalizedName("swordPuplet");

	hoePuplet = new hoePuplet(hoePupletID, PUPLET1).setUnlocalizedName("hoePuplet");

	shovelPuplet = new shovelPuplet(shovelPupletID, PUPLET1).setUnlocalizedName("shovelPuplet");

	pupletHelmet = new pupletArmor(pupletHelmetID, EnumArmorMaterial.DIAMOND, proxy.addArmor("pupletArmor"), 0).setUnlocalizedName("pupletHelmet");

	pupletChestplate = new pupletArmor(pupletChestplateID, EnumArmorMaterial.DIAMOND, proxy.addArmor("pupletArmor"), 1).setUnlocalizedName("pupletChestplate");

	pupletLeggings = new pupletArmor(pupletLeggingsID, EnumArmorMaterial.DIAMOND, proxy.addArmor("pupletArmor"), 2).setUnlocalizedName("pupletLeggings");

	pupletBoots = new pupletArmor(pupletBootsID, EnumArmorMaterial.DIAMOND, proxy.addArmor("pupletArmor"), 3).setUnlocalizedName("pupletBoots");

	gameRegisters();
	languageRegisters();
	craftingRecipes();

	GameRegistry.registerWorldGenerator(new WorldGeneratorPuplet());

}

//Crafting
public void craftingRecipes(){
	GameRegistry.addRecipe(new ItemStack(puplet_mod.pupletOre), new Object[]{
		"DD ", "DD ",
		'D', Block.dirt
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.pickaxePuplet), new Object[]{
		"PPP", " S ", " S ",
		'P', puplet_mod.ingotPuplet,
		'S', Item.stick
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.axePuplet), new Object[]{
		"PP ", "PS ", " S ",
		'P', puplet_mod.ingotPuplet,
		'S', Item.stick
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.swordPuplet), new Object[]{
		" P ", " P ", " S ",
		'P', puplet_mod.ingotPuplet,
		'S', Item.stick
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.hoePuplet), new Object[]{
		"PP ", " S ", " S ",
		'P', puplet_mod.ingotPuplet,
		'S', Item.stick
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.shovelPuplet), new Object[]{
		" P ", " S ", " S ",
		'P', puplet_mod.ingotPuplet,
		'S', Item.stick
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.pupletHelmet), new Object[]{
		"PPP", "P P",
		'P', puplet_mod.ingotPuplet
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.pupletChestplate), new Object[]{
		"P P", "PPP", "PPP",
		'P', puplet_mod.ingotPuplet
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.pupletLeggings), new Object[]{
		"PPP", "P P", "P P",
		'P', puplet_mod.ingotPuplet
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.pupletBoots), new Object[]{
		"P P", "P P",
		'P', puplet_mod.ingotPuplet
	});

}

//Game Registry
private static void gameRegisters(){
	GameRegistry.registerBlock(pupletOre, "pupletOre");
	GameRegistry.registerItem(ingotPuplet, "ingotPuplet");
	GameRegistry.registerItem(pickaxePuplet, "pickaxePuplet");
	GameRegistry.registerItem(axePuplet, "axePuplet");
	GameRegistry.registerItem(swordPuplet, "swordPuplet");
	GameRegistry.registerItem(hoePuplet, "hoePuplet");
	GameRegistry.registerItem(shovelPuplet, "shovelPuplet");
	GameRegistry.registerItem(pupletHelmet, "helmetPuplet");
	GameRegistry.registerItem(pupletChestplate, "chestplatePuplet");
	GameRegistry.registerItem(pupletLeggings, "leggingsPuplet");
	GameRegistry.registerItem(pupletBoots, "bootsPuplet");
}

//Language Registry
private static void languageRegisters(){
	LanguageRegistry.addName(pupletOre, "Puplet Ore");
	LanguageRegistry.addName(ingotPuplet, "Puplet Ingot");
	LanguageRegistry.addName(pickaxePuplet, "Puplet Pickaxe");
	LanguageRegistry.addName(axePuplet, "Puplet Axe");
	LanguageRegistry.addName(swordPuplet, "Puplet Sword");
	LanguageRegistry.addName(hoePuplet, "Puplet Hoe");
	LanguageRegistry.addName(shovelPuplet, "Puplet Shovel");
	LanguageRegistry.addName(pupletHelmet, "Puplet Helmet");
	LanguageRegistry.addName(pupletChestplate, "Puplet Chestplate");
	LanguageRegistry.addName(pupletLeggings, "Puplet Leggings");
	LanguageRegistry.addName(pupletBoots, "Puplet Boots");
}

@PostInit
public void postInit(FMLPostInitializationEvent event){

}
}

Don't tell me to learn the basics of java, I already know.

Posted
package mods.puplet;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
import mods.puplet.pupletArmor;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.PreInit;
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;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;

@Mod(modid = "puplet", name = "puplet_mod", version = "1.0")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class puplet_mod {

@Instance("puplet")
public static puplet_mod Instance;

@SidedProxy(clientSide = "mods.puplet.clientproxypuplet", serverSide = "mods.puplet.ServerProxy")
public static ServerProxy proxy;

//IDs
public static Block pupletOre;

int pupletOreID = 500;

public static Item ingotPuplet;

public static EnumToolMaterial PUPLET1 = EnumHelper.addToolMaterial("PUPLET", 3, 20000, 10, 8, 10);

public static Item pupletHelmet;

public int pupletHelmetID = 1006;

public static Item pickaxePuplet;

public static Item pupletChestplate;

public int pupletChestplateID = 1007;

public static Item pupletBoots;

public int pupletBootsID = 1008;

public static Item pupletLeggings;

public int pupletLeggingsID = 1009;

public int pickaxePupletID = 1001;

public static Item axePuplet;

public int axePupletID = 1002;

public static Item swordPuplet;

public int swordPupletID = 1003;

public static Item hoePuplet;

public int hoePupletID = 1004;

public static Item shovelPuplet;

public int shovelPupletID = 1005;

public int ingotPupletID = 1000;

@PreInit
public void preInit(FMLPreInitializationEvent event){

}

@Init
public void load(FMLInitializationEvent event){
	proxy.registerRenderers();

	//Items and Blocks
	ingotPuplet = new ingotPuplet(ingotPupletID).setUnlocalizedName("ingotPuplet");

	pupletOre = new pupletOre(pupletOreID, Material.rock).setUnlocalizedName("pupletOre").setHardness(2.0F);

	pickaxePuplet = new pickaxePuplet(pickaxePupletID, PUPLET1).setUnlocalizedName("pickaxePuplet");

	axePuplet = new axePuplet(axePupletID, PUPLET1).setUnlocalizedName("axePuplet");

	swordPuplet = new swordPuplet(swordPupletID, PUPLET1).setUnlocalizedName("swordPuplet");

	hoePuplet = new hoePuplet(hoePupletID, PUPLET1).setUnlocalizedName("hoePuplet");

	shovelPuplet = new shovelPuplet(shovelPupletID, PUPLET1).setUnlocalizedName("shovelPuplet");

	pupletHelmet = new pupletArmor(pupletHelmetID, EnumArmorMaterial.DIAMOND, proxy.addArmor("pupletArmor"), 0).setUnlocalizedName("pupletHelmet");

	pupletChestplate = new pupletArmor(pupletChestplateID, EnumArmorMaterial.DIAMOND, proxy.addArmor("pupletArmor"), 1).setUnlocalizedName("pupletChestplate");

	pupletLeggings = new pupletArmor(pupletLeggingsID, EnumArmorMaterial.DIAMOND, proxy.addArmor("pupletArmor"), 2).setUnlocalizedName("pupletLeggings");

	pupletBoots = new pupletArmor(pupletBootsID, EnumArmorMaterial.DIAMOND, proxy.addArmor("pupletArmor"), 3).setUnlocalizedName("pupletBoots");

	gameRegisters();
	languageRegisters();
	craftingRecipes();

	GameRegistry.registerWorldGenerator(new WorldGeneratorPuplet());

}

//Crafting
public void craftingRecipes(){
	GameRegistry.addRecipe(new ItemStack(puplet_mod.pupletOre), new Object[]{
		"DD ", "DD ",
		'D', Block.dirt
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.pickaxePuplet), new Object[]{
		"PPP", " S ", " S ",
		'P', puplet_mod.ingotPuplet,
		'S', Item.stick
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.axePuplet), new Object[]{
		"PP ", "PS ", " S ",
		'P', puplet_mod.ingotPuplet,
		'S', Item.stick
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.swordPuplet), new Object[]{
		" P ", " P ", " S ",
		'P', puplet_mod.ingotPuplet,
		'S', Item.stick
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.hoePuplet), new Object[]{
		"PP ", " S ", " S ",
		'P', puplet_mod.ingotPuplet,
		'S', Item.stick
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.shovelPuplet), new Object[]{
		" P ", " S ", " S ",
		'P', puplet_mod.ingotPuplet,
		'S', Item.stick
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.pupletHelmet), new Object[]{
		"PPP", "P P",
		'P', puplet_mod.ingotPuplet
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.pupletChestplate), new Object[]{
		"P P", "PPP", "PPP",
		'P', puplet_mod.ingotPuplet
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.pupletLeggings), new Object[]{
		"PPP", "P P", "P P",
		'P', puplet_mod.ingotPuplet
	});

	GameRegistry.addRecipe(new ItemStack(puplet_mod.pupletBoots), new Object[]{
		"P P", "P P",
		'P', puplet_mod.ingotPuplet
	});

}

//Game Registry
private static void gameRegisters(){
	GameRegistry.registerBlock(pupletOre, "pupletOre");
	GameRegistry.registerItem(ingotPuplet, "ingotPuplet");
	GameRegistry.registerItem(pickaxePuplet, "pickaxePuplet");
	GameRegistry.registerItem(axePuplet, "axePuplet");
	GameRegistry.registerItem(swordPuplet, "swordPuplet");
	GameRegistry.registerItem(hoePuplet, "hoePuplet");
	GameRegistry.registerItem(shovelPuplet, "shovelPuplet");
	GameRegistry.registerItem(pupletHelmet, "helmetPuplet");
	GameRegistry.registerItem(pupletChestplate, "chestplatePuplet");
	GameRegistry.registerItem(pupletLeggings, "leggingsPuplet");
	GameRegistry.registerItem(pupletBoots, "bootsPuplet");
}

//Language Registry
private static void languageRegisters(){
	LanguageRegistry.addName(pupletOre, "Puplet Ore");
	LanguageRegistry.addName(ingotPuplet, "Puplet Ingot");
	LanguageRegistry.addName(pickaxePuplet, "Puplet Pickaxe");
	LanguageRegistry.addName(axePuplet, "Puplet Axe");
	LanguageRegistry.addName(swordPuplet, "Puplet Sword");
	LanguageRegistry.addName(hoePuplet, "Puplet Hoe");
	LanguageRegistry.addName(shovelPuplet, "Puplet Shovel");
	LanguageRegistry.addName(pupletHelmet, "Puplet Helmet");
	LanguageRegistry.addName(pupletChestplate, "Puplet Chestplate");
	LanguageRegistry.addName(pupletLeggings, "Puplet Leggings");
	LanguageRegistry.addName(pupletBoots, "Puplet Boots");
}

@PostInit
public void postInit(FMLPostInitializationEvent event){

}
}

Don't tell me to learn the basics of java, I already know.

Posted

The problem is that your class name has an underscore in it. I believe this is not allowed; thus, the loader cannot find it. Naming tips: http://www.wikihow.com/Name-a-Class-in-Java

 

Of course, I might be wrong. I don't have nearly as much experience as other people on this forum. Doesn't hurt to check, though.

 

Underscores are allowed.

 

yanksrock1019 Can you please make a screenshot of your ZIP, where you see your puplet_mod class file?

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

The problem is that your class name has an underscore in it. I believe this is not allowed; thus, the loader cannot find it. Naming tips: http://www.wikihow.com/Name-a-Class-in-Java

 

Of course, I might be wrong. I don't have nearly as much experience as other people on this forum. Doesn't hurt to check, though.

 

Underscores are allowed.

 

yanksrock1019 Can you please make a screenshot of your ZIP, where you see your puplet_mod class file?

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

i had this error before too, make sure the file path is as follows:

 

.minecraft/mods/mods/puplet/puplet_mod

 

if it is not that then make it that and the issue should go away. when is says that a class was not found, it starts inside the mods folder, no with the mods folder. also make sure it is zipped when you do this.

Posted

i had this error before too, make sure the file path is as follows:

 

.minecraft/mods/mods/puplet/puplet_mod

 

if it is not that then make it that and the issue should go away. when is says that a class was not found, it starts inside the mods folder, no with the mods folder. also make sure it is zipped when you do this.

Posted

i had this error before too, make sure the file path is as follows:

 

.minecraft/mods/mods/puplet/puplet_mod

 

if it is not that then make it that and the issue should go away. when is says that a class was not found, it starts inside the mods folder, no with the mods folder. also make sure it is zipped when you do this.

Where would this be, in the normal minecraft folder or the forge folder where the modding was done?

Don't tell me to learn the basics of java, I already know.

Posted

i had this error before too, make sure the file path is as follows:

 

.minecraft/mods/mods/puplet/puplet_mod

 

if it is not that then make it that and the issue should go away. when is says that a class was not found, it starts inside the mods folder, no with the mods folder. also make sure it is zipped when you do this.

Where would this be, in the normal minecraft folder or the forge folder where the modding was done?

Don't tell me to learn the basics of java, I already know.

Posted

in the normal minecraft folder, from what i understand, you are trying to get it to work in the client and not the ecilpse(or other modding) interface, correct?

That's correct, but I need two mods folders?

Don't tell me to learn the basics of java, I already know.

Posted

in the normal minecraft folder, from what i understand, you are trying to get it to work in the client and not the ecilpse(or other modding) interface, correct?

That's correct, but I need two mods folders?

Don't tell me to learn the basics of java, I already know.

Posted

yes. the file path you give it when you start modding (mods.puplet,puplet_mod) is its own file, when you go to test it in the integrated environment it gets injected into the mods folder for the game. so the "mods" that shows in the src if part to your mod and not the mods folder the game uses.

Posted

yes. the file path you give it when you start modding (mods.puplet,puplet_mod) is its own file, when you go to test it in the integrated environment it gets injected into the mods folder for the game. so the "mods" that shows in the src if part to your mod and not the mods folder the game uses.

Posted

yes. the file path you give it when you start modding (mods.puplet,puplet_mod) is its own file, when you go to test it in the integrated environment it gets injected into the mods folder for the game. so the "mods" that shows in the src if part to your mod and not the mods folder the game uses.

Ok, so what your saying is that I have to zip up the entire mods folder in reobf and put it in the mods folder in .minecraft?

Don't tell me to learn the basics of java, I already know.

Posted

yes. the file path you give it when you start modding (mods.puplet,puplet_mod) is its own file, when you go to test it in the integrated environment it gets injected into the mods folder for the game. so the "mods" that shows in the src if part to your mod and not the mods folder the game uses.

Ok, so what your saying is that I have to zip up the entire mods folder in reobf and put it in the mods folder in .minecraft?

Don't tell me to learn the basics of java, I already know.

Posted

yes. thats what i had to do, remember to put your textures folder in there as well.

Should I out the textures folder in the puplet folder or directly in the mods folder

Don't tell me to learn the basics of java, I already know.

Posted

yes. thats what i had to do, remember to put your textures folder in there as well.

Should I out the textures folder in the puplet folder or directly in the mods folder

Don't tell me to learn the basics of java, I already know.

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.