Jump to content

The_Enderpenguin

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by The_Enderpenguin

  1. Okay, that's the reason I failed. Now the inventory displays work! Thanks!
  2. What do you mean? The registration is happening in preInit. Do you mean it should be called something different?
  3. I've been banging my head on this for so long, there really shouldn't be anything wrong with my code. Do you think you could just review the entire file to see if there's anything wrong? Here it is: https://drive.google.com/file/d/0Bz7UTEmdVE9CUC05cklXT1h1YmM/view?usp=sharing
  4. Alright, so I made a custom block, and here's how it looks: Don't mind the dogecoins, it was from a project abandoned long ago. The blocks are properly textured, but not the ItemBlock. This leads me to believe that there's something wrong with the way I'm doing the item model json. package com.example.examplemod; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.client.model.ModelLoader; public class ClientProxy extends CommonProxy { @Override public void setModelResourceLocation(Item item) { ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); } @Override public void initItemModels() { setModelResourceLocation(ExampleMod.itemDogecoinOre); setModelResourceLocation(ExampleMod.noobItem); } } I'm calling initItemModels() in preInit after I register the items and blocks. There shouldn't be anything wrong with this, should there?
  5. Okay, so I tested with MinecraftByExample and confirmed that the src/main/resources folder MUST be marked as either source or resources root in order for it to display proper textures and localizations. Also, I added a language file to the assets folder and that applied properly.
  6. I unmarked it as source and resources roots, and the directory tree looks like this now. I also tried renaming noobitem.json to noobItem.json with a capital I, but it seems it still doesn't recognize it. The FileNotFoundException is specifically saying that examplemod:models/item/noobItem.json is nonexistent. Does this mean there is something in Forge running something like new FileInputStream("examplemod:models/item/noobItem.json") ?
  7. In the hand it looks like a block, and on the ground it looks like an oversize spinning block. If src/main/resources is not marked as sources or resources root, it will throw this error right before the title screen: [17:28:00] [Client thread/INFO]: Forge Mod Loader has successfully loaded 4 mods [17:28:00] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:examplemod [17:28:04] [Client thread/INFO]: SoundSystem shutting down... [17:28:04] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com [17:28:04] [sound Library Loader/INFO]: Starting up SoundSystem... [17:28:05] [Thread-10/INFO]: Initializing LWJGL OpenAL [17:28:05] [Thread-10/INFO]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [17:28:05] [Thread-10/INFO]: OpenAL initialized. [17:28:05] [sound Library Loader/INFO]: Sound engine started [17:28:10] [Client thread/INFO]: Max texture size: 16384 [17:28:10] [Client thread/INFO]: Created: 512x512 textures-atlas [17:28:11] [Client thread/ERROR]: Exception loading model for variant examplemod:noobItem#inventory for item "examplemod:noobItem", normal location exception: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model examplemod:item/noobItem with loader VanillaLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:317) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:170) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:147) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] 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_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:?] Caused by: java.io.FileNotFoundException: examplemod:models/item/noobItem.json at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:69) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadModel(ModelBakery.java:311) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.access$1100(ModelLoader.java:118) ~[ModelLoader.class:?] at net.minecraftforge.client.model.ModelLoader$VanillaLoader.loadModel(ModelLoader.java:868) ~[ModelLoader$VanillaLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 28 more [17:28:11] [Client thread/ERROR]: Exception loading model for variant examplemod:noobItem#inventory for item "examplemod:noobItem", blockstate location exception: net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model examplemod:noobItem#inventory with loader VariantLoader.INSTANCE, skipping at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:153) ~[ModelLoaderRegistry.class:?] at net.minecraftforge.client.model.ModelLoader.loadItemModels(ModelLoader.java:325) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelBakery.loadVariantItemModels(ModelBakery.java:170) ~[ModelBakery.class:?] at net.minecraftforge.client.model.ModelLoader.setupModelRegistry(ModelLoader.java:147) ~[ModelLoader.class:?] at net.minecraft.client.renderer.block.model.ModelManager.onResourceManagerReload(ModelManager.java:28) [ModelManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:132) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:113) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:799) [Minecraft.class:?] at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:340) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:561) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:386) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] 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_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:26) [start/:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_74] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_74] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_74] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_74] at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:?] Caused by: net.minecraft.client.renderer.block.model.ModelBlockDefinition$MissingVariantException at net.minecraft.client.renderer.block.model.ModelBlockDefinition.getVariant(ModelBlockDefinition.java:78) ~[ModelBlockDefinition.class:?] at net.minecraftforge.client.model.ModelLoader$VariantLoader.loadModel(ModelLoader.java:1184) ~[ModelLoader$VariantLoader.class:?] at net.minecraftforge.client.model.ModelLoaderRegistry.getModel(ModelLoaderRegistry.java:149) ~[ModelLoaderRegistry.class:?] ... 28 more I changed the ClientProxy class to use getRegistryName(), but it's still not working. package com.example.examplemod; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.client.model.ModelLoader; public class ClientProxy extends CommonProxy { @Override public void setModelResourceLocation(Item item) { ModelResourceLocation modelResourceLocation = new ModelResourceLocation(item.getRegistryName(), "inventory"); ModelLoader.setCustomModelResourceLocation(item, 0, modelResourceLocation); System.out.println(modelResourceLocation); } @Override public void initModels() { setModelResourceLocation(ExampleMod.noobItem); } }
  8. I made an item. It shows up in-game, but its textures are missing. Can someone help, please? My directory structure: I am using IntelliJ IDEA 2016.2.5. src/main/resources is a sources root. ExampleMod.java package com.example.examplemod; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.init.Blocks; import net.minecraft.item.Item; import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.ModelLoaderRegistry; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.registry.GameRegistry; import org.lwjgl.Sys; @Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION) public class ExampleMod { public static final String MODID = "examplemod"; public static final String VERSION = "1.0"; public static Item noobItem; @SidedProxy(serverSide = "com.example.examplemod.CommonProxy", clientSide = "com.example.examplemod.ClientProxy") public static CommonProxy proxy; @Mod.Instance(MODID) public static ExampleMod instance; @EventHandler public void preInit(FMLInitializationEvent event) { noobItem = new ItemBase("noobItem"); proxy.initModels(); GameRegistry.register(noobItem); } @EventHandler public void init(FMLInitializationEvent event) { } } ItemBase.java package com.example.examplemod; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class ItemBase extends Item { protected String name; public ItemBase(String name) { setUnlocalizedName(name); setRegistryName(name); setCreativeTab(CreativeTabs.MISC); } } ClientProxy.java package com.example.examplemod; import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.item.Item; import net.minecraftforge.client.model.ModelLoader; public class ClientProxy extends CommonProxy { @Override public void setModelResourceLocation(Item item, String id) { ModelResourceLocation modelResourceLocation = new ModelResourceLocation("examplemod:" + id, "inventory"); ModelLoader.setCustomModelResourceLocation(item, 0, modelResourceLocation); System.out.println(modelResourceLocation); } @Override public void initModels() { setModelResourceLocation(ExampleMod.noobItem, "noobitem"); } } noobitem.json { "parent": "item/generated", "textures": { "layer0": "examplemod:items/noobitem" } }
  9. How would I go about creating my own particles? I have the texture, but how do I turn that texture into a stream of particles?
  10. Odd. I thought I had it installed. Anyways, after re-installing the JDK, it worked. Thanks!
  11. Hello, I am running Windows 8.1 x64, with Java 8u25 JDK and JRE both installed. JAVA_HOME points to E:/Program Files/Java/jdk1.8.0_25 , the root JDK installation directory. However, after running gradlew setupDevWorkspace , it will download everything alright, but it will give me an error: **************************** Powered By MCP: http://mcp.ocean-labs.de/ Searge, ProfMobius, Fesh0r, R4wk, ZeuX, IngisKahn, bspkrs MCP Data version : unknown **************************** :extractMcpData UP-TO-DATE :getVersionJson :extractUserDev UP-TO-DATE :genSrgs SKIPPED :extractNatives UP-TO-DATE :copyNativesLegacy UP-TO-DATE :getAssetsIndex :getAssets :makeStart FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':makeStart'. > Cannot find System Java Compiler. Ensure that you have installed a JDK (not ju st a JRE) and configured your JAVA_HOME system variable to point to the accordin g directory. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 7.399 secs What is wrong?
  12. I want it to be a passive mob, like a sheep or cow, but cannot be tamed. I think I have the basic mob classes right, but I have no idea how to render it.
  13. How would you do it in 1.7 then? Do you have to deal with this RenderManager class?
  14. I'm using Minecraft Forge 1.8-8.0.12.1018-1.8, and I want to make a custom mob. I have my Techne model and textures. How would I go about creating it? The tutorials on the Wiki are totally outdated, they aren't even for 1.7.
  15. What is the difference between the mod methods preInit, init, and postInit? How can I use them most effectively?
  16. Where does the compiled mod .jar or .zip end up?
  17. How do I compile a mod? I'm using 10.13.0.1180. From other sources, it says there is a /mcp/reobfuscate.sh, but I have found none. Does anyone know what to do?
×
×
  • Create New...

Important Information

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