A simple, easy-to-use screen flash system!
Lux is a simple, easy to use screen flash system for Minecraft which can be used extremely efficiently.
To add the mod to your development environment, import this into your repositories tab:
maven {
url = "https://api.modrinth.com/maven"
}
This allows Modrinth URLs to be imported,
then, add this to your dependencies tab:
modImplementation "maven.modrinth:lux_chemthunder:${project.lux_version}"
And this will import Lux!
To use a screen flash, simply type the LuxFlashRenderer into your given method (method should contain a PlayerEntity, which is the viewer.)
Then, add .sendFlash, and input the parameters, which are as follows:
PlayerEntity viewer: who can see the flash.
int color: the color of the flash.
Easing easing: The easing of the flash.
int holdTicks: The amount of ticks the initial frame of the flash is held.
public class TestItem extends Item {
public TestItem(Settings settings) {
super(settings);
}
public TypedActionResult<ItemStack> use(World world, PlayerEntity user, Hand hand) {
LuxFlashRenderer.sendFlash(user, 0xffffff, Easing.easeOutQuad, 20);
return super.use(world, user, hand);
}
}
LuxFlashRenderer.sendFlash(user, 0xffffff);
LuxFlashRenderer.sendFlash(user, 0xffffff, Easing.linear);
LuxFlashRenderer.sendFlash(user, 0xffffff, Easing.linear, 20);
LuxFlashRenderer.sendFlash(user, 0xffffff, 20);
1.21.1.Mod Loader?
Conversation