public class ModItems
{
public static Item copperIngot = new Legit().setUnlocalizedName("copperIngot");
public static void init()
{
RegisterHelper.registerItem(copperIngot);
}
}
And my whole console when I crash is here, but the end is probably the only thing important:
[18:17:57] [main/INFO] [GradleStart]: Extra: []
[18:17:57] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/Brock/.gradle/caches/minecraft/assets, --assetIndex, 1.8, --accessToken, {REDACTED}, --version, 1.8, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[18:17:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[18:17:57] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[18:17:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[18:17:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[18:17:57] [main/INFO] [FML]: Forge Mod Loader version 8.0.76.1398 for Minecraft 1.8 loading
[18:17:57] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_45, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_45
[18:17:57] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[18:17:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[18:17:57] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[18:17:57] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[18:17:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[18:17:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[18:17:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[18:17:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[18:17:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[18:17:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[18:17:57] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[18:18:00] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[18:18:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[18:18:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[18:18:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[18:18:00] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[18:18:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[18:18:00] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[18:18:01] [Client thread/INFO]: Setting user: Player198
[18:18:06] [Client thread/INFO]: LWJGL Version: 2.9.1
[18:18:06] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[18:18:06] [Client thread/INFO] [FML]: MinecraftForge v11.14.1.1398 Initialized
[18:18:06] [Client thread/INFO] [FML]: Replaced 204 ore recipies
[18:18:06] [Client thread/INFO] [FML]: Preloading CrashReport classes
[18:18:06] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[18:18:07] [Client thread/INFO] [FML]: Searching C:\Users\Brock\Desktop\Modding Workspace\Legit Mod\mods for mods
[18:18:09] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[18:18:09] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, brockd_legit] at CLIENT
[18:18:09] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, brockd_legit] at SERVER
[18:18:10] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Legit
[18:18:10] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[18:18:10] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations
[18:18:10] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[18:18:10] [Client thread/INFO] [FML]: Applying holder lookups
[18:18:10] [Client thread/INFO] [FML]: Holder lookups applied
[18:18:10] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue
[18:18:10] [Client thread/ERROR] [FML]:
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{8.0.76.1398} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1398.jar) Unloaded->Constructed->Pre-initialized
Forge{11.14.1.1398} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1398.jar) Unloaded->Constructed->Pre-initialized
brockd_legit{a1.0.0} [Legit] (bin) Unloaded->Constructed->Errored
[18:18:10] [Client thread/ERROR] [FML]: The following problems were captured during this phase
[18:18:10] [Client thread/ERROR] [FML]: Caught exception from brockd_legit
java.lang.Error: Unresolved compilation problem:
at com.gmail.brockd9401.modname.init.ModItems.init(ModItems.java:11) ~[bin/:?]
at com.gmail.brockd9401.modname.Legit.preInit(Legit.java:17) ~[bin/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:536) ~[forgeSrc-1.8-11.14.1.1398.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[forgeSrc-1.8-11.14.1.1398.jar:?]
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[forgeSrc-1.8-11.14.1.1398.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?]
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514) [Loader.class:?]
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:446) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:356) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:117) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_45]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_45]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_45]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
at GradleStart.main(Unknown Source) [start/:?]
[18:18:10] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: ---- Minecraft Crash Report ----
// This doesn't make any sense!
Time: 5/3/15 6:18 PM
Description: There was a severe problem during mod loading that has caused the game to fail
at net.minecraftforge.fml.common.LoadController.transition(LoadController.java:162)
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:516)
at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:243)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:446)
at net.minecraft.client.Minecraft.run(Minecraft.java:356)
at net.minecraft.client.main.Main.main(Main.java:117)
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)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
Caused by: java.lang.Error: Unresolved compilation problem:
at com.gmail.brockd9401.modname.init.ModItems.init(ModItems.java:11)
at com.gmail.brockd9401.modname.Legit.preInit(Legit.java:17)
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:536)
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:208)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
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:118)
at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:514)
... 12 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.8
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.8.0_45, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 310396488 bytes (296 MB) / 444596224 bytes (424 MB) up to 1884815360 bytes (1797 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.10 FML v8.0.76.1398 Minecraft Forge 11.14.1.1398 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{8.0.76.1398} [Forge Mod Loader] (forgeSrc-1.8-11.14.1.1398.jar) Unloaded->Constructed->Pre-initialized
Forge{11.14.1.1398} [Minecraft Forge] (forgeSrc-1.8-11.14.1.1398.jar) Unloaded->Constructed->Pre-initialized
brockd_legit{a1.0.0} [Legit] (bin) Unloaded->Constructed->Errored
Loaded coremods (and transformers):
[18:18:10] [Client thread/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:660]: #@[email protected]# Game crashed! Crash report saved to: #@[email protected]# C:\Users\Brock\Desktop\Modding Workspace\Legit Mod\.\crash-reports\crash-2015-05-03_18.18.10-client.txt
Thanks for the help
Show us the class named "Legit". If its code does not look like this:
it means that you need to use the class called ModNameItem in your items package. If you don't have that class, go through the tutorials once again (third one).
it means that you need to use the class called ModNameItem in your items package. If you don't have that class, go through the tutorials once again (third one).
Here is my class named Legit. I'm pretty sure this is what the tutorial called the main class file?
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class Legit
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
And I'd like to know, is that example class file more advanced in the tutorial than mine, because yours seems to have more, and I don't remember that being in tutorial 3. Also, my ModNameItem is in my items package. Thanks for the help in advance.
Hello, I have another problem, after doing everything in the third tutorial and when I try to run it, a message pops saying "The selection cannon be launched, and there are no recent launches", how can I fix it? (I'm trying to run my main class, I don't know if it's suposed to be like that)
PD: great tutorial
UPDATE:
solved .-. I really need to try with every possible solution after posting here, sorry
So, I was scrolling through the Minecraft code (because I want to see if I can add a new biome based off of Minecraft's code and my knowledge these tutorials gave me), and I've noticed some really weird integers and strings. For example, an integer is p_76728_1_. Do those integers have any significance? Or is it a kind of reference number that Mojang uses?
How can I make a block return a different item/block? I want to know how to return more than one item/block and how to make a chance rate of it returning certain amounts like redstone and lapis.
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class Legit
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
And I'd like to know, is that example class file more advanced in the tutorial than mine, because yours seems to have more, and I don't remember that being in tutorial 3. Also, my ModNameItem is in my items package. Thanks for the help in advance.
Good. Change "Legit().setUnlocalizedName("thingy")" to "ModNameItem().setUnlocalizedName("thingy")" in the ModItems class. The file I posted was the ModNameItem class. We made that class in tutorial 3.
I'm getting a few errors when I try to run what I've done for the mod I'm developing based off of your tutorial. I'm only on the 3rd part, which is just simply writing the code to make a textureless item appear in the misc. creative tab in the game. Here's the error:
java.lang.NullPointerException: Initializing game
at com.gmail.darksoftengine.mods.magytech.RegisterHelper.registerItem(RegisterHelper.java:17)
at com.gmail.darksoftengine.mods.magytech.ModItems.init(ModItems.java:10)
at com.gmail.darksoftengine.mods.magytech.MagyTech.preInit(MagyTech.java:14)
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:532)
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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at cpw.mods.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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:533)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:253)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:942)
at net.minecraft.client.main.Main.main(Main.java:164)
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)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
How can I make a block return a different item/block? I want to know how to return more than one item/block and how to make a chance rate of it returning certain amounts like redstone and lapis.
Very simple. I have a mod called End Ores in which all Overworld and Nether ores are included in the End. Here are some example classes using the method:
Lapis ore: http://pastebin.com/WaN708vg This one is different than redstone, because lapis is an item with metadata, the dye item with a damage count of 4 to be exact. You also need the int damageDropped for such doing, which is included in this very class.
Tips:
*If you ever need to use random numbers, import java.util.Random, and do so: "Random random = new Random();" Then you can use random.nextInt(<maximumnumber>), random.nextInt() or random.nextDouble() and set it equal to an integer or double. Note that random.nextDouble() will be between 1 and 0 only. random.nextInt() will be any number, except it is most likely gonna have an Euler's number inside it.
*You can also make blocks drop out of other blocks instead of items, like how stone works.
I'm getting a few errors when I try to run what I've done for the mod I'm developing based off of your tutorial. I'm only on the 3rd part, which is just simply writing the code to make a textureless item appear in the misc. creative tab in the game. Here's the error:
java.lang.NullPointerException: Initializing game
at com.gmail.darksoftengine.mods.magytech.RegisterHelper.registerItem(RegisterHelper.java:17)
at com.gmail.darksoftengine.mods.magytech.ModItems.init(ModItems.java:10)
at com.gmail.darksoftengine.mods.magytech.MagyTech.preInit(MagyTech.java:14)
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:532)
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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at cpw.mods.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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:533)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:253)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:942)
at net.minecraft.client.main.Main.main(Main.java:164)
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)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
Your item is being returned as null when being registered. Can you post your ModItems class?
Very simple. I have a mod called End Ores in which all Overworld and Nether ores are included in the End. Here are some example classes using the method:
Lapis ore: http://pastebin.com/WaN708vg This one is different than redstone, because lapis is an item with metadata, the dye item with a damage count of 4 to be exact. You also need the int damageDropped for such doing, which is included in this very class.
Tips:
*If you ever need to use random numbers, import java.util.Random, and do so: "Random random = new Random();" Then you can use random.nextInt(<maximumnumber>), random.nextInt() or random.nextDouble() and set it equal to an integer or double. Note that random.nextDouble() will be between 1 and 0 only. random.nextInt() will be any number, except it is most likely gonna have an Euler's number inside it.
*You can also make blocks drop out of other blocks instead of items, like how stone works.
I don't get it. What I put in which class? Look at my classes. Do I combine them?
public class Mblocks {
public static void mainRegistry() {
initialize();
registeritem();
}
//Ores
public static Block ComStone;
public static Block TopazOre;
public static Block CopperOre;
public static Block CitrineOre;
public static Block YttriumOre;
public static Block SpaceOre;
//Crops
public static Block oCrop;
//Blocks
public static Block Space;
public static void initialize() {
//Ores
ComStone = new ComStone(Material.ground).setBlockName("ComStone").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":ComStone");
TopazOre = new TopazOre(Material.ground).setBlockName("Topaz Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":TopazOre");
CopperOre = new CopperOre(Material.ground).setBlockName("Copper Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":CopperOre");
CitrineOre = new CitrineOre(Material.ground).setBlockName("Citrine Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":CitrineOre");
YttriumOre = new YttriumOre(Material.ground).setBlockName("Yttrium Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":YttriumOre");
SpaceOre = new SpaceOre(Material.ground).setBlockName("Space Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":SpaceOre");
//Crops
oCrop = new ObsidianCrop().setBlockName("oCrop").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":ocrop");
//Blocks
Space = new Space(Material.ground).setBlockName("Space").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":Space");
}
public class Mblocks {
public static void mainRegistry() {
initialize();
registeritem();
}
//Ores
public static Block ComStone;
public static Block TopazOre;
public static Block CopperOre;
public static Block CitrineOre;
public static Block YttriumOre;
public static Block SpaceOre;
//Crops
public static Block oCrop;
//Blocks
public static Block Space;
public static void initialize() {
//Ores
ComStone = new ComStone(Material.ground).setBlockName("ComStone").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":ComStone");
TopazOre = new TopazOre(Material.ground).setBlockName("Topaz Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":TopazOre");
CopperOre = new CopperOre(Material.ground).setBlockName("Copper Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":CopperOre");
CitrineOre = new CitrineOre(Material.ground).setBlockName("Citrine Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":CitrineOre");
YttriumOre = new YttriumOre(Material.ground).setBlockName("Yttrium Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":YttriumOre");
SpaceOre = new SpaceOre(Material.ground).setBlockName("Space Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":SpaceOre");
//Crops
oCrop = new ObsidianCrop().setBlockName("oCrop").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":ocrop");
//Blocks
Space = new Space(Material.ground).setBlockName("Space").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":Space");
}
public class ModItems
{
public static Item infusedIronIngot = new MagyTechItem().setUnlocalizedName("infusedIronIngot");
public static void init()
{
RegisterHelper.registerItem(infusedIronIngot);
}
Okay, with some free time and knowing I made something null I did find my error. I accidentally identified part of the code as null instead of void, and have fixed it now. Thanks for the help.
To make an object transparent you use a blank pixel.
Paint.net:
Gimp 2:
I do not take any credit for any of these videos.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumShow us the class named "Legit". If its code does not look like this:
package com.hlaaftana.mods.GemsPlus.items;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import com.hlaaftana.mods.GemsPlus.Reference;
import com.hlaaftana.mods.GemsPlus.tabs.ModTabs;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class GemsPlusItem extends Item{
public GemsPlusItem(){
super();
setCreativeTab(ModTabs.tabGemsPlus);
}
@SideOnly(Side.CLIENT)
@Override
public void registerIcons(IIconRegister par1IconRegister){
itemIcon = par1IconRegister.registerIcon(Reference.MODID + ":" + getUnlocalizedName().substring(5));
}
}
it means that you need to use the class called ModNameItem in your items package. If you don't have that class, go through the tutorials once again (third one).
I'm not asking for a transparent texture I'm asking for a block that let's light through.
he wants a transparent block, not texture for the block.
Transparent blocks in minecraft are pretty much anything you can put on top of a chest and still be able to open it.
Here is my class named Legit. I'm pretty sure this is what the tutorial called the main class file?
package com.gmail.brockd9401.modname;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import com.gmail.brockd9401.modname.help.Reference;
import com.gmail.brockd9401.modname.init.ModItems;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class Legit
{
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
And I'd like to know, is that example class file more advanced in the tutorial than mine, because yours seems to have more, and I don't remember that being in tutorial 3. Also, my ModNameItem is in my items package. Thanks for the help in advance.
thank you so much for the tutorials, people like me who are new to the modding game really needed this bit of help, you rock for this.
secondly, will do check on that mod sometime
Game on, Dudes and Dudettes!
Hello, I have another problem, after doing everything in the third tutorial and when I try to run it, a message pops saying "The selection cannon be launched, and there are no recent launches", how can I fix it? (I'm trying to run my main class, I don't know if it's suposed to be like that)

PD: great tutorial
UPDATE:
solved .-. I really need to try with every possible solution after posting here, sorry
So, I was scrolling through the Minecraft code (because I want to see if I can add a new biome based off of Minecraft's code and my knowledge these tutorials gave me), and I've noticed some really weird integers and strings. For example, an integer is p_76728_1_. Do those integers have any significance? Or is it a kind of reference number that Mojang uses?
I keep getting an error when it come to the makeing the items file i get is when i type this script
public flyingsolomodItem ()
{
super() this is where the problem comes in it keeps saying "constructor call must be the first statement in the constructor
How can I make a block return a different item/block? I want to know how to return more than one item/block and how to make a chance rate of it returning certain amounts like redstone and lapis.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumGood. Change "Legit().setUnlocalizedName("thingy")" to "ModNameItem().setUnlocalizedName("thingy")" in the ModItems class. The file I posted was the ModNameItem class. We made that class in tutorial 3.
I'm getting a few errors when I try to run what I've done for the mod I'm developing based off of your tutorial. I'm only on the 3rd part, which is just simply writing the code to make a textureless item appear in the misc. creative tab in the game. Here's the error:
java.lang.NullPointerException: Initializing game
at com.gmail.darksoftengine.mods.magytech.RegisterHelper.registerItem(RegisterHelper.java:17)
at com.gmail.darksoftengine.mods.magytech.ModItems.init(ModItems.java:10)
at com.gmail.darksoftengine.mods.magytech.MagyTech.preInit(MagyTech.java:14)
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:532)
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 cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)
at cpw.mods.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 cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:533)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:253)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:942)
at net.minecraft.client.main.Main.main(Main.java:164)
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)
at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source)
at GradleStart.main(Unknown Source)
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumVery simple. I have a mod called End Ores in which all Overworld and Nether ores are included in the End. Here are some example classes using the method:
Redstone ore: http://pastebin.com/EfasvXqb This one has the random amount of redstone as well.
Emerald ore: http://pastebin.com/1rgULTEi This one is in case you don't want random amounts.
Lapis ore: http://pastebin.com/WaN708vg This one is different than redstone, because lapis is an item with metadata, the dye item with a damage count of 4 to be exact. You also need the int damageDropped for such doing, which is included in this very class.
Tips:
*If you ever need to use random numbers, import java.util.Random, and do so: "Random random = new Random();" Then you can use random.nextInt(<maximumnumber>), random.nextInt() or random.nextDouble() and set it equal to an integer or double. Note that random.nextDouble() will be between 1 and 0 only. random.nextInt() will be any number, except it is most likely gonna have an Euler's number inside it.
*You can also make blocks drop out of other blocks instead of items, like how stone works.
Your item is being returned as null when being registered. Can you post your ModItems class?
I don't get it. What I put in which class? Look at my classes. Do I combine them?
Mblocks:
package com.mod.blocks;
import net.minecraft.creativetab.CreativeTabs;
import com.mod.creativetabs.McreativeTabs;
import com.mod.lib.RefStrings;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import cpw.mods.fml.common.registry.GameRegistry;
public class Mblocks {
public static void mainRegistry() {
initialize();
registeritem();
}
//Ores
public static Block ComStone;
public static Block TopazOre;
public static Block CopperOre;
public static Block CitrineOre;
public static Block YttriumOre;
public static Block SpaceOre;
//Crops
public static Block oCrop;
//Blocks
public static Block Space;
public static void initialize() {
//Ores
ComStone = new ComStone(Material.ground).setBlockName("ComStone").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":ComStone");
TopazOre = new TopazOre(Material.ground).setBlockName("Topaz Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":TopazOre");
CopperOre = new CopperOre(Material.ground).setBlockName("Copper Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":CopperOre");
CitrineOre = new CitrineOre(Material.ground).setBlockName("Citrine Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":CitrineOre");
YttriumOre = new YttriumOre(Material.ground).setBlockName("Yttrium Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":YttriumOre");
SpaceOre = new SpaceOre(Material.ground).setBlockName("Space Ore").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":SpaceOre");
//Crops
oCrop = new ObsidianCrop().setBlockName("oCrop").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":ocrop");
//Blocks
Space = new Space(Material.ground).setBlockName("Space").setCreativeTab(McreativeTabs.tabBlock).setBlockTextureName(RefStrings.MODID + ":Space");
}
public static void registeritem() {
//Ores
GameRegistry.registerBlock(ComStone, ComStone.getUnlocalizedName());
GameRegistry.registerBlock(TopazOre, TopazOre.getUnlocalizedName());
GameRegistry.registerBlock(CopperOre, CopperOre.getUnlocalizedName());
GameRegistry.registerBlock(CitrineOre, CitrineOre.getUnlocalizedName());
GameRegistry.registerBlock(YttriumOre, YttriumOre.getUnlocalizedName());
GameRegistry.registerBlock(SpaceOre, SpaceOre.getUnlocalizedName());
//Crops
GameRegistry.registerBlock(oCrop, oCrop.getUnlocalizedName());
//Blocks
GameRegistry.registerBlock(Space, Space.getUnlocalizedName());
}
}
TopazOre:
package com.mod.blocks;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
public class TopazOre extends Block {
protected TopazOre(Material p_i45394_1_) {
super(p_i45394_1_);
// TODO Auto-generated constructor stub
}
}
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYour classes do not match the tutorials, so I cannot help you there.
This should be it
package com.gmail.darksoftengine.mods.magytech;
import net.minecraft.item.Item;
public class ModItems
{
public static Item infusedIronIngot = new MagyTechItem().setUnlocalizedName("infusedIronIngot");
public static void init()
{
RegisterHelper.registerItem(infusedIronIngot);
}
}
Okay, with some free time and knowing I made something null I did find my error. I accidentally identified part of the code as null instead of void, and have fixed it now. Thanks for the help.
my minecraft now wont start up through eclpse am i doing something wrong
What changes did you make? Can I see your crash report please.