fieldbox Posted May 13, 2018 Posted May 13, 2018 (edited) I've returned to modding after creating a few mods (for myself) for 1.7.10. Now, when the ModelLoader loads my block, it simply throws a FileNotFoundException and continues with the game! I don't have any experience with MC 1.8 onwards, though. Here's the error log: [11:19:31] [main/INFO] [GradleStart]: Extra: [] [11:19:32] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, /home/harry/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [11:19:32] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [11:19:32] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [11:19:32] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [11:19:32] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [11:19:32] [main/INFO] [FML]: Forge Mod Loader version 14.23.3.2682 for Minecraft 1.12.2 loading [11:19:32] [main/INFO] [FML]: Java is OpenJDK 64-Bit Server VM, version 1.8.0_162, running on Linux:amd64:4.13.0-39-generic, installed at /usr/lib/jvm/java-8-openjdk-amd64/jre [11:19:33] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected: /home/harry/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.3/7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4/maven-artifact-3.5.3.jar. Using default libraries directory. [11:19:33] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [11:19:33] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin [11:19:33] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin [11:19:33] [main/INFO] [FML]: Searching /home/harry/mod/run/./mods for mods [11:19:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [11:19:33] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [11:19:33] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [11:19:33] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [11:19:33] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [11:19:33] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [11:19:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [11:19:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [11:19:33] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [11:19:42] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [11:19:42] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [11:19:42] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [11:19:45] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [11:19:45] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [11:19:45] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [11:19:45] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [11:19:48] [main/INFO] [net.minecraft.client.Minecraft]: Setting user: Player181 [11:20:06] [main/WARN] [net.minecraft.client.settings.GameSettings]: Skipping bad option: lastServer: [11:20:06] [main/INFO] [net.minecraft.client.Minecraft]: LWJGL Version: 2.9.4 [11:20:08] [main/INFO] [FML]: -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Linux (amd64) version 4.13.0-39-generic Java Version: 1.8.0_162, Oracle Corporation Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 143470744 bytes (136 MB) / 332398592 bytes (317 MB) up to 893386752 bytes (852 MB) JVM Flags: 0 total; IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'Intel Open Source Technology Center' Version: '3.0 Mesa 17.2.8' Renderer: 'Mesa DRI Intel(R) Bay Trail ' [11:20:08] [main/INFO] [FML]: MinecraftForge v14.23.3.2682 Initialized [11:20:08] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients. [11:20:08] [main/INFO] [FML]: Replaced 1036 ore ingredients [11:20:09] [main/INFO] [FML]: Searching /home/harry/mod/run/./mods for mods [11:20:12] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 495893592 nanos [11:20:13] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load [11:20:14] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, assets/testmod] at CLIENT [11:20:14] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, assets/testmod] at SERVER [11:20:17] [main/INFO] [net.minecraft.client.resources.SimpleReloadableResourceManager]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:test mod [11:20:17] [main/INFO] [FML]: Processing ObjectHolder annotations [11:20:17] [main/INFO] [FML]: Found 1168 ObjectHolder annotations [11:20:17] [main/INFO] [FML]: Identifying ItemStackHolder annotations [11:20:17] [main/INFO] [FML]: Found 0 ItemStackHolder annotations [11:20:18] [main/INFO] [FML]: Configured a dormant chunk cache size of 0 [11:20:18] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [11:20:18] [main/INFO] [FML]: Applying holder lookups [11:20:18] [main/INFO] [FML]: Holder lookups applied [11:20:18] [main/INFO] [FML]: Applying holder lookups [11:20:18] [main/INFO] [FML]: Holder lookups applied [11:20:18] [main/INFO] [FML]: Applying holder lookups [11:20:18] [main/INFO] [FML]: Holder lookups applied [11:20:18] [main/INFO] [FML]: Applying holder lookups [11:20:18] [main/INFO] [FML]: Holder lookups applied [11:20:18] [main/INFO] [FML]: Injecting itemstacks [11:20:18] [main/INFO] [FML]: Itemstack injection complete [11:20:18] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Found status: OUTDATED Target: 14.23.3.2688 [11:20:22] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager]: Starting up SoundSystem... [11:20:22] [Thread-4/INFO] [net.minecraft.client.audio.SoundManager]: Initializing LWJGL OpenAL [11:20:22] [Thread-4/INFO] [net.minecraft.client.audio.SoundManager]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [11:20:23] [Thread-4/INFO] [net.minecraft.client.audio.SoundManager]: OpenAL initialized. [11:20:23] [Sound Library Loader/INFO] [net.minecraft.client.audio.SoundManager]: Sound engine started [11:20:31] [main/INFO] [FML]: Max texture size: 16384 [11:20:32] [main/INFO] [net.minecraft.client.renderer.texture.TextureMap]: Created: 512x512 textures-atlas [11:20:38] [main/ERROR] [FML]: Exception loading model for variant assets/testmod:testblock#normal for blockstate "assets/testmod:testblock" net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model assets/testmod:testblock#normal with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.registerVariant(ModelLoader.java:248) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:153) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:236) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:163) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:559) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_162] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_162] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_162] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_162] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_162] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_162] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:83) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1191) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 21 more [11:20:38] [main/ERROR] [FML]: Exception loading blockstate for the variant assets/testmod:testblock#normal: java.lang.Exception: Could not load model definition for variant assets/testmod:testblock at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:281) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadBlock(ModelBakery.java:121) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.loadBlocks(ModelLoader.java:236) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:163) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:121) [SimpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.init(Minecraft.java:559) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:421) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_162] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_162] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_162] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_162] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_162] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_162] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] Caused by: java.lang.RuntimeException: Encountered an exception when loading model definition of model assets/testmod:blockstates/testblock.json at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:228) ~[ModelBakery.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:208) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:277) ~[ModelLoader.class:?] ... 20 more Caused by: java.io.FileNotFoundException: assets/testmod:blockstates/testblock.json at net.minecraft.client.resources.SimpleReloadableResourceManager.getAllResources(SimpleReloadableResourceManager.java:83) ~[SimpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadMultipartMBD(ModelBakery.java:221) ~[ModelBakery.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.getModelBlockDefinition(ModelBakery.java:208) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.getModelBlockDefinition(ModelLoader.java:277) ~[ModelLoader.class:?] ... 20 more [11:20:41] [main/INFO] [FML]: Applying holder lookups [11:20:41] [main/INFO] [FML]: Holder lookups applied [11:20:41] [main/INFO] [FML]: Injecting itemstacks [11:20:41] [main/INFO] [FML]: Itemstack injection complete [11:20:42] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods [11:20:43] [main/WARN] [net.minecraft.client.settings.GameSettings]: Skipping bad option: lastServer: [11:20:43] [main/INFO] [com.mojang.text2speech.NarratorLinux]: Narrator library successfully loaded [11:20:46] [Realms Notification Availability checker #1/INFO] [com.mojang.realmsclient.client.RealmsClient]: Could not authorize you against Realms server: Invalid session id EDIT: oops I realised that I use the ItemModelMesher instead of the ModelLoader. I don't know if that means anything but I'll edit my code just in case. EDIT 2: jesus christ I'm not having a good day. Here's the directory layout, too. Edited May 13, 2018 by fieldbox grammar error Quote
Cadiboo Posted May 13, 2018 Posted May 13, 2018 (edited) On 5/13/2018 at 10:42 AM, fieldbox said: I use the ItemModelMesher Expand Never use ItemModelMesher Please post your code "assets/testmod:blockstates/testblock.json" Why is assets prepended? is it part of your mod id??? the assets part should not be part of your ResourceLocation, a proper ResourceLocation would look like this "MOD_ID:PATH". assets and any other directories would be automatically prepended to your ResourceLocation, depending on the context Edited May 13, 2018 by Cadiboo Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 Ok, this is my util with the registering events: @Mod.EventBusSubscriber(modid=MyMod.MODID) public class RegUtil { @SubscribeEvent public static void registerBlocks(final RegistryEvent.Register<Block> event) { event.getRegistry().register(Blocks.testBlock); } @SubscribeEvent public static void registerItems(final RegistryEvent.Register<Item> event) { } @SideOnly(Side.CLIENT) public static void initClient(ItemModelMesher mesher) { Item item = Item.getItemFromBlock(Blocks.testBlock); ModelResourceLocation model = new ModelResourceLocation("testmod:" + "TestBlock", "inventory"); ModelLoader.registerItemVariants(item, model); mesher.register(item, 0, model); } } (the initClient method is called in my ClientProxy) This is my blocks class: public class Blocks { public static final Block testBlock = new TestBlock("TestBlock", Material.ROCK, CreativeTabs.BUILDING_BLOCKS, 5F, 15F); } And I'm sure that's all you need. The assets thing started showing up when I actually created the assets folder, then it started showing up in my FileNotFoundExceptions. Quote
Cadiboo Posted May 13, 2018 Posted May 13, 2018 On 5/13/2018 at 11:17 AM, fieldbox said: (the initClient method is called in my ClientProxy) Expand Please post it Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 On 5/13/2018 at 11:23 AM, Cadiboo said: Please post it Expand Here you go: public class ClientProxy extends CommonProxy { @Override public void preInit(FMLPreInitializationEvent event) { super.preInit(event); } @Override public void init(FMLInitializationEvent event) { ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); RegUtil.initClient(mesher); super.init(event); } @Override public void postInit(FMLPostInitializationEvent event) { super.postInit(event); } @Override public void serverStarting(FMLServerStartingEvent event) { super.serverStarting(event); } @Override public void serverStopping(FMLServerStoppingEvent event) { super.serverStopping(event); } } Quote
Cadiboo Posted May 13, 2018 Posted May 13, 2018 theres quite a few things wrong with your code, Im short on sleep so sorry for being blunt. 1) Proxies are for making sure that code is run only on one side. A common proxy doesn't make sense 2) ModelLoader has to be called in PreInit OR its Registry Event. 3) switch to using Registry Events instead of your initClient (why is it in your event subscriber class if it doesn't subscribe to anything?), as they allow for greater control over everything, knowing your code will be called at the right time, and many other important things. 4) the "assets" being prepended hints to me that something is not right with your file tree. Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 (edited) On 5/13/2018 at 11:32 AM, Cadiboo said: theres quite a few things wrong with your code, Im short on sleep so sorry for being blunt. 1) Proxies are for making sure that code is run only on one side. A common proxy doesn't make sense 2) ModelLoader has to be called in PreInit OR its Registry Event. 3) switch to using Registry Events instead of your initClient (why is it in your event subscriber class if it doesn't subscribe to anything?), as they allow for greater control over everything, knowing your code will be called at the right time, and many other important things. 4) the "assets" being prepended hints to me that something is not right with your file tree. Expand The reason why I did all this is because I was following this tutorial for 1.11 that I tried to update myself. The reason why it's in init and not preInit is because the ItemModelMesher is loaded in the init instead (i believe). I'll probably use the registry events like you said. I'm not sure what the assets thing could mean. Edited May 13, 2018 by fieldbox Quote
Cadiboo Posted May 13, 2018 Posted May 13, 2018 On 5/13/2018 at 11:37 AM, fieldbox said: The reason why I did all this is because I was following this tutorial for 1.11 that I tried to update myself. The reason why it's in init and not preInit is because the ItemModelMesher is loaded in the init instead (i believe). I'll probably use the registry events like you said. I'm not sure what the assets thing could mean. Expand Try deleting then recreating your resources directory. DON'T JUST PASTE your files back in, recreate every file & folder from scratch, or copy minecraft's version inside and delete everything you don't need. I had an issue where I had some very small problem with my lang file and had to do this 1 Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
Cadiboo Posted May 13, 2018 Posted May 13, 2018 Also a GitHub link is very helpful if you have one, it allows you and us to see errors that might jump out at you on another platform Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 Ok, I'll try and make a GitHub repo after I do the resources thing and also replace the ItemModelMesher with ModelLoader. Quote
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 Right, I rebuilt my resources folder and now it thinks that assets is the modid. I think that's my problem. Quote
Cadiboo Posted May 13, 2018 Posted May 13, 2018 On 5/13/2018 at 11:56 AM, fieldbox said: Right, I rebuilt my resources folder and now it thinks that assets is the modid. I think that's my problem. Expand Can you post your main mod class? Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 FIXED IT. IntelliJ's refactor system replaced testmod with assets. 1 Quote
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 On 5/13/2018 at 11:57 AM, fieldbox said: FIXED IT. IntelliJ's refactor system replaced testmod with assets. Expand Now it's saying that it can't find the model file and puts minecraft: prepended. Quote
Cadiboo Posted May 13, 2018 Posted May 13, 2018 (edited) On 5/13/2018 at 11:57 AM, Cadiboo said: Can you post your main mod class? Expand And your testblock class Edited May 13, 2018 by Cadiboo Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 (edited) @Mod(modid = MyMod.MODID, name = MyMod.NAME, version = MyMod.VERSION) public class MyMod { public static final String MODID = "testmod"; public static final String NAME = "test mod"; public static final String VERSION = "1.0"; @SidedProxy(clientSide = "com.harry.proxy.ClientProxy", serverSide = "com.harry.proxy.CommonProxy") public static CommonProxy proxy; @SidedProxy(clientSide = "com.harry.proxy.ClientProxy", serverSide = "com.harry.proxy.CommonProxy") public static ClientProxy proxy2; @Mod.Instance public static MyMod mod; public static final Logger LOGGER = LogManager.getLogger(MODID); @EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.preInit(event); } @EventHandler public void init(FMLInitializationEvent event) { proxy.init(event); } @EventHandler @SideOnly(Side.CLIENT) public void clientInit(FMLInitializationEvent event) { proxy2.init(event); } @EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(event); } } (i haven't got around to fixing that CommonProxy thing) public class TestBlock extends BlockBase { public TestBlock(String name, Material mat, CreativeTabs tab, float hardness, float resistance) { super(name, mat, tab, hardness, resistance); } } And the BlockBase class: public class BlockBase extends Block { public BlockBase(String name, Material mat, CreativeTabs tab, float hardness, float resistance, String tool, int harvest) { this(name, mat, tab, hardness, resistance); setHarvestLevel(tool, harvest); } public BlockBase(String name, Material mat, CreativeTabs tab, float hardness, float resistance, float light) { this(name, mat, tab, hardness, resistance); setLightLevel(light); } public BlockBase(String name, Material mat, CreativeTabs tab, float hardness, float resistance) { super(mat); setUnlocalizedName(name); setRegistryName(name); setHardness(hardness); setResistance(resistance); setCreativeTab(tab); } } Edited May 13, 2018 by fieldbox Quote
Cadiboo Posted May 13, 2018 Posted May 13, 2018 setRegistryName(name); setRegistryName(new ResourceLocation(Reference.MODID, name)); Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 Ok, the minecraft: thing was actually due to an error in my blockstate json. But, my block isn't in the game! Quote
Cadiboo Posted May 13, 2018 Posted May 13, 2018 On 5/13/2018 at 12:17 PM, fieldbox said: Ok, the minecraft: thing was actually due to an error in my blockstate json. But, my block isn't in the game! Expand Can you use /setblock to place it? If so, Are you registering an ItemBlock for your block? Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 Yep, I can use /setblock. I forgot to register the ItemBlock though. Quote
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 (edited) On 5/13/2018 at 12:18 PM, Cadiboo said: Can you use /setblock to place it? If so, Are you registering an ItemBlock for your block? Expand I tried registering Item.getItemFromBlock(Blocks.testBlock) as an item but it's still not working... Edited May 13, 2018 by fieldbox Quote
Cadiboo Posted May 13, 2018 Posted May 13, 2018 On 5/13/2018 at 12:25 PM, fieldbox said: Can you use /setblock to place it? Expand Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
Cadiboo Posted May 13, 2018 Posted May 13, 2018 (edited) please show your itemBlock registration code (and any creative tab registration code if you have it) Edited May 13, 2018 by Cadiboo Quote About Me Reveal hidden contents My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
fieldbox Posted May 13, 2018 Author Posted May 13, 2018 It's simply just this: @SubscribeEvent public static void registerItems(final RegistryEvent.Register<Item> event) { event.getRegistry().register(Item.getItemFromBlock(Blocks.testBlock)); } Quote
Recommended Posts
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.