-
Posts
87 -
Joined
-
Last visited
Everything posted by Animus_Surge
-
The item class file (ItemLightBridge) package net.overgrownportal.item; import net.minecraft.item.Item; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.overgrownportal.mod.OvergrownPortal; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.texture.SimpleTexture; import net.minecraft.creativetab.*; public class ItemLightBridge extends Item{ public static final Item itemLightBridge = null; public ItemLightBridge() { setRegistryName("overgrownportal:itemlightbridge"); setUnlocalizedName(OvergrownPortal.MODID + ".itemlightbridge"); ModelLoader.setCustomModelResourceLocation(itemLightBridge, 0, new ModelResourceLocation(getRegistryName(), getUnlocalizedName())); } @SideOnly(Side.CLIENT) public void initModel() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } public static void init() { // TODO Auto-generated method stub } } ModItems class file: package net.overgrownportal.item; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraft.item.Item; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModItems{ @GameRegistry.ObjectHolder("overgrownportal:itemlightbridge") public static final Item ItemLightBridge = null; @SideOnly(Side.CLIENT) public static void initModels() { } } and the JSON file: { "parent":"item/generated", "textures":{ "layer0": "overgrownportal:items/itemlightbridge" } }
-
in the ItemLightBridge class file
-
No code errors after fixing a bunch of errors, and my game crashes with the following: [15:00:09] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ---- // Shall we play a game? Time: 7/25/18 3:00 PM Description: Initializing game java.lang.NullPointerException: Initializing game at net.minecraftforge.client.model.ModelLoader.setCustomModelResourceLocation(ModelLoader.java:1090) at net.overgrownportal.item.ItemLightBridge.<init>(ItemLightBridge.java:19) at net.overgrownportal.mod.CommonProxy.registerItems(CommonProxy.java:16) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_CommonProxy_registerItems_Register.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:144) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:757) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:628) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:246) at net.minecraft.client.Minecraft.init(Minecraft.java:513) at net.minecraft.client.Minecraft.run(Minecraft.java:421) at net.minecraft.client.main.Main.main(Main.java:118) 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 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.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:25) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at net.minecraftforge.client.model.ModelLoader.setCustomModelResourceLocation(ModelLoader.java:1090) at net.overgrownportal.item.ItemLightBridge.<init>(ItemLightBridge.java:19) at net.overgrownportal.mod.CommonProxy.registerItems(CommonProxy.java:16) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_5_CommonProxy_registerItems_Register.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus$1.invoke(EventBus.java:144) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraftforge.registries.GameData.fireRegistryEvents(GameData.java:757) at net.minecraftforge.fml.common.Loader.preinitializeMods(Loader.java:628) at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:246) at net.minecraft.client.Minecraft.init(Minecraft.java:513) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:421) at net.minecraft.client.main.Main.main(Main.java:118) 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 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.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:25) -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_172, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 746705472 bytes (712 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.42 Powered by Forge 14.23.4.2739 7 mods loaded, 7 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | State | ID | Version | Source | Signature | |:----- |:--------------- |:------------ |:-------------------------------- |:--------- | | UCH | minecraft | 1.12.2 | minecraft.jar | None | | UCH | mcp | 9.42 | minecraft.jar | None | | UCH | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.4.2739.jar | None | | UCH | forge | 14.23.4.2739 | forgeSrc-1.12.2-14.23.4.2739.jar | None | | UCH | overgrownportal | 1.0 | bin | None | | UCH | ichunutil | 7.0.2 | iChunUtil-1.12.2-7.0.2.jar | None | | UCH | portalgun | 7.0.2 | PortalGun-1.12.2-7.0.2.jar | None | Loaded coremods (and transformers): GL info: ' Vendor: 'Intel' Version: '4.5.0 - Build 22.20.16.4836' Renderer: 'Intel(R) HD Graphics 620' Launched Version: 1.12.2 LWJGL: 2.9.4 OpenGL: Intel(R) HD Graphics 620 GL version 4.5.0 - Build 22.20.16.4836, Intel 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: Yes 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) CPU: 4x Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz [15:00:09] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\swag100107\Desktop\forge 1.12.2\run\.\crash-reports\crash-2018-07-25_15.00.09-client.txt
-
what do I replace "meta" with?
-
pretty much, because IDK when the real mod's fizzler will come back and that actually works in the newer versions
-
I do I fixed it by looking through the net.minecraftforge.fml.common.registry package, so I have no code errors anymore. The ModItems class now looks like this: package net.overgrownportal.item; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.common.registry.GameRegistry; public class ModItems{ @GameRegistry.ObjectHolder("overgrownportal:hardlightbridge") public static ItemLightBridge itemLightBridge; @SideOnly(Side.CLIENT) public static void initModels() { itemLightBridge.initModel(); } } so now I need to figure out how to call on the itemlightbridge.json file.
-
and I forget to change the modid from the original when I got the MDK for 1.12.2. So that explains the mismatch with the modid, but still the same error
-
It looks like this now: package net.overgrownportal.item; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ModItems{ @GameRegistry.ObjectHolder("overgrownportal:hardlightbridge") public static ItemLightBridge itemLightBridge; @SideOnly(Side.CLIENT) public static void initModels() { itemLightBridge.initModel(); } } but it still gives me the same error
-
Can you tell me how to make them match?
-
I do that and it gives me an error with the [email protected] line in my code. Heres what the code for the ModItems class looks like: package net.overgrownportal.item; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class ModItems{ //gives me error on the line below... @GameRegistry.ObjectHolder("overgrownportal:itemlightbridge") public static ItemLightBridge itemLightBridge; @SideOnly(Side.CLIENT) public static void initModels() { itemLightBridge.initModel(); } } And the code for the item: package net.overgrownportal.item; import net.minecraft.item.Item; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import net.overgrownportal.mod.OvergrownPortal; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.texture.SimpleTexture; import net.minecraft.creativetab.*; public class ItemLightBridge extends Item{ public ItemLightBridge() { setRegistryName("hardlightbridge"); setUnlocalizedName(OvergrownPortal.MODID + ".hardlightbridge"); } @SideOnly(Side.CLIENT) public void initModel() { ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory")); } }
-
I've been looking over the forge documentation for adding models and textures to items in 1.12.2, and I feel like it's not really giving me a clear answer. I'm making a test item to see if it would work so I can add crafting components to my mod with no special abilities of their own. I scroll down to the item part of this page, and look over the instructions three times, and it still isn't clear. Can someone help me figure this out?
-
So I have an item using what forge says as the code, and I try to launch, and heres what the console says: [12:45:02] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker [12:45:02] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker [12:45:02] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker [12:45:02] [main/INFO] [FML]: Forge Mod Loader version 7.2.217.1147 for Minecraft 1.7.2 loading [12:45:02] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_172, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_172 [12:45:02] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [12:45:02] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [12:45:02] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker [12:45:02] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker [12:45:02] [main/ERROR] [LaunchWrapper]: Unable to launch java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(Unknown Source) ~[?:1.8.0_172] at java.util.ArrayList$Itr.remove(Unknown Source) ~[?:1.8.0_172] at net.minecraft.launchwrapper.Launch.launch(Launch.java:117) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] There is no errors in my code, and I am using the source files on files.minecraftforge.net for 1.7.2. Please tell me what I did wrong