From 16ed64c02d458ab80765fb9b6e0c7d595ff1cc14 Mon Sep 17 00:00:00 2001 From: radmanplays <95340057+radmanplays@users.noreply.github.com> Date: Fri, 8 Mar 2024 13:24:37 +0330 Subject: [PATCH] update --- docs/.vitepress/config.ts | 1 + docs/apidocs/globals/GlStateManager.md | 19 +++++++++++++++++++ docs/apidocs/index.md | 7 ++++++- 3 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 docs/apidocs/globals/GlStateManager.md diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index d4dee51..8331440 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -68,6 +68,7 @@ export default defineConfig({ { text: 'ModAPI.require(String componentName)', link: '/apidocs/globals/require' }, { text: 'emptygui', link: '/apidocs/globals/emptygui' }, { text: 'ScaledResolution', link: '/apidocs/globals/ScaledResolution' }, + { text: 'GlStateManager', link: '/apidocs/globals/GlStateManager' }, { text: 'BlockData', link: '/apidocs/globals/BlockData' }, { text: 'ChunkData', link: '/apidocs/globals/ChunkData' }, { text: 'ContainerData', link: '/apidocs/globals/ContainerData' }, diff --git a/docs/apidocs/globals/GlStateManager.md b/docs/apidocs/globals/GlStateManager.md new file mode 100644 index 0000000..482c2b9 --- /dev/null +++ b/docs/apidocs/globals/GlStateManager.md @@ -0,0 +1,19 @@ +# GlStateManager +Allows you to access GlStateManager(please do some research before using this global. i have no idea what the methods/properties in this global do). `ModAPI.GlStateManager.(methods/properties)` + +Has the following properties: +- `stateDepthMask : Boolean` +- `stateCull : Boolean` +- `stateFog : Boolean` +- `stateGlobalBlend : Boolean` +- `stateLighting : Boolean` + +It has the following methods: +- `pushMatrix() : void` +- `popMatrix() : void` +- `recompileShaders() : void` +- `scale({x: Float, y: Float, z: Float})` +- `translate({x: Float, y: Float, z: Float})` +- `color({colorRed: Float, colorGreen: Float, colorBlue: Float, colorAlpha: Float})` +- `rotate({angle: Float, x: Float, y: Float, z: Float})` +- `matrixMode({mode: Integer})` diff --git a/docs/apidocs/index.md b/docs/apidocs/index.md index 7cd9ed3..af00df5 100644 --- a/docs/apidocs/index.md +++ b/docs/apidocs/index.md @@ -46,6 +46,8 @@ It has the following methods: - returns screen width - `getFONT_HEIGHT()` - returns the FONT_HEIGHT +- `getStringWidth({string: String}) : int` + - returns the width of a string based on minecraft's font - `drawStringWithShadow({msg: String, x: Integer, y: Integer, color: Integer})` - draws your string to screen and needs to be ran when the `drawhud` event is called. the color parameter needs be hex but # is replaced with 0x - `drawString({msg: String, x: Integer, y: Integer, color: Integer})` @@ -71,13 +73,16 @@ ModAPI.player.motionY += 1; ModAPI.player.reload(); ``` -Frequent calls to `reload()` may cause lag, so try to limit them. +Frequent calls to `reload()` may cause lag, so try to limit them + # Logger API Allows you to access the Log4J library from javascript. you can access it from `ModAPI.logger.(method)`. it has the following methods: +- `setlogger({name: String})` + - allows you to set the name of the logger - `loginfo({string: String})` - `logerror({string: String})` - `logdebug({string: String})`