Jump to content

cossacksman

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    Software Developer, Forge Modder, Web Developer

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

cossacksman's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I feared as such, as much as I hate to say it I may stick with using a HashMap (Technically an anonymous class derived from HashMap) for now then, likely if I encounter more issues I'll just have to stick to the old true and tested method. Thanks for the heads-up on the singleton pattern used here.
  2. As of yet I've hated the messy standards of MinecraftForge development and I've taken to a more dynamic method of approaching item registry; my items do work and they're in the game with textures, localized names and all of the qualities I've given them but as soon as it comes to using them (for instance returning them when breaking a block) Forge fails to accept returning a new instance, for example.. @Override public Item getItemDropped(int metadata, Random random, int fortune) { return new myClass(); } I'll give you my registration in a spoiler but as I say, it registers fine but only seems to be able to be used if I use a static instance of it, if anyone has come across something similar it would be much appreciated if you could share what you found! And I'll throw in the item class I'm testing with Edit: I can get around this by using the exact same method in a HashMap but I'd prefer not to.
  3. http://forgegradle.readthedocs.org/en/FG_1.2/user-guide/shading/ If you do shade it into your jar, you need to read the project's license and make sure you have permission to redistribute it before doing so. @Optional wouldn't work because sqlite-jdbc isn't a mod. Yeah luckily I'm able to distribute this under their terms for non-profit reasons and I think maybe a reference to their original jar file in the manifest. I've managed to shade it in using a method (given a lot of reading) that was actually fairly simple and obvious once you showed me it: Taken and studied from the link provided: configurations { shade compile.extendsFrom shade } dependencies { shade 'org.xerial:sqlite-jdbc:3.8.11.2' } jar { configurations.shade.each { dep -> from(project.zipTree(dep)) { exclude 'META-INF', 'META-INF/**' } } } The only issue I have now is that the server acts as though it's not there; I'm assuming that since the shading happens at the reobfuscation period that references to sqlite-jdbc use the regular package names whilst developing so I'm not sure where to stand with this.. Thanks for the poke in the right direction so far, though
  4. Bit of a bump here, but you you mind providing an example of this? I'm working with sqlite-jdbc and I've tried a few ways to compile it with a mod unsuccessfully so far, it downloads from maven repos if I include it in the buildscript dependencies but beyond that I'm not sure where it downloads to; I've no issue with Java but Gradle is a new one for me. I do also have the sqlite-jdbc jar file but again, gradle is alien right now. Using the above from Elix compiles and runs but the server crashes as soon as it hits the code requiring JDBC with a classNotFound exception, as expected really.. And of course the mod works if I include JDBC in the Mods directory on the server but I'm trying to avoid that.
×
×
  • Create New...

Important Information

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