Compatibility
Minecraft: Java Edition
1.21.x
1.20.6
1.20.1
Platforms
Supported environments
Client and server
Links
Tags
Creators
Details
Licensed MIT
Published 2 months ago

Docs
This library includes animation player, Create 0.5.1/6.0.0, Create: Copycats and CC:Tweaked compatibility
Animations
Animation player with a lot of uses
Registering clip in code
AnimationClip clip = AnimationClip.builder("myaddon:drill_pose", 20.0F)
.looping(true)
.track(new TimelineTrack("right_arm", List.of(
new Keyframe(0.0F, Transform.IDENTITY, Easing.LINEAR),
new Keyframe(10.0F, new Transform(Float3.ZERO, new Float3(-0.5F, 0.0F, 0.0F), Float3.ONE), Easing.EASE_IN_OUT),
new Keyframe(20.0F, Transform.IDENTITY, Easing.EASE_IN_OUT)
)))
.build();
LibraryApi.registerAnimation(new ResourceLocation("myaddon", "drill_pose"), clip);
Playing on server
LibraryApi.playAnimation(serverPlayer, new ResourceLocation("myaddon", "drill_pose"), 1.0F, true);
Triggering from client
LibraryApi.requestSelfAnimation(new ResourceLocation("myaddon", "drill_pose"), 1.0F, true);
This sends a client->server packet and is controlled by config (allowClientAnimationTriggerPacket).
Data-driven clips
Drop JSON into data/<namespace>/r15lib_animations/<name>.json.
Example shape:
{
"length": 12.0,
"looping": false,
"tracks": {
"right_arm": [
{ "tick": 0.0, "rotation": [0.0, 0.0, 0.0], "easing": "LINEAR" },
{ "tick": 4.0, "rotation": [-0.95, 0.1, 0.0], "easing": "EASE_OUT" },
{ "tick": 12.0, "rotation": [0.0, 0.0, 0.0], "easing": "EASE_IN_OUT" }
]
}
}
Commands
/r15lib play <targets> <clip> [looping] [speed]/r15lib stop <targets>/r15lib clips
CC:Tweaked
Key pieces
@LuaPeripheralMethodannotation for exposed methods.CcTweakedApi.registerPeripheral(...)to bind aBlockEntityclass to a peripheral type.- Reflection bridge creates an
IDynamicPeripheralproxy when CC is installed. - Auto capability attach via Forge event hooks.
Quick example
public class CrusherPeripheralOwner {
private final MyCrusherBlockEntity blockEntity;
public CrusherPeripheralOwner(MyCrusherBlockEntity blockEntity) {
this.blockEntity = blockEntity;
}
@LuaPeripheralMethod("get_progress")
public int getProgress() {
return blockEntity.getProgress();
}
@LuaPeripheralMethod("set_enabled")
public void setEnabled(boolean enabled) {
blockEntity.setEnabled(enabled);
}
}
CcTweakedApi.registerPeripheralFromOwnerClass(
MyCrusherBlockEntity.class,
"myaddon_crusher",
CrusherPeripheralOwner::new,
CrusherPeripheralOwner.class
);
Commands
/r15lib cc/r15lib cc bindings/r15lib cc methods <binding-class>
Create: Copycats Plus
What is included
- Compat detection with multiple candidate mod ids
- Copycat block/block entity detection helpers
- Material scanning (
getMaterial) - Area survey service returning:
- scanned block count
- copycat block count
- copycat block entity count
- materialized entry count
- material id (dominant one)
API
CopycatsApi.isLoaded()CopycatsApi.isCopycat(state)CopycatsApi.isCopycat(blockEntity)CopycatsApi.material(blockEntity)CopycatsApi.survey(level, center, radius)
Config
enableCopycatsReflectionmaxCopycatsSurveyRadius
Commands
/r15lib copycats/r15lib copycats inspect/r15lib copycats survey [radius]
Create
CreateCompatService auto-detects Create and exposes:
installed()line()->V0_5/V0_6/UNKNOWNversion()isKineticBlockEntity(BlockEntity)- reflection reads:
readStressImpact(...)readStressCapacity(...)readSpeed(...)isOverStressed(...)
API usage
CreateAddonApi.snapshot(blockEntity) returns a CreateKineticSnapshot with:
- impact
- capacity
- usage ratio
- speed
- overstressed
- stress tier (
IDLE,LIGHT,MEDIUM,HEAVY,CRITICAL)
CreateAddonApi.survey(level, center, radius) aggregates a local kinetic network area.
Commands
/r15lib create/r15lib create inspect/r15lib create survey [radius]/r15lib create plan <capacity> <machineImpact>/r15lib create profile list/r15lib create profile calc <profile> <capacity>


