repositories {
maven {
name = 'Denanu Mods'
url = 'https://wandhoven.ddns.net/maven/'
}
}
dependencies {
modImplementation "net.denanu.BlockHighlighting:BlockHighlighting-<Minecraft_Version>:<StoppableSound_version>"
}
Server and Client Side, define Highlighters
public static final Identifier HIGHLIGHTER_ID = HighlightIds.register(Identifier.of(MOD_ID, "name"));
Only on the client for a generic highlighter, create it as follows. Note that the names must match.
public static HighlightType HIGHLIGHTER = HighlightTypes.register(MOD_ID, "name");
instead of registering a default highlighter, you can also define the highlighters default outline and fill color. These must be done in Hex codes using Alpha, Red, Green, Blue syntax. This can be done as follows:
public static HighlightType HIGHLIGHTER = BlockHighlightingAmaziaConfig.register(MOD_ID, "name", "#FFFFFFFF", "#20FFFFFF"); #outline , fill
Server Side To highlight or unhighlight blocks (at Position pos) in the world (world) use the following functions respectivly, where ID is the Highlighter ID (previously defined)
Highlighter.highlight(world, ID, pos);
Highlighter.unhighlight(world, ID, pos);