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.

Eaglenator

Members
  • Joined

  • Last visited

Everything posted by Eaglenator

  1. and where is FoodStats?
  2. I will work in a Mod that haves four new bars and they works like the hugry bar, I need the codes of that bar, where I find that class?
  3. ok, thanks all, for now, I will ask you a last thing, where I learn Java?
  4. ItemStack constructor? you mean to ItemStack.java or to the codes with "ItemStack". Sequituri: You won the bet, I don't program in Java much, that's the reason why I'm in this forum
  5. I finded two code lines that make mention to the ItemStack in the crash report: at net.minecraft.item.ItemStack.<init>(ItemStack.java:82) both says the same thing but I don't find the object that's null
  6. sorry for the second topic, but, what I must do?
  7. yes, sorry, I forget the crash report, this is: ---- Minecraft Crash Report ---- // Hey, that tickles! Hehehe! Time: 16/11/13 01:00 PM Description: Initializing game java.lang.NullPointerException at net.minecraft.item.ItemStack.<init>(ItemStack.java:82) at example.items.Items.registerRecipes(Items.java:21) at example.Itz.load(Itz.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:698) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249) at net.minecraft.client.Minecraft.startGame(Minecraft.java:509) at net.minecraft.client.Minecraft.run(Minecraft.java:808) at net.minecraft.client.main.Main.main(Main.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) at net.minecraft.launchwrapper.Launch.main(Launch.java:27) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.item.ItemStack.<init>(ItemStack.java:82) at example.items.Items.registerRecipes(Items.java:21) at example.Itz.load(Itz.java:42) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:698) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249) at net.minecraft.client.Minecraft.startGame(Minecraft.java:509) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:808) at net.minecraft.client.main.Main.main(Main.java:93) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:131) at net.minecraft.launchwrapper.Launch.main(Launch.java:27) -- System Details -- Details: Minecraft Version: 1.6.4 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.7.0_40, Oracle Corporation Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation Memory: 991219872 bytes (945 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Suspicious classes: FML and Forge are installed IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v8.11 FML v6.4.38.942 Minecraft Forge 9.11.1.942 4 mods loaded, 4 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized FML{6.4.38.942} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized Forge{9.11.1.942} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized Obsidiana{1.6.4.1.0.1} [itz] (bin) Unloaded->Constructed->Pre-initialized->Errored Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: AMD Radeon HD 6310M GL version 4.0.10318 Compatibility Profile Context, ATI Technologies Inc. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Pack: Default Current Language: Español (México) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
  8. This are my classes:
  9. appear the same problem, this is the code: package source.items; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; public class Items { public static void init() { EspadaDeObsidiana = new ItemSword(ItemInfo.WAND_ID, EnumToolMaterial.EMERALD).setUnlocalizedName("EspadaDeObsidiana"); } public static Item EspadaDeObsidiana; public static void addNames() { LanguageRegistry.addName(new ItemStack(EspadaDeObsidiana, 1), ItemInfo.WAND_NAME); } public void registerIcons(IconRegister icon) { icon.registerIcon(ItemInfo.WAND_ID + ":" + setUnlocalizedName().substring(5)); } public static void registerRecipes() { GameRegistry.addRecipe(new ItemStack (EspadaDeObsidiana, 1), new Object[] { " O ", " O ", " / ", 'O', Block.obsidian, '/', Item.stick, }); } }
  10. package source.items; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; public class Items { public static void init() { EspadaDeObsidiana = new ItemSword(ItemInfo.WAND_ID, EnumToolMaterial.EMERALD); } public static Item EspadaDeObsidiana; public static void addNames() { LanguageRegistry.addName(new ItemStack(EspadaDeObsidiana, 1), ItemInfo.WAND_NAME); } public void registerIcons(IconRegister icon) { icon.registerIcon(ItemInfo.WAND_ID + ":" + getUnlocalizedName("swordObsidian").substring(5)); } public static void registerRecipes() { GameRegistry.addRecipe(new ItemStack (EspadaDeObsidiana, 1), new Object[] { " O ", " O ", " / ", 'O', Block.obsidian, '/', Item.stick, }); } } marks error in "getUnlocalizedName", says: Create method "getUnlocalizedName(string)" what can I do?
  11. like a good Modder, I made a count in adf.ly but I don't know if I can trust in them because they ask for my direction, and that is not secure, so I ask you if do that is secure
  12. well, I been looking a crowd of Mods and they are very... complex like Galacticraft, IndustrialCraft, Buildcraft or LotsOMobs, so, I think I can do everything in the Mods if I have the correct methods, fields and classes, but, how I do them?
  13. How I give a texture to my items? and, how to give them their durability? Thanks. Eaglenator
  14. package example.items; import net.minecraft.block.Block; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemSword; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; public class Items { public static void init() { EspadaDeObsidiana = new ItemSword(ItemInfo.WAND_ID, EnumToolMaterial); } public static Item EspadaDeObsidiana; public static void addNames() { LanguageRegistry.addName(new ItemStack(EspadaDeObsidiana, 1), ItemInfo.WAND_NAME); } public static void registerRecipes() { GameRegistry.addRecipe(new ItemStack (EspadaDeObsidiana, 1), new Object[] { " O ", " O ", " / ", 'O', Block.obsidian, '/', Item.stick, }); } } what I can write in the part: public static void init() { EspadaDeObsidiana = new ItemSword(ItemInfo.WAND_ID, (here)); appear error in that part, I think I must write EnumToolMaterial, but the recipe uses Obsidian, the obsidian is not in the type EnumToolMaterial, what can I do?
  15. I want to create a Mod with swords, tools (picaxe, axe, shovel, hoe) and armor, but I don't know how, can you help me?
  16. this is the class of the mod: package example; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.Mod.Instance; 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 example.config.ConfigHandler; import example.items.Items; import example.network.PacketHandler; import example.proxies.CommonProxy; @Mod(modid = ModInformation.ID, name = ModInformation.NAME, version = ModInformation.VERSION) @NetworkMod(channels = {ModInformation.CHANNEL}, clientSideRequired = true, serverSideRequired = true, packetHandler = PacketHandler.class) public class Itz { @Instance(ModInformation.ID) public static Itz instance; @SidedProxy(clientSide = "example.proxies.ClientProxy", serverSide = "example.proxies.CommonProxy") public static CommonProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent event) { ConfigHandler.init(event.getSuggestedConfigurationFile()); Items.init(); proxy.initSounds(); proxy.initRenderers(); } @EventHandler public void load(FMLInitializationEvent event) { Items.addNames(); } @EventHandler public void modsLoaded(FMLPostInitializationEvent event) { } }
  17. I want to create a Mod with a obsidian sword, the recipe will be two of obsidian and one stick, but I don't know how to give it a recipe, this is the class of the item: package example.items; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class ItemWand extends Item { public ItemWand(int id) { super(9520); setCreativeTab(CreativeTabs.tabCombat); setMaxStackSize(1); setUnlocalizedName(ItemInfo.WAND_UNLOCALIZED_NAME); } public boolean func_111207_a(ItemStack itemstack, EntityPlayer player, EntityLivingBase target) { if(!target.worldObj.isRemote) { target.motionY = 2; } return false; } @Override @SideOnly(Side.CLIENT) public void registerIcons(IconRegister register) { itemIcon = register.registerIcon(ItemInfo.TEXTURE_LOCATION + ":" + ItemInfo.WAND_ICON); } how I give it a recipe? this is the class "Items" package example.items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; public class Items { public static Item EspadaDeObsidiana; public static void init() { EspadaDeObsidiana = new ItemWand(ItemInfo.WAND_ID); } public static void addNames() { LanguageRegistry.addName(EspadaDeObsidiana, ItemInfo.WAND_NAME); } public static void registerRecipes() { GameRegistry.addRecipe(new ItemStack (EspadaDeObsidiana, 1), new Object[] { " X ", " X ", " / ", 'X', "Block.BlockObsidian", '/', "Item.stick", }); } } what need the classes?
  18. I just want to know where and how I initialize the item
  19. you don't have the class ItemInfo? http://courses.vswe.se/?course=3 that will help you
  20. in the class "ItemInfo" you must write: public static final String (itemname)_ICON = "name of the file"; you must place the texture of you mod in: assets."folder source".textures.items the name in the declaration and the file must be the same, example: public static final String (itemname)_ICON = Taladro; assets.Taladro.textures.items.Taladro.png
  21. can you help me? http://courses.vswe.se/?course=3&thread=302
  22. I have a problem, in "Items.java", in this part: http://courses.vswe.se/?course=3&lecture=24&thread=301 what I do?
  23. help with this part, clientSideRequired = true, serverSideRequiered = true if I put "true" in clientSideRequired, what happen? what happen if I put "false"? equal in the part: serverSideRequired, what happen in all the cases?
  24. I can use any version? does not matter if I use Minecraft 1.6.4?

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.