Download Framework — Minecraft Mods — MetaMods
Framework

Framework

Active

Downloads

75

Last update

1 year ago
Client
Fabric
Quilt
Forge
Neoforge
Libraries

Framework - Universal Library for Mod Developers

Framework Banner

Framework is a powerful library designed to simplify the development of mods compatible with various platforms. It includes ready-made systems for content registration, network communication, and many other useful tools that significantly speed up the process of creating modifications.

🎨 Advanced Model Format

The library offers an enhanced model format that overcomes the limitations of Minecraft's standard system. Now you can rotate model elements at arbitrary angles, not just in 22.5-degree increments. Additionally, elements can extend beyond standard boundaries from [-16,-16,-16] to [32,32,32], opening up new possibilities for creating complex objects like this helicopter model.

Helicopter Model

🔗 Synchronized Data Keys

This system represents an improved version of Minecraft's entity data access mechanism. It allows adding additional information to any entities without the need to create complex capabilities. Key advantages include automatic data synchronization between client and server, information preservation during world reloads, and the ability to retain data after entity death.

Example of tracking chicken hit count:

// Creating a synchronized data key
private static final SyncedDataKey<Chicken, Boolean> HIT_COUNT = SyncedDataKey.builder(SyncedClassKey.CHICKEN, Serializers.INTEGER)
    .id(new ResourceLocation("your_mod_id", "hit_count"))
    .defaultValueSupplier(() -> 0)
    .saveToFile()
    .syncMode(SyncMode.TRACKING_ONLY)
    .build();

// Registration in common setup
FrameworkAPI.registerSyncedDataKey(HIT_COUNT);

// Forge event when attacking an entity
void onHitEntity(AttackEntityEvent event) {
    if(event.getTarget() instanceof Chicken chicken) {
        int newCount = HIT_COUNT.getValue(chicken) + 1;
        HIT_COUNT.setValue(chicken, newCount);
    }
}

📡 Simplified Login Packets

While Forge provides the ability to create login packets, their implementation requires writing a large amount of code. Framework significantly simplifies this process by offering a simple registration method and automatically handling data transmission to clients.

Code Example

💻 For Developers

Learn how Framework can improve your development process by exploring all available features and capabilities of the library.

Developer Features

Project members
MrCrayfish

MrCrayfish

Created: 18 Jun 2024

ID: 11331