Jump to content

RocketyJoa

Members
  • Posts

    7
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Location
    Buenos Aires, Argentina
  • Personal Text
    14. Java Newbie

RocketyJoa's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Oh, ok. I thought you were specificating for eclipse. Changing folders now.
  2. When I used Eclipse I also used main/java, then I switched to IntelliJ (what I'm using now) and I changed it to src/com (Same with resources). Should I upload build.gradle?
  3. I started programming in Eclipse, then switched to IntelliJ. However, I added that line of code at the end of the build.gradle file before.
  4. My source code is in src/com, and my assets in src/resources. Didn't added the main/java due to a friend's recommendation (He said something about IntelliJ and Java, I don't remember well). EDIT: I tested the .jar I got to compile. Using 'runClient' Gradle task, the mod works and no errors are found. However, if I use the normal Minecraft (the launcher, not the development environment) it finds the same error, despite using the same .jar.
  5. Ok. So I used Gradle build task, but it didn't compile the resources. Then I changed the build.gradle file (I searched the problem here and found a fix) but now it doesn't compiles any source code at all. It just build 'empty' .jars, containing only a META-INF folder (with the Manifest saying "Manifest version 1.0.0"), while "Build On Make" option compiles everything, but it has the problem mentioned in the OP. What should I do? Thanks ^^
  6. Yes, I'm using the "Build On Make" task. And, sorry, but I'm just a newbie (not even 5 months I started), but, how I "fix" it? Thank you on advance.
  7. Hi! I'm making 2 mods, but I've been getting this runtime error in both mods. They compile ok, IntelliJ doesn't highlights any error, but when I test them, Minecraft throws a java.lang.NoSuchMethodError. I'm using Forge 1.8-11.14.3.1521 to run, and IntelliJ IDEA 14.1.4 as IDE. I checked the methods, the imports (the line itself), and the files being imported, and everything is ok. I also searched this online, even here, but I didn't find an answer to my problem. I can't modify the import, as it's from an external library. Here I will put the error of one of the mods, along with the relevant code of the file imported and the MC Crash report. I hope you guys can help me with this. File 'errored': package com.joa.techmod.items; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class BasicItem extends Item { public BasicItem(String unlocalizedName) { super(); this.setUnlocalizedName(unlocalizedName); // <- This is "wrong" this.setCreativeTab(CreativeTabs.tabMaterials); } } Import (Item, resume): package net.minecraft.item; import ... public class Item { ... private String unlocalizedName; ... /** * Sets the unlocalized name of this item to the string passed as the parameter, prefixed by "item." */ public Item setUnlocalizedName(String unlocalizedName) { this.unlocalizedName = unlocalizedName; return this; } ... } Crash Report: ---- Minecraft Crash Report ---- // I just don't know what went wrong Time: 13/10/15 13:23 Description: There was a severe problem during mod loading that has caused the game to fail net.minecraftforge.fml.common.LoaderException: java.lang.NoSuchMethodError: com.joa.techmod.items.BasicItem.setUnlocalizedName(Ljava/lang/String;)Lnet/minecraft/item/Item; at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:163) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:553) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:249) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:413) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:325) at net.minecraft.client.main.Main.main(SourceFile:120) 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:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.NoSuchMethodError: com.joa.techmod.items.BasicItem.setUnlocalizedName(Ljava/lang/String;)Lnet/minecraft/item/Item; at com.joa.techmod.items.BasicItem.<init>(BasicItem.java:10) at com.joa.techmod.items.ModItems.createItems(ModItems.java:50) at com.joa.techmod.CommonProxy.preInit(CommonProxy.java:12) at com.joa.techmod.ClientProxy.preInit(ClientProxy.java:12) at com.joa.techmod.Main.preInit(Main.java:26) 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.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:537) 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.EventSubscriber.handleEvent(EventSubscriber.java:74)at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:212) at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:190) 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.EventSubscriber.handleEvent(EventSubscriber.java:74) at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) at com.google.common.eventbus.EventBus.post(EventBus.java:275) at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:550) ... 10 more
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.