
ColorableLib
SuperbWarfare library for easy vehicle coloring.
Автор: NotPancerny3,6 тыс.0обновлён 6 мая 2026 г.
Библиотеки
Описание
Library used to easily implement SuperbWarfare vehicles coloring.
ColorableLib is a lightweight library dedicated for SuperbWarfare addons. ColorableLib is based on Capability logic and implements management engine and automatic server-client synchronization, also changing SuperbWarfere vehicle renderer.
import colorable.capability.EntityColorCapability;
import net.minecraft.world.entity.Entity;
/**
* Example usage of the ColorableLib API.
*/
public class ColorableExample {
/**
* Demonstrates how to manipulate entity color layers.
*
* @param targetEntity The entity to be colored (must support the capability).
* @param color Color in decimal or hex format (e.g., 0xFF0000 for red).
*/
public void exampleMethod(Entity targetEntity, int color) {
// Access the color capability of the target entity
targetEntity.getCapability(EntityColorCapability.CAPABILITY).ifPresent(cap -> {
if (!targetEntity.level().isClientSide) {
// Add or update a specific color layer
cap.setLayer(targetEntity, "example_id", color);
// Removed a specified layer
cap.removeLayer(targetEntity, "example_id");
}
});
}
}
Галерея
Последние версии
Все версии →release
ColorableLib 1.0.0
1.0.06 мая 2026 г.3,6 тыс.Minecraft: 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2forge
