Posted April 12, 201510 yr Hi, I was wondering how to export a mod from Eclipse in Minecraft 1.8. Here is me build.gradle: buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath "net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT" } } apply plugin: "forge" sourceSets { main { java { srcDirs = ["$projectDir/java"] } resources { srcDirs = ["["$projectDir/resources"] } } } archivesBaseName = "UltraCraft" version = "1.0.0" minecraft.version = "1.8-11.14.1.1334" But is says BUILD FAILED because of the $ in java { srcdirs = ["$projestDir/java"] } I am running Windows 7, in case that modifies anything. Thanks for any help! Sup bruh.
April 12, 201510 yr it should be like this; buildscript { repositories { mavenCentral() maven { name = "forge" url = "http://files.minecraftforge.net/maven" } maven { name = "sonatype" url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } apply plugin: 'forge' version = "1.8.0-0.2" group= "net.extend.mod" archivesBaseName = "extend" minecraft { version = "1.8-11.14.1.1354" runDir = "eclipse" mappings = "snapshot_20141130" } dependencies { } processResources { inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' expand 'version':project.version, 'mcversion':project.minecraft.version } from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } if you change this code, you need to register projectDir if you didn't.
April 12, 201510 yr Author Okay, that worked, thank you so much! Now I need to know where the jar files is. Sup bruh.
April 13, 201510 yr Author Okay, now that I've done that, Minecraft sees that there are four mods (yay!). But, the problem is, there is no content. I have: [ultraCraft is my MODID] src/main/java/resources/assets/UltraCraft/models/item/SteelIngot.json and src/main/java/resources/assets/UltraCraft/textures/items/SteelIngot.png I also have programmed a creative tab: package uc.tabs; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import uc.mainmod.UltraCraft; public class MechanicalItemsTab { @EventHandler public void Init(FMLInitializationEvent initEvent) { UltraCraft.mechanicalItemsTab = new CreativeTabs("Mechanical Items") { public Item getTabIconItem() { return UltraCraft.steelIngot; } }; } } But that doesn't show up either. What am I doing wrong? Sup bruh.
April 13, 201510 yr how did you add steelIngot? You have to add to item .setCreativeTab(Your Creative Tab) Also your item Unlocalized Name should be same with json file (case-sensitive)
April 13, 201510 yr Have you ever check second page? Because first page is totally full and new tabs created with new page. Ok I create new tab on my pc and check it; I have create in my main class a Creative tab; public static CreativeTabs CreativeTabs_New; After that, in my main class inside of Init event; CreativeTabs_New = new CreativeTabs("New") { @Override public Item getTabIconItem() { return itemref.blackDiamond; } }; And the result; I don't have blackdiamond texture yet don't thing code is wrong And a question; Did you register your creative tab class under the Initialization event?
April 13, 201510 yr Author Did you register your creative tab class under the Initialization event? Yes, here is the code: @EventHandler public void Init(FMLInitializationEvent initEvent) { UltraCraft.mechanicalItemsTab = new CreativeTabs("Mechanical Items") { public Item getTabIconItem() { return UltraCraft.steelIngot; } }; } Sup bruh.
April 13, 201510 yr You should use init event from your main class, I am not sure it is work in different class. Can you try in your main class?
April 13, 201510 yr Author Well, now that it's in my main class, it loads, but when I click the arrow to go the next page, the game crashes: ---- Minecraft Crash Report ---- // Why did you do that? Time: 4/12/15 7:21 PM Description: Rendering item java.lang.NullPointerException: Rendering item at net.minecraft.item.ItemStack.func_77960_j(ItemStack.java:235) at net.minecraft.client.renderer.ItemModelMesher.func_178084_b(ItemModelMesher.java:70) at net.minecraft.client.renderer.ItemModelMesher.func_178089_a(ItemModelMesher.java:43) at net.minecraft.client.renderer.entity.RenderItem.func_175042_a(RenderItem.java:362) at net.minecraft.client.renderer.entity.RenderItem.func_180450_b(RenderItem.java:413) at net.minecraft.client.gui.inventory.GuiContainerCreative.func_147051_a(GuiContainerCreative.java:910) at net.minecraft.client.gui.inventory.GuiContainerCreative.func_146976_a(GuiContainerCreative.java:741) at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:78) at net.minecraft.client.renderer.InventoryEffectRenderer.func_73863_a(InventoryEffectRenderer.java:46) at net.minecraft.client.gui.inventory.GuiContainerCreative.func_73863_a(GuiContainerCreative.java:620) at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:461) at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1078) at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1048) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:345) 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) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.item.ItemStack.func_77960_j(ItemStack.java:235) at net.minecraft.client.renderer.ItemModelMesher.func_178084_b(ItemModelMesher.java:70) at net.minecraft.client.renderer.ItemModelMesher.func_178089_a(ItemModelMesher.java:43) at net.minecraft.client.renderer.entity.RenderItem.func_175042_a(RenderItem.java:362) -- Item being rendered -- Details: Item Type: null Item Aux: ~~ERROR~~ NullPointerException: null Item NBT: null Item Foil: ~~ERROR~~ NullPointerException: null Stacktrace: at net.minecraft.client.renderer.entity.RenderItem.func_180450_b(RenderItem.java:413) at net.minecraft.client.gui.inventory.GuiContainerCreative.func_147051_a(GuiContainerCreative.java:910) at net.minecraft.client.gui.inventory.GuiContainerCreative.func_146976_a(GuiContainerCreative.java:741) at net.minecraft.client.gui.inventory.GuiContainer.func_73863_a(GuiContainer.java:78) at net.minecraft.client.renderer.InventoryEffectRenderer.func_73863_a(InventoryEffectRenderer.java:46) at net.minecraft.client.gui.inventory.GuiContainerCreative.func_73863_a(GuiContainerCreative.java:620) at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:461) -- Screen render details -- Details: Screen name: net.minecraft.client.gui.inventory.GuiContainerCreative Mouse location: Scaled: (299, . Absolute: (598, 462) Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2 -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['TheDogePwner'/19, l='MpServer', x=48.50, y=4.00, z=660.50]] Chunk stats: MultiplayerChunkCache: 543, 543 Level seed: 0 Level generator: ID 01 - flat, ver 0. Features enabled: false Level generator options: Level spawn location: 58.00,4.00,670.00 - World: (58,4,670), Chunk: (at 10,0,14 in 3,41; contains blocks 48,0,656 to 63,255,671), Region: (0,1; contains chunks 0,32 to 31,63, blocks 0,0,512 to 511,255,1023) Level time: 137 game time, 137 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 2 total; [EntityPlayerSP['TheDogePwner'/19, l='MpServer', x=48.50, y=4.00, z=660.50], EntitySlime['Slime'/32942, l='MpServer', x=-5.50, y=4.01, z=608.16]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:351) at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2488) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:367) 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) -- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.8.0_05, Oracle Corporation Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 191874952 bytes (182 MB) / 398086144 bytes (379 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.10 FML v8.0.76.1371 Minecraft Forge 11.14.1.1371 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{8.0.76.1371} [Forge Mod Loader] (forge-1.8-11.14.1.1371.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{11.14.1.1371} [Minecraft Forge] (forge-1.8-11.14.1.1371.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available examplemod{1.0} [examplemod] (extend-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Loaded coremods (and transformers): Launched Version: 1.8-Forge11.14.1.1371 LWJGL: 2.9.1 OpenGL: AMD Radeon HD 7800 Series GL version 4.3.12618 Compatibility Profile Context 13.251.0.0, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: No Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Sup bruh.
April 13, 201510 yr I don't understand what the problem is but if you use TeamViewer I can come to your pc and help you to create tab and maybe I can see the problem. If you send your crash report from file, it can give us more information about problem. Also If you use skype I can help you with sharing desktop My skype is same with my nickname
April 13, 201510 yr You should initialize item first before initializing creative tab.. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
April 13, 201510 yr You initialize your item before the creative is initialized. You are now setting the creative tab to UltraCraft.mechanicalItemsTab before the CreativeTabs is initialized, so you actually set the creative tab to null. You need to either initialize your creative tab in a static initializer, or before the item is initialized. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
April 17, 201510 yr Author Okay, so now I have it initialize SteelIngot by saying steelIngot = new SteelIngot(); in my main class. The game now throws this error: ---- Minecraft Crash Report ---- // Quite honestly, I wouldn't worry myself about that. Time: 4/17/15 1:16 PM Description: Initializing game java.lang.NullPointerException: Can't add null-object to the registry, name examplemod:SteelIngot. at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.add(FMLControlledNamespacedRegistry.java:389) at net.minecraftforge.fml.common.registry.GameData.registerItem(GameData.java:781) at net.minecraftforge.fml.common.registry.GameData.registerItem(GameData.java:745) at net.minecraftforge.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:143) at net.minecraftforge.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:131) at uc.items.SteelIngot.<init>(SteelIngot.java:12) at uc.mainmod.UltraCraft.init(UltraCraft.java:22) 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.initializeMods(Loader.java:692) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:291) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:484) 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) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry.add(FMLControlledNamespacedRegistry.java:389) at net.minecraftforge.fml.common.registry.GameData.registerItem(GameData.java:781) at net.minecraftforge.fml.common.registry.GameData.registerItem(GameData.java:745) at net.minecraftforge.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:143) at net.minecraftforge.fml.common.registry.GameRegistry.registerItem(GameRegistry.java:131) at uc.items.SteelIngot.<init>(SteelIngot.java:12) at uc.mainmod.UltraCraft.init(UltraCraft.java:22) 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.initializeMods(Loader.java:692) at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:291) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:484) -- Initialization -- Details: Stacktrace: 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) -- System Details -- Details: Minecraft Version: 1.8 Operating System: Windows 7 (amd64) version 6.1 Java Version: 1.8.0_05, Oracle Corporation Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 66085656 bytes (63 MB) / 287608832 bytes (274 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.10 FML v8.0.76.1371 Minecraft Forge 11.14.1.1371 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized FML{8.0.76.1371} [Forge Mod Loader] (forge-1.8-11.14.1.1371.jar) Unloaded->Constructed->Pre-initialized->Initialized Forge{11.14.1.1371} [Minecraft Forge] (forge-1.8-11.14.1.1371.jar) Unloaded->Constructed->Pre-initialized->Initialized examplemod{1.0} [examplemod] (extend-1.8-11.14.1.1334.jar) Unloaded->Constructed->Pre-initialized->Errored Loaded coremods (and transformers): Launched Version: 1.8-Forge11.14.1.1371 LWJGL: 2.9.1 OpenGL: AMD Radeon HD 7800 Series GL version 4.3.12618 Compatibility Profile Context 13.251.0.0, ATI Technologies Inc. GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: No Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) SteelIngot class is: package uc.items; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; import uc.mainmod.UltraCraft; public class SteelIngot extends Item { public SteelIngot() { setMaxStackSize(64); setCreativeTab(UltraCraft.mechanicalItemsTab); setUnlocalizedName("SteelIngot"); GameRegistry.registerItem(UltraCraft.steelIngot, "SteelIngot"); } } Sup bruh.
April 17, 201510 yr Author Good news! It works without crashing! I'll make another post regarding texturing of the CreativeTab (lol), but thanks everyone for all of your help! Sup bruh.
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.