-
Notifications
You must be signed in to change notification settings - Fork 0
Client Outlines
Moth edited this page Aug 9, 2026
·
1 revision
ClientOutlines controls outlines locally on the client.
Use client outlines when an effect only needs to exist for the current client and does not need server synchronization.
import moth.butterflyapi.client.outline.ClientOutlines;ClientOutlines.set(
entity,
OutlineStyle.builder("#FFAA33")
.thickness(2)
.build()
);ClientOutlines.clear(
entity
);Remove every locally controlled outline with:
ClientOutlines.clearAll();Client outlines use the same OutlineStyle system as server outlines.
For example:
OutlineStyle style =
OutlineStyle.builder("#66CCFF")
.thickness(3)
.placement(
OutlinePlacement.OUTSIDE
)
.visibleThroughWalls(true)
.consistentThickness(true)
.build();
ClientOutlines.set(
entity,
style
);See Outline Styles for all available style options.
For cutout or translucent custom rendering, use:
OutlineStyle.builder("#FFFFFF")
.matchModelLayer(true)
.build();This helps the outline mask follow the source render layer.
Custom renderers that need to contribute their own outline mask can use:
OutlineRenderers.capture(...)Block entities whose renderer exists only for outline-mask contribution can implement:
OutlineOnlyBlockEntityUse ClientOutlines when:
- The effect is local
- Only the current client needs to see it
- No synchronization is required
Use Server Outlines when:
- The logical server controls the effect
- Multiple clients need synchronized state
- Different viewers may receive different outlines