generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RenderUtils for block outline width
- Loading branch information
1 parent
6dc2c4f
commit f0dfe1b
Showing
3 changed files
with
42 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package me.mixces.animatium.util | ||
|
||
import com.mojang.blaze3d.systems.RenderSystem | ||
|
||
abstract class RenderUtils { | ||
companion object { | ||
private var lineWidth: Float = -1.0F | ||
|
||
@JvmStatic | ||
fun getLineWidth(): Float { | ||
return if (lineWidth == -1.0F) RenderSystem.getShaderLineWidth() else lineWidth | ||
} | ||
|
||
@JvmStatic | ||
fun getLineWidth(default: Float): Float { | ||
return if (lineWidth == -1.0F) default else lineWidth | ||
} | ||
|
||
@JvmStatic | ||
fun setLineWidth(width: Float) { | ||
lineWidth = width | ||
} | ||
} | ||
} |