Riftxs Lib
Riftxs Lib is a library for Minecraft Forge 1.20.1 that helps developers make Minecraft mods. It gives them tools and systems that they can use to make their mods.
When you make a mod you do not have to start from scratch. Riftxs Lib has things that you can use, like physics and animations that you can just put into your mod. This saves you a lot of time and work.
Features
Physics API
You can make your physics for things in the game like entities and blocks. This means you can control how they move and react to things.
You can make your gravity
You can control how fast things move
You can apply forces to things
You can make things resist air and drag
You can make blocks feel heavy or light
You can make blocks bounce
You can make blocks that pull things towards them
You can make your collision detection
You can filter out collisions
Error Popup API
You can make your popups in the game to tell players things. These popups can have buttons that players can click.
Features include:
You can make popups that just give information
You can make popups that warn players about things
You can make popups that tell players about errors
You can make popups that tell players about bad errors
You can add buttons to your popups
You can make a queue of popups
You can make notifications that stay on the screen
You can use these buttons:
OK
Cancel
Yes
No
Retry
Ignore
Animation API
You can change how entities animate without having to write a lot of code. This means you can make them move and act in ways.
Features:
You can make all animations go faster or slower
You can make individual animations go faster or slower
You can make entities bigger or smaller
You can make parts of entities smaller
You can add your animation effects
There are some built-in effects that you can use:
Slow Motion
Fast Forward
Reverse
Freeze
Model Import API
You can bring models from outside the game into Minecraft. This means you can use models that you made or found elsewhere.
Riftxs Lib supports these formats:
OBJ
FBX
glTF
It includes:
A full parser for OBJ files
Support for meshes
Support for materials
Support for UV mapping
Support for normals
A bone system
animation
A model registry
Installation
To use Riftxs Lib you need:
Minecraft 1.20.1
Minecraft Forge. Newer
Java 17
You need to add Riftxs Lib to your project.
Build.gradle
dependencies {
implementation fg.deobf("com.riftx.lib:riftxlib:1.0.0")
}
mods.toml
[[dependencies.yourmodid]]
modId="riftxlib"
mandatory=true
versionRange="[1.0.0,)"
ordering="AFTER"
side="BOTH"
Here is an example of how you can use Riftxs Lib:
import com.riftx.lib.RiftxLib;
// Physics
Riftxs Lib PHYSICS API sets the gravity of an entity to 0.5
Riftxs Lib PHYSICS API applies a force to an entity
// Error Popup
Riftxs Lib ERROR_POPUP_API shows an error popup
// Animation
Riftxs Lib ANIMATION_API sets the animation speed of a zombie to 2.0
// Model Import
Riftxs Lib MODEL_IMPORT_API imports a model from a file
Frequently Asked Questions
Does Riftxs Lib add gameplay to Minecraft?
No Riftxs Lib does not add gameplay to Minecraft. It is a library that helps developers make mods.
Can I use Riftxs Lib in my mod?
Yes you can use Riftxs Lib in your mod. You are free to use it in both public projects.
Can I include Riftxs Lib in a modpack?
Yes you can include Riftxs Lib in a modpack. You can use it in private modpacks.
Does Riftxs Lib support NeoForge, Fabric or Quilt?
No Riftxs Lib does not support NeoForge, Fabric or Quilt now. It only works with Minecraft Forge 1.20.1.
Where do I report bugs in Riftxs Lib?
If you find a bug in Riftxs Lib please tell us about it. We need to know:
What version of Minecraft you are using
What version of Forge you are using
What version of Riftxs Lib you are using
What the crash report says
What the latest.log says
How to make the bug happen again
Terms of Use
When you use Riftxs Lib you have to agree to these rules:
Do not say that you made Riftxs Lib
You can use Riftxs Lib in private mods
You can include Riftxs Lib in modpacks
You can change the source code of Riftxs Lib for your use
If you share a changed version of Riftxs Lib you have to say that it has been changed
You have to keep all the copyright and license notices
Riftxs Lib is provided "as is" without any warranty
Credits
Riftx is the creator and lead developer of Riftxs Lib.
Loldog helped with scripting.
The Minecraft Modding Community gave us feedback and inspiration.
License
Riftxs Lib is licensed under the MIT License. You can find the license information, in the LICENSE.txt file.
