Mod

FentLib

Quick rating

FentLib

No reviews yet

Utility code for jack mods and vanilla/mod tweaks, such as animated server icons, or Thaumonomicon to HTML dumper.

QoL & Tweaks
Bug Fixes
API/Library
Mod Loaders
Forge
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Optional
Server Optional

About

Project Details

Type
Mod
License
GNU Lesser General Public License v3.0 only
Latest Version
fentlib-0.0.53-curseforge.jar
Authors
CurseForge
Modrinth

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID
Modrinth ID

Resources

External Links

Source Issues Wiki Discord

About

Description

FentLib

A shared code library and tweak/fix mod.

logo

hub curse modrinth 67 maven forge cord

Features

  • Support for animated GIF server icons. Just drop a server-icon.gif file in the server root directory. Size limits are configurable. HodgePodge is a soft dependency, required if you want to use larger GIFs (because of the packet size limit). animated_server_icons Use the /reload_icon command to reload the icon. Also works for server-icon.png.
  • Removal of EnderCore / HodgePodge Info Button in the mod list screen.
  • API to modify the S00PacketServerInfo packet. Example:
public class ClientProxy extends CommonProxy {
    @Override
    public void preInit(FMLPreInitializationEvent event) {
      S00PacketServerInfoModifyService.registerDeserializeHandler((response, fentlibData, serverData) -> {
        if (fentlibData.has("server_to_client_payload")) {
          // Yoohoo we got something back!!!!
          // serverData contains stuff like server IP
        }
      });
    }
}

public class CommonProxy {
  public void preInit(FMLPreInitializationEvent event) {
    if (MiscUtil.isServer()) {
      S00PacketServerInfoModifyService.registerHandler((response, fentLibPresent) -> {
        // fentLibPresent is just a boolean indicating whether fentlib is loaded
        return "server_to_client_payload";
        // You can return a String, a S00PacketServerInfoModifyService.KeyValue, or a JsonElement. If you return
        // a non-null value, it will be passed back to the client
      });
    }
  }
}
  • /dump_thaumonomicon <Optional Comment> command. Run it from the client, and all Thaumcraft research will be dumped as a static website. The comment will be visible under the page title, and you can indicate the pack or mods for with which the dump was done. Dump example
  • /warpdim [dimension ID] command. Painlessly warp to a dimension (meant for debugging).
  • SessionAccessTokenOverrideMixin allows overriding the session access token in dev launches via -Dfentlib.accessTokenOverride=<token>.
  • Client sound utilities to set a custom max attenuation distance without increasing the sound volume. Methods:
SoundUtil.withMaxDistance(ISound sound, float maxDistance);
SoundUtil.playWithMaxDistance(ISound sound, float maxDistance);
SoundUtil.playWithMaxDistance(SoundHandler soundHandler, ISound sound, float maxDistance);
SoundUtil.playAt(ResourceLocation soundResource, double x, double y, double z, float volume, float pitch, float maxDistance);

Example:

SoundUtil.playAt(waveSound, x, y, z, 0.25F, 1.0F, 64.0F);
  • HTTP-on-Minecraft-port reverse proxying for local web UIs. Configure path-to-port mappings in config/fentlib/http-port-routes.json so services like Dynmap can be reached through the server port, such as /dynmap/..., instead of separate ports. Set publicBaseUrl in config/fentlib/fentlib.cfg to the public base URL of the server; mods should append their own relative route paths on top of it.
  • QOI image format support and utils thanks to saharNooby/qoi-java. For usage example, check out how support for server-icon.qoi is implemented.
  • WebP image format support and utils thanks to haraldk/TwelveMonkeys. For usage example, check out how support for server-icon.webp is implemented.
  • Default server icon path can be configured using the serverIconDirectory config option.

Fishing Loot Config

Set enableFishingLootTable=true in config/fentlib/fentlib.cfg to enable FentLib's fishing override. The loot table lives at config/fentlib/fishing-loot.json. When enabled, vanilla still decides whether a catch is fish, junk, or treasure, but the item itself comes only from this JSON.

The JSON has top-level fish, junk, and treasure lists. Each entry uses vanilla-style weight, supports count and meta ranges, can be limited to a biome whitelist with biomes or inverted into a blacklist with invertBiomes, and biome selectors can be numeric IDs, biome names, or * to match any biome. Entries can also use explicit numeric enchant IDs or useVanillaEnchantingRules for vanilla-style random enchanting.

{
  "fish": [
    {
      "item": "minecraft:fish",
      "weight": 60,
      "count": { "min": 1, "max": 1 },
      "meta": { "min": 0, "max": 0 }
    },
    {
      "item": "minecraft:fish",
      "weight": 10,
      "count": { "min": 1, "max": 2 },
      "meta": { "min": 1, "max": 1 },
      "biomes": ["ocean", "river"]
    }
  ]
}

Dependencies

Building

./gradlew build.

Credits

License

LGPLv3.

Buy me a coffee

  • ko-fi.com
  • Monero: 893tQ56jWt7czBsqAGPq8J5BDnYVCg2tvKpvwTcMY1LS79iDabopdxoUzNLEZtRTH4ewAcKLJ4DM4V41fvrJGHgeKArxwmJ


license

FentLib

A shared code library and tweak/fix mod.

logo

hub curse modrinth 67 maven forge cord

Features

  • Support for animated GIF server icons. Just drop a server-icon.gif file in the server root directory. Size limits are configurable. HodgePodge is a soft dependency, required if you want to use larger GIFs (because of the packet size limit). animated_server_icons Use the /reload_icon command to reload the icon. Also works for server-icon.png.
  • Removal of EnderCore / HodgePodge Info Button in the mod list screen.
  • API to modify the S00PacketServerInfo packet. Example:
public class ClientProxy extends CommonProxy {
    @Override
    public void preInit(FMLPreInitializationEvent event) {
      S00PacketServerInfoModifyService.registerDeserializeHandler((response, fentlibData, serverData) -> {
        if (fentlibData.has("server_to_client_payload")) {
          // Yoohoo we got something back!!!!
          // serverData contains stuff like server IP
        }
      });
    }
}

public class CommonProxy {
  public void preInit(FMLPreInitializationEvent event) {
    if (MiscUtil.isServer()) {
      S00PacketServerInfoModifyService.registerHandler((response, fentLibPresent) -> {
        // fentLibPresent is just a boolean indicating whether fentlib is loaded
        return "server_to_client_payload";
        // You can return a String, a S00PacketServerInfoModifyService.KeyValue, or a JsonElement. If you return
        // a non-null value, it will be passed back to the client
      });
    }
  }
}
  • /dump_thaumonomicon <Optional Comment> command. Run it from the client, and all Thaumcraft research will be dumped as a static website. The comment will be visible under the page title, and you can indicate the pack or mods for with which the dump was done. Dump example
  • /warpdim [dimension ID] command. Painlessly warp to a dimension (meant for debugging).
  • SessionAccessTokenOverrideMixin allows overriding the session access token in dev launches via -Dfentlib.accessTokenOverride=<token>.
  • Client sound utilities to set a custom max attenuation distance without increasing the sound volume. Methods:
SoundUtil.withMaxDistance(ISound sound, float maxDistance);
SoundUtil.playWithMaxDistance(ISound sound, float maxDistance);
SoundUtil.playWithMaxDistance(SoundHandler soundHandler, ISound sound, float maxDistance);
SoundUtil.playAt(ResourceLocation soundResource, double x, double y, double z, float volume, float pitch, float maxDistance);

Example:

SoundUtil.playAt(waveSound, x, y, z, 0.25F, 1.0F, 64.0F);
  • HTTP-on-Minecraft-port reverse proxying for local web UIs. Configure path-to-port mappings in config/fentlib/http-port-routes.json so services like Dynmap can be reached through the server port, such as /dynmap/..., instead of separate ports. Set publicBaseUrl in config/fentlib/fentlib.cfg to the public base URL of the server; mods should append their own relative route paths on top of it.
  • QOI image format support and utils thanks to saharNooby/qoi-java. For usage example, check out how support for server-icon.qoi is implemented.
  • WebP image format support and utils thanks to haraldk/TwelveMonkeys. For usage example, check out how support for server-icon.webp is implemented.
  • Default server icon path can be configured using the serverIconDirectory config option.

Fishing Loot Config

Set enableFishingLootTable=true in config/fentlib/fentlib.cfg to enable FentLib's fishing override. The loot table lives at config/fentlib/fishing-loot.json. When enabled, vanilla still decides whether a catch is fish, junk, or treasure, but the item itself comes only from this JSON.

The JSON has top-level fish, junk, and treasure lists. Each entry uses vanilla-style weight, supports count and meta ranges, can be limited to a biome whitelist with biomes or inverted into a blacklist with invertBiomes, and biome selectors can be numeric IDs, biome names, or * to match any biome. Entries can also use explicit numeric enchant IDs or useVanillaEnchantingRules for vanilla-style random enchanting.

{
  "fish": [
    {
      "item": "minecraft:fish",
      "weight": 60,
      "count": { "min": 1, "max": 1 },
      "meta": { "min": 0, "max": 0 }
    },
    {
      "item": "minecraft:fish",
      "weight": 10,
      "count": { "min": 1, "max": 2 },
      "meta": { "min": 1, "max": 1 },
      "biomes": ["ocean", "river"]
    }
  ]
}

Dependencies

Building

./gradlew build.

Credits

License

LGPLv3.

Buy me a coffee

  • ko-fi.com
  • Monero: 893tQ56jWt7czBsqAGPq8J5BDnYVCg2tvKpvwTcMY1LS79iDabopdxoUzNLEZtRTH4ewAcKLJ4DM4V41fvrJGHgeKArxwmJ

license

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Total Downloads
CurseForge
<1,000
Modrinth
<1,000
Last Updated
CurseForge
Created
CurseForge
Modrinth
Last synced
When ModDex last fetched and imported data for this project from CurseForge or Modrinth. High-traffic and active projects are checked more often.
Next pipeline sync