• 0

    posted a message on FMLCommonHandler.instance().bus() is Deprecated. What should I use

    The FML event bus (FMLCommonHandler#bus) was merged with the Forge event bus (MinecraftForge.EVENT_BUS) in 1.8, so use the Forge event bus.


    Forge's documentation explains events (including automatic registration) in more detail here.

    Posted in: Modification Development
  • 0

    posted a message on Rendering a multi-layer, NBT dependant item
    Quote from WolfieWaffle»

    I assume loadModel() can be implemented to simply return an IModel instance. Is there a specific place I should instantiate that IModel?



    Yes.


    If the loader always returns the same instance, store it in a static final field like ModelDynBucket does.



    Then there is accepts(), which I assume is some kind of "is this the right model" thing, but I'm not sure exactly what conditions should give yes or no, since it's only argument is a ResourceLocation.


    This determines whether or not your loader should be used to load the model for that ResourceLocation. You'll want to check if the domain is your mod ID and the path is <model_name>, models/block/<model_name> or models/item/<model_name> (like ModelFluid.FluidLoader does).



    The one I understand the least is onResourceManagerReload(), maybe I just call loadModel in there? I have no idea.


    That's called when the loader is first registered and whenever the resources are reloaded. If you've cached any model data that was loaded from disk, you'll want to clear the cache. If you haven't, you can simply do nothing.

    Posted in: Modification Development
  • 0

    posted a message on Baked models and OBJ models

    So the issue is with forge then could you make a request? There use to be obj, teche, voxel etc....


    Forge can still load OBJ models, they just can't be animated with the model animation system. If you want this changed, you can request this on the Forge forums or issue tracker; though it's not likely to changed quickly since Fry (Forge's rendering guy) hasn't been very active lately.
    Posted in: Modification Development
  • 0

    posted a message on Baked models and OBJ models

    What about vanilla I know people were importing obj models earlier then 1.5


    In 1.7.10 and earlier, Forge had an AdvancedModelLoader class that could load various model formats including OBJ and Techne. As far as I'm aware, Vanilla has never had the capability of loading any model format except its own ModelBase classes and the JSON models added in 1.8.
    Posted in: Modification Development
  • 1

    posted a message on Annotation based config system problem

    I had to change xlfoodmod.general.WorldGen.tooltip to xlfoodmod.general.worldgen.tooltip in the lang file to get the category tooltip working, this is because Forge coerces your field names to lowercase before using them in lang keys and subcategory names.


    It turns out that Forge doesn't actually use the lang key specified for the @Config class in the config GUI if there's only one @Config class, the title is always just your mod's name. I've reported this here.

    Posted in: Modification Development
  • 0

    posted a message on Annotation based config system problem
    Quote from mariot»

    I already have my mod on Github, I've created a dev branch. Make sure you're on the said branch tough!

    Thanks!


    The lang file in your repository is still named en_US.lang. Have you definitely renamed it to en_us.lang locally?

    Posted in: Modification Development
  • 0

    posted a message on Annotation based config system problem
    Quote from mariot»

    I've added pack.mcmeta file, changed the description and renamed my language file but it still doesn't work.


    I'll need to debug this locally to help you further. Create a Git repository for your mod, push it to a site like GitHub (if you haven't already) and link it here.
    Posted in: Modification Development
  • 0

    posted a message on Baked models and OBJ models
    Quote from Spyeedy»

    Forge model animation system? Mind shedding some light on that?




    It allows you to animate parts of baked models in various ways.

    Unfortunately, there's very little documentation on it.

    It was introduced in this commit, which briefly explains the purpose of some of the classes. The grammar of the Animation State Machine files is documented here. Forge has an example here (assets), there are also some examples linked here.

    Posted in: Modification Development
  • 0

    posted a message on Baked models and OBJ models

    OBJ models can be used as baked models, but unfortunately they can't be used with Forge's model animation system; it only supports JSON and B3D models.

    Posted in: Modification Development
  • 0

    posted a message on Annotation based config system problem

    Do you have a pack.mcmeta file with pack_format set to 3?


    If you do, all files names need to be lowercase. This means your lang files should be called en_us.lang, ko_kr.lang, etc.


    If you don't, Forge loads your mod's resources using LegacyV2Adapter, which loads lang files with the old mixed-case names. This means your lang files should be called en_US.lang, ko_KR.lang, etc.


    If you don't have a pack.mcmeta file, I recommend downloading a recent MDK and copying its pack.mcmeta file into your mod's src/main/resources directory. Make sure you change the description property to include your mod name instead of the example mod's name.

    Posted in: Modification Development
  • 0

    posted a message on |URGENT| Eclipse Modding Returns java.lang.RuntimeException upon Client Startup

    I responded to your thread on the Minecraft Forge Forums here.

    Posted in: Modification Development
  • 0

    posted a message on Rendering a multi-layer, NBT dependant item
    Quote from WolfieWaffle»

    Hm this is a lot of info. So just to start off, I think this means that somewhere there is a class that implements ICustomModelLoader, and that has an overridden method loadModel() to specify a IModel class instead of a .json file.


    This is mostly correct, but keep in mind that JSON models are loaded as IModels by an ICustomModelLoader just like any other types of model. The only difference is that the JSON loaders are used as a fallback when none of the other loaders accept the model location.

    And then it is also registered to some registry so forge knows about it.

    ModelLoaderRegistry.registerLoader
    I did a search for ICustomModelLoader, and for buckets it seems like there is an enum inside ModelDynBucket. How does that work? It looks like it has methods, but I thought an enum was just a list of possibilities like a list but as a data type.


    Enums in Java are just a special kind of class, the enum constants are compiled into public static final fields containing instances of the class. They can have fields and methods like regular classes and each enum constant can be an instance of its own anonymous class that extends the main enum class.

    ModelDynBucket.LoaderDynBucket is an example of an enum used as a singleton (i.e. a class with a single instance). It's equivalent to a regular class with a private constructor and a public static final field containing an instance.

    Hm and then also, so loadModel() can also use what I assume is two inner classes of ModelLoader that will do the same process as an IModel but using a .json file to fill in some essentially variables about size and texture. And we want to override that in order to not use a .json file.


    Essentially, yes.

    Posted in: Modification Development
  • 0

    posted a message on Building a jar from GitHub?

    That looks like an error in Minechem itself, try to narrow down the set of mods that cause the error and then report it to the author on GitHub. Make sure it hasn't already been reported first.

    Posted in: Modification Development
  • 0

    posted a message on Building a jar from GitHub?

    It looks like you downloaded an old version that wasn't finished porting to 1.11.x. Try re-downloading the ZIP.

    Posted in: Modification Development
  • 0

    posted a message on Overriding BlockAnvil opens GUI for a frame only
    Quote from lnsane96»

    Oh, I'm dumb
    There's no way to change the level limit instead of rewriting the entire ContainerRepair#updateRepairOutput?


    I don't think there is.
    Posted in: Modification Development
  • To post a comment, please or register a new account.