Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
radmanplays committed Mar 8, 2024
1 parent c608dcd commit 16ed64c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down
19 changes: 19 additions & 0 deletions docs/apidocs/globals/GlStateManager.md
Original file line number Diff line number Diff line change
@@ -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})`
7 changes: 6 additions & 1 deletion docs/apidocs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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})`
Expand All @@ -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})`
Expand Down

0 comments on commit 16ed64c

Please sign in to comment.