Jump to content

Choonster

Moderators
  • Posts

    5117
  • Joined

  • Last visited

  • Days Won

    75

Everything posted by Choonster

  1. To open a class by name, use Navigate > Class (Ctrl-N) in IDEA or Navigate > Go To > Type... in Eclipse.
  2. I think the only option is an array of variants, you can't just have an array of models.
  3. I'm not too sure what's going on, please post the full output from running the build task.
  4. In my first post, I was talking about an ore name that never had any items registered for it. This will always return a zero-length array from Ingredient#getMatchingStacks. If a mod were to register an item for that ore name at any point (i.e. even in init, postInit or when there's a world loaded), the OreIngredient would now match that item and include it in the array returned from Ingredient#getMatchingStacks. This is because OreIngredient stores a read-only view of the Ore Dictionary's item list for the specified ore name rather than creating a snapshot of the list at construction time.
  5. OreIngredients will match items registered for the ore name at any time, they don't take a snapshot of the Ore Dictionary when they're created.
  6. Where are you calling this from? Which player are you trying to render the ears for?
  7. Indeed, I saw that some time after posting in this thread. That was news to me, since I'd previously thought that init was the de-facto standard phase for Ore Dictionary registration. Even with this recommendation, I suspect a lot of mods are still doing things the old way (i.e. registering Ore Dictionary entries in init).
  8. Both of the proxy classes you posted reference a class called RegistryHandler. Neither of them reference Entity303Registry. You haven't posted a class called Entity303Registry.
  9. How did you set up the workspace? Forge's documentation explains how to do it properly here.
  10. All you need to do is call the UniversalBucket.getFilledBucket method. Pass the UniversalBucket instance (from the ForgeModContainer#universalBucket field) as the first argument and your Fluid as the second argument. It's a static method, so you call it on the class rather than an instance.
  11. That would probably be it. You need to tell ForgeGradle to reobfuscate the output of that task, like I do here.
  12. You definitely built your mod with the build Gradle task and copied the built JAR from the build/libs directory? If you open the JAR in a decompiler, are all of the other references to vanilla methods/fields obfuscated to SRG names like func_00211_a and field_02301_b?
  13. Indeed. JSON files are only loaded for your mod ID and always have your mod ID as the domain of their registry name.
  14. Please post the full FML log (using Gist/Pastebin) from a run where this happens.
  15. You can override recipes by registering a dummy recipe with the same name as the vanilla one, but this spams the log with Dangerous alternative prefix warnings from Forge.
  16. No, it only accepts an Item registry name. You could create your own condition for that, but ore dictionary registration is usually done in init; which is after recipes have been loaded and conditions tested. If you use a forge:ore_dict ingredient with a non-existent ore name, the recipe will show in the recipe book and in JEI but won't be craftable. Attempting to fill the recipe using the recipe book will crash the game with an ArithmeticException: / by zero (I plan to report this to Forge). Attempting to fill the recipe using JEI will simply do nothing. Edit: Reported the crash here.
  17. Post your code and the exception using Gist/Pastebin. What do you need the player for? Why does it need to be an AbstractClientPlayer specifically?
  18. If you're using an IDE with Gradle integration (e.g. IntelliJ IDEA), run the build task from the IDE's Gradle window. Otherwise open your mod directory in a command prompt/terminal and run gradlew build.
  19. The class you need to set a breakpoint in is a part of FML, not a part of your code. Open the LoadController class, navigate to the constructor, set a breakpoint in the handleException method of the anonymous class and then run Minecraft in debug mode. When the breakpoint is hit, look at the value of the Throwable argument of the method to see where it was thrown from.
  20. What do you want a tutorial/example on? Basic Java concepts? Creating an ItemStack of the Universal Bucket?
  21. You're being very vague. Tell us what your overall goal is, not how you intend to achieve it.
  22. You can't use a class where a value is expected (e.g. in the argument list of a method call), this is basic Java. UniversalBucket.getFilledBucket is a static method that takes an instance of UniversalBucket (e.g. the one stored in the ForgeModContainer#universalBucket field) as its first argument. Don't call static methods on instances, your IDE should warn you when you do this.
  23. You will unfortunately need to create a recipe file for each recipe. You can use the minecraft:item_exists condition to enable a recipe only when a specific Item has been registered.
  24. It looks like you never register ClientProxy with the Forge event bus, so the ClientProxy.registerModels method is never called and your models are never registered. Either register it manually or annotate the class with @Mod.EventBusSubscriber to automatically register it. Make sure you pass Side.CLIENT to the annotation so the class is only registered on the client, this prevents the dedicated server from loading the class and then crashing because it can't find the client-only classes referenced by it. Forge's documentation explains events in more detail here.
×
×
  • Create New...

Important Information

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