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


  • Posts

  • Joined

  • Last visited

kajetan's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. No that does not work. As mentioned: Vanilla is calling isNightTime not me. And therefore as I wrote: Bees do not work correctly in custom dimensions.
  2. When doing custom dimensions it is possible to overload the "isDaytime()" function in the dimension to control whether it is day or not. This function is then called in the world. The problem is that Vanilla also added an inverse function to the world: isNightTime Right now the function has a hardcoded check if the dimension is the overworld, which prevents custom dimensions from returning the right value. The new function is only used by bees which therefore work incorrectly in custom dimensions. I would suggest delegating isNightTime to the dimension as for isDayTime or at least setting the function to the opposite of the isDaytime function.
  3. I understand this decision, it should be removed then though, because currently it is just misleading.
  4. BlockEvent.HarvestDropsEvent is never fired. It is used in ForgeEventFactory.fireBlockHarvesting but this function is never used as a grep over the source code showed to me. I also tested the event in game.
  5. I solved the problem with a dirty hack. public static void loadDependencies() { URLClassLoader sysloader = (URLClassLoader) ClassLoader.getSystemClassLoader(); try { Method method = URLClassLoader.class.getDeclaredMethod("addURL", new Class[]{URL.class}); method.setAccessible(true); method.invoke(sysloader, getURL("mods/libs/Test.jar")); } catch(Throwable t) { t.printStackTrace(); } } private static URL getURL(String s) throws MalformedURLException { return new File(s).toURI().toURL(); } Now I can load arbitrary library jars as I could before. The method is called in the constructor of the mod.
  6. I'm already doing this except that my dependency line is like "compile files('./libs/Test.jar')". As stated my dependency is not a mod. I just have a Jar, which has no mod id. I did try that the Java way with "Class-Path: lib/Test.jar". I also tried several paths without success. So you drop your "lib"-folder in the mod folder ? Forge cannot find my library there, because I cannot adapt the previous steps to my problem. EDIT: I tried something nasty. I headed into the "libraries" folder and swapped the least used looking library with mine (which was java3d). I was able to start a server this way. So it is confirmed just a dependency problem, because I cannot configure anywhere to load my own library. EDIT 2: I was able to start the server by compiling the mod with "embed" as described here. Just to clarify - shading or a simply embed is not what I want. I need the possibility to change the library without recompiling the mod.
  7. It still doesn't work. I also tried manipulating the manifest of Forge (adding my dependency under "Class-Path"). It probably would work this way, but a Signature-Exception is thrown, because the manifest signature isn't the same anymore due to my change.
  8. I was used to adding my dependencies by just dropping all ".jar" files into the "mods" folder. This does not work anymore in 1.14 (NoClassDefFoundError for the first loaded class of my library). I tried to use the way described here: Dependency extraction I've created a folder "libraries" in "META-INF" and placed a jar there (e.g. "Test.jar"). I've also added a few lines to my "build.gradle" to automatically write the correct manifest. jar { manifest { attributes( 'ContainedDeps': 'Test.jar' ) } } I did check my built mod for the contained files. It correctly contains the "libraries" folder in the META-INF with "Test.jar" and the line "ContainedDeps: Test.jar" is added to "MANIFEST.MF". When I try to start a server with the mod, a NoClassDefFoundError is thrown, which means my library is not loaded. Please note that everything is working when I start with "gradlew runServer". My dependency is also only server side. Previously I did that by adding the dependency only in the servers mod folder. How would I do that now?
  • Create New...

Important Information

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