Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Everything posted by Kinniken

  1. My case is a little different, it's not for user config but for setting up my mod's data. So indeed config files are perfectly viable.
  2. In my case I'm not planning that, I just meant that I was looking for a way to store "small" NBT data, like the data necessary to define a potion or en enchanted item, not "large" NBT data like the content of a chest etc. Something that could plausibly be put in a config file on a single line.
  3. I never properly looked into this, I had other priorities that took over. If you find a good way to do it I'd be glad to have some feedback! Thanks
  4. No problems, glad to have helped! It was a bit of a tricky issue... not sure I would have figured it out without a vague memory of having read something on Java not supporting Let's Encrypt some months back.
  5. If anybody gets the same error, it's due to older versions of Java 8 not supporting the Let's Encrypt certificates used by minecraftforge.net: https://stackoverflow.com/questions/34110426/does-java-support-lets-encrypt-certificates The solution is simply to install an up-to-date JDK, at least Java 8_101.
  6. Hi all, I was recently trying to setup my mod's dev environnement again, and the same build script that worked just fine last time I used it a few months ago is now failing with the error below: FAILURE: Build failed with an exception. * What went wrong: Could not resolve all dependencies for configuration ':forgeGradleUserDevPackage'. > Could not resolve net.minecraftforge:forge:1.12.2- Required by: org.millenaire:Millenaire:7.0.0-beta.5 > Could not resolve net.minecraftforge:forge:1.12.2- > Could not get resource 'https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.12.2-'. > Could not GET 'https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.12.2-'. > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target The URL given works fine when tested in Chrome. Anybody has any idea about this issue? Something linked to a system update maybe? Thanks
  7. As a general rule you are right, in this case it just doesn't make sense. I already have a dynamic system to add content to my mod that's flexible and works well. In this new feature content discovered by the player, whether my own or added by other creators, will get tracked in a new UI, automatically, with no extra work for content creators. Having the advancement part being static in JSON is just more work for people, and if they don't do it, will lead to inconsistencies (my UI and the advancement system reporting different numbers). Also you are thinking of mod pack makers. That's one use case but not the main one for me. I have a lot of user-created content that can be downloaded and installed separately by players (check the site: https://www.millenaire.org/library/ and yes I know it needs a solid UI update ). Independently each of them could override advancements with their extra content, but what happens when the player wants to add more than one? Lastly thinking about it thanks to this discussion, there is the matter of updates. I've always tried hard to keep Millénaire as backward compatible as possible with outside content. If I do this JSON thing, it means that outside content that override my advancements won't include villagers and buildings added by later updates to the mod. That's really a killer. I would have liked to have those neat looking progressive advancements but after all these discussions I think the impact on content creators just isn't worth it. I'll just grant them straight when the player has finished the list.
  8. If there's no option but that I guess I'll go with it. But really that focus on outside edits is a bit beside the point, once again these new advancements will be tied to hard coded features, this is not something mod pack makers would venture in. On the contrary, having those advancements containa statically defined list of my villagers is bad for external content creators as it means that their villagers won't get auto-included. Plenty of stuff in my mod can be changed without touching the code, in fact it's possible to add entire new cultures with their own villagers and buildings and quests without touching a line of Java. It's a lot more open that Minecraft itself in that respect. But for this feature it's just beyond the point.
  9. My mod adds villages (nothing to do with the vanilla ones) with a large number of different villager types, more than a hundred split over several cultures. And that list is moving from update to update - I add new ones regularly and occasionally remove some too. I wand to add advancements for meeting them all, probably split by cultures. If I do a trigger per villager type in JSON, it will be a nightmare to maintain, except if I generate the JSON from code, which is doable but ugly. Alternatively, I can forgot about the "partial progress" bar and just grant the advancement when the player has completed the list, that's easy to do from the code.
  10. I know how the format works, that's not my issue. However for what I want to do I would need dozens of triggers, with more added every time I add content. It would be a real pain to do this manually. If there is no better way, I guess I'll have to choose between handling it code-side without showing intermediary progress or coding a bit of code that generates the JSON from my mod's data, but that's really clunky.
  11. For something like this I disagree, the advancements in question are core features and tied with other functionalities in my mod. If mod pack makers want to add advancements that refer to my mod that's great, but the default ones should be left as is.
  12. Hi, I would like to add to my mods some "multi-step" advancements, like the vanilla "balanced diet" one. Is this doable without having to add every "step" in the JSON file, in the same way that you can have single-step advancements with a custom trigger in the JSON that's actually handle code-size? If not I guess I'll have to write an advancement file generator Thanks
  13. Oh, great! Thanks @Animefan8888. This can be used to "drop" mappings, not just change them? Exactly what I needed.
  14. Indeed, and in my case at least it saves a lot of time, since I have multiple GUIs than can be the parent and they tend to have quite a bit of contextual data. Storing all that to recreate them once the child Gui is closed would have been a pain.
  15. Some way of declaring an item obsolete so it neither generates warnings in old worlds nor get added to the registry of new worlds I guess. "it will always tell the player about that and there is no way around that nor should there be." If that is indeed the case then I have no choice... Ah well, would have been nice not to have to chose between keeping my code clean and scaring users with nasty-looking warnings.
  16. Oh and on this: "Note that you're not actually reusing the GuiScreen object - the sub-GUI is a separate object which exists at the same time as the parent GUI." Sorry, I wasn't clear, I meant that I'm reusing the GuiScreen object from my original parent screen display to display it again once the second screen is closed. Between the parent screen and the child one it's not possible of course, they are not even instances of the same class in my case.
  17. onGuiClosed() looked like what I wanted... except that it's called from within displayGuiScreen() before the new GUI is set, so if I call displayGuiScreen() from within it my resetting of currentScreen gets overiden by the parent call. I don"t like the solution much but I went with putting my code in an overriden keyTyped(), that works fine. Thanks for the help.
  18. I can reuse the same GuiScreen object? Convenient, cool. Is there any callback for when a GUI is closed? I can't seem to find any at least for when the GUI is closed by using the escape key. The only solution I can see would be to override keyTyped() and reopen the older gui if I detect that the key pressed was escape, but that feels very hacky...
  19. Hi all, I would like to know if there is a good way to make blocks and items "obsolete" in new versions of a mod. As far as I know there are two ways of dealing with this: - Delete them from the mod. The cleanest, but popups an ugly-looking warning to players who upgrade existing worlds. - Keep them in the mod, but make them unavailable. That avoids the issue above but then the mod is stuck with dead items/blocks for ever, removing them later just ends up with the same issue as in the first option. Any better option? Thanks
  20. Hi all, I have two GUIs, one that extends GuiContainer to handle trade in my mod, and one with some user help that extends GuiScreen directly. There's a help button on the trade one that opens the other one, using Minecraft.getMinecraft().displayGuiScreen(). It works fine, except that opening the help closes the other one. I'd prefer it if the player was taken back to the other one instead. Is this possible "natively", or do I need to do it manually by reopening the first GUI with whatever context it had? Thanks
  21. Thanks, that worked fine. For the stretching issue, it seems like drawEntityOnScreen() "assumes" that the target texture has the same size as the screen, and since in your example it was 256x256 instead, it scaled the output to that. I changed the size settings the following way: final int width = Minecraft.getMinecraft().getFramebuffer().framebufferTextureWidth; final int height = Minecraft.getMinecraft().getFramebuffer().framebufferTextureHeight; And I get an output whose proportions are fine, but of course whose size matches the screen which is not what I want. I'm guessing I need to adjust the matrix then? Any hint or doc on this?
  22. Ok, I'll try that. Bonus question, how do I export them on a transparent background, if that's possible?
  23. I just tried your code @V0idWa1k3r, it works fine except that the proportions of the exported entity are wrong (it's "squashed", too thin on the X axis). When displaying it in a GUI it works fine. Any tip? Am I supposed to tweak the horizontal scale myself? Thanks
  24. Hi, Quick question, are there any librairies packed with Minecraft or Forge to serialize objects in JSON? I did not recognize any such librairies in the dependency list but I might have missed one. Thanks K.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.