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

Linking to an external library in your mod


Recommended Posts



Been converting pixelmon over to 1.3.2 with forge 4.0.0 and am having trouble getting it to link to an external library that we use.  In previous versions of forge i was able to just stick the jar for this library in the mods folder with my mod and it would be loaded but it doesn't seem to matter where i put it with this current version, it can't find it.  I had it in my lib folder in mcp when i compiled and putting it in the lib folder in .minecraft doesn't work.  Any ideas?



Link to comment
Share on other sites

Turns out that for some people, putting the library inside our mod's zip isn't working, they aren't a majority but it's happening.  However, putting the external library anywhere else is still not working.  Minecraft isn't picking it up and the game is crashing.


I have a class check on load which looks to see if the classes from that library are available.  In 1.2.5 this would work every time if the library was in the mods directory alongside the mod but now in 1.3.2 no matter where I put it it doesn't get linked in.  I have tried every conceivable location.  The mod just spits out the error on the class check that it couldn't find the library

Link to comment
Share on other sites

Update FML. This was recently changed so random libs in the mods dir will be loaded into the classpath. Ugly though. You should package sqlite as a coremod and then everyone can use it and depend on it properly. Mostly it would just be adding a meta-inf and a simple mod container.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • This isn't something we can fix (or even work around) without someone on the Dev team having an M1 Mac. For context, this is not a Forge issue, Apple being Apple they decided M1's didn't need backwards compatiblity with their old graphics API when they made the new one and the update to GLFW to accomodate the change hasn't made its way through LWJGL as of this writing
    • Hello. I am trying to add custom ores. Everything seems to be called and executed (when print statements are added), but nothing changes in game. I had it working in 1.16, but not in 1.17. I changed some of it to work with the new forge version, and it compiles without errors, but nothing changes in game. Any help figuring this out is appreciated.   Code: @Mod.EventBusSubscriber public class OreGeneration { public static ImmutableList<TargetBlockState> ORE_TARGET_LIST; public static final ArrayList<ConfiguredFeature<?, ?>> overworldOres = new ArrayList<ConfiguredFeature<?, ?>>(); public static void registerOres(){ ORE_TARGET_LIST = ImmutableList.of(OreConfiguration.target(Predicates.NATURAL_STONE, Blocks.STONE.defaultBlockState())); overworldOres.add(register("tin_ore_block", Feature.ORE.configured(new OreConfiguration(ORE_TARGET_LIST, 5)) .rangeUniform(VerticalAnchor.absolute(0), VerticalAnchor.absolute(48)) .squared() .count(20) )); } private static <FC extends FeatureConfiguration> ConfiguredFeature<FC, ?> register(String name, ConfiguredFeature<FC, ?> configuredFeature) { return Registry.register(BuiltinRegistries.CONFIGURED_FEATURE, new ResourceLocation(Extras.MODID, name), configuredFeature); } @SubscribeEvent(priority = EventPriority.HIGHEST) public static void registerBiomeModification(BiomeLoadingEvent event) { BiomeGenerationSettingsBuilder generation = event.getGeneration(); for(ConfiguredFeature<?, ?> ore : overworldOres){ if (ore != null) { generation.getFeatures(Decoration.UNDERGROUND_ORES).add(() -> { return ore; }); } } } }
    • you haven't, you still store the ModEventBus in a static Field and you register the Renderer of your Entity in FMLCommonSetupEvent and not in FMLClientSetupEvent Edit: you still use static initializer for your EntityTypes, I would recommend you to look again at the basics for the Registry System: FCW or the Forge doc
    • post debug log, if you use java 17 downgrade to java 16, since at the moment not supported by Forge
    • Forge doesn't support java 17 yet, use java 16 instead 
  • Topics

  • Who's Online (See full list)

  • Create New...

Important Information

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