Stats

1421 views 44 downloadsJan 13, 2023 Jan 13, 2023

Not rated yet


Creators and Publishers

Fabricators-of-Create

Creator

mchoarder

Publisher

Additional Links

You may find some useful information by following these links

https://www.curseforge.com/minecraft/mc-mods/porting-lib


Share this post



Porting Lib Mod

Porting Lib (also known as Forge PortingLib) is a library that ports many Minecraft Forge features to FabricMC and QuiltMC. The developer, AlphaMode and Fabricators-of-Create, is a developer of both FabricMC and QuiltMC and is also involved in porting many of the big name Forge mods to these platforms.

 The mod should be installed like any other mod for players; it does very little on its own but is used by some third-party mods to do so.


For developers, you can put this in your development environment and make or port mods with it.

 

Porting Lib is modular and has many modules based on the sections of MC Forge. It is important to note, however, that despite having similar functionality to Minecraft Forge, it is not exactly the same, and the Package/Class and Method/Field names are also different. This means you WILL NOT be able to just copy and paste all your code and have it work, you will need to generally do some refactoring. It is a library for helping to port your mod, not an abstraction layer or actual port of the MC Forge libraries.

 

The modules that they have so far are:

  • lazy_registration (similar to deferred     registries)

  • transfer (a transfer API for stuff like     fluids and storage)

  • tags (Item, Block, and similar tags).

  • accessors (which help you access some     private methods, fields, and classes without as much reflection)

  • obj_loader (allows you to use.OBJ     models and meshes in your mod)

  • models (general model API)

  • model_loader (allowing you to load     models)

  • networking (dealing with networking and     packets)

  • model_generators (which help make     models with data generation)

  • extensions (general extensions to     vanilla classes)

  • entity (APIs related to entities such     as mobs and arrows)

  • constants (many fields that remain     constant are used for storing information and are frequently used     internally)

  • common (stuff used by many of the     modules)

  • base (the main module containing basic     stuff)

  • attributes (which let you set entities     and other attributes) 

  • fake_players (used for simulating     players)

 

More information can be found on the Porting Lib Github to help you with developing your mod, setting up your dev environment, getting info about the porting to 1.19.3, getting info about each module, contributing, and other suggested tools for porting, some also by Fabricators-of-Create, alternative mods, and other ports of MC Forge stuff to Fabric.

 

Porting Lib is different from Architectury. While porting lib is only one way, from forge to fabric, Architectury works to have a common code for both fabric and forge. Additionally, Architectury contains a full toolchain with its own development environments and other stuff, while Porting Lib is stand-alone. Porting Lib may be good for MultiLoader projects where in the Forge section you can have references to the Forge APIs and in the Fabric section you can have references to the Porting Lib APIs, and the common can reference the abstractions to the specific code, meaning you can have similar code on both without much work in one environment. Porting Lib is also much lighter but also less advanced and does not have as much platform detection or platform specific stuff, as you are supposed to use it only in fabric-based environments. You can also use FeatureCreep if you want to target multiple Platforms.