Seam is currently under development
Some features may change throughout the development process.
Please report bugs, and suggest feature requests on our Issues page.Alternatively, you can let us know on the
#bug reportschannel on my Fluxer or Discord server, and we'll make an issue for you.
You can also use the#modding chatchannel if you need any help!
Seam contains several event registries, to help develop things easier.
These have been primarily designed around Luminance and Perspective, however other mods are welcome to use them!
This description isn't extensive, I recommend looking at our source code!
The following client event registries are located in the dev.dannytaylor.perspective.seam.client.events.SeamClientEvents class:
CustomBadges
SeamClientEvents.registerCustomBadge(Identifier badgeId, int outlineColor, int fillColor, int textColor); function to register custom badges, see example in the ModMenu Badges section below.ModBadges
SeamClientEvents.registerModBadge(String modId, Identifier customBadgeId); function to register mod badges, see example in the ModMenu Badges section below.IconOverrides
SeamClientEvents.registerIconOverride(String modId, IconOverride iconOverride); function to register icon overrides.ProfiledDebugEntries
SeamClientEvents.registerProfiledDebugEntry(Identifier identifier, DebugScreenEntry debugScreenEntry, DebugScreenProfile profile, DebugScreenEntryStatus status); function to register profiled debug entries.ClientResourceReloaders
net.minecraft.resources.Identifier, net.minecraft.server.packs.resources.PreparableReloadListener, which gets registered on client initialize, and executes on client resource reload.AfterClientResourceReload
net.minecraft.resources.Identifier, java.lang.Runnable, which executes after client resources have reloaded.BeforeGuiRender
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientRunnables.GuiRender, which renders before the gui.AfterGuiRender
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientRunnables.GuiRender, which renders after the gui.BeforeGameRender
net.minecraft.resources.Identifier, java.lang.Runnable, which executes before the game is rendered.AfterPanoramaRender
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientRunnables.PanoramaRender, which renders after the menu panorama.AfterVanillaPostEffectRender
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientRunnables.GameRender, which renders after the vanilla post-effect shader.BeforeUiRender
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientRunnables.GameRender, which renders before the current screen.AfterUiBackgroundRender
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientRunnables.GameRender, which renders after the current screen's background.AfterUiRender
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientRunnables.GameRender, which renders after everything.OnResized
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientRunnables.OnResized, which executes when the window is resized.OnMouseScroll
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientCallables.OnMouseScroll, which executes when the mouse is scrolled.OnMouseButton
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientCallables.OnMouseButton, which executes when the mouse handles a button.OnJoinWorld
net.minecraft.resources.Identifier, java.lang.Runnable, which executes when the client joins a world.OnLeaveWorld
net.minecraft.resources.Identifier, java.lang.Runnable, which executes when the client leaves a world.OnStartItemUse
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientRunnables.UseItem, which executes when the item is used (client-side only).OnFinishItemUse
net.minecraft.resources.Identifier, dev.dannytaylor.perspective.seam.client.events.SeamClientRunnables.FinishUsingItem, which executes when the item is finished being used (client-side only).Seam adds a message bar to the top-center of the screen. Currently, this can only be accessed and updated by the client.
You can update the Message Bar (on the client-side) by using the following function:
dev.dannytaylor.perspective.seam.client.events.SeamClientEvents.sendToMessageBar(Component.literal("this is an example message!"));
You can register a custom icon override with Seam. This will automatically update your mod's icon with Mod Menu. If you are using this with another mod (such as Sodium), you will have to implement this manually.
You can register custom mod menu badges with Seam.
Registering custom badges doesn't require mod menu to be installed.
Here is an example of how to register a custom mod menu badge.
import net.fabricmc.api.ClientModInitializer;
import net.minecraft.resources.Identifier;
import dev.dannytaylor.perspective.seam.client.events.SeamClientEvents;
public class MyClientInitializer implements ClientModInitializer {
public static final Identifier EXAMPLE_BADGE = SeamClientEvents.registerCustomBadge(
Identifier.parse("modid:example_badge"), // badge identifier
0xFFAAAAAA, // outline colour
0xFF808080, // fill colour
0xFFFFFFFF // text colour
);
@Override
public void onInitializeClient() {
SeamClientEvents.registerModBadge("modId", EXAMPLE_BADGE);
}
}
Seam contains two built-in badges.
Used by Perspective's mods, indicating they are part of Perspective.
Should be used by mods that use Luminance, indicating support for luminance shaders.
Here is an example of how to add the luminance badge to your mod.
import net.fabricmc.api.ClientModInitializer;
import dev.dannytaylor.perspective.seam.client.events.Badges;
public class MyClientInitializer implements ClientModInitializer {
@Override
public void onInitializeClient() {
Badges.luminance("modId");
}
}
Seam doesn't currently contain any common or server-only registries.
It does however contain some common functions, and classes.
dev.dannytaylor.perspective.seam.common.data.FabricMod, stores the mod id, name, and creates a logger.
You can also send messages to your logger via dev.dannytaylor.perspective.seam.common.data.log.SeamLog by specifying your FabricMod in the function arguments (info, warn, error, and debug all take the following arguments: (AbstractMod mod, String message, Object... args)).
dev.dannytaylor.perspective.seam.common.events.SeamEvents contains tryRun and onInitialize functions. These functions catch and log errors when running the specified runnable. The onInitialize functions also log what they are initializing.
