MDXLib

Mods
204,109 Downloads Last Updated: Jul 14, 2019 Game Version: 1.12.2

 

MDXLib (Minecraft Development Library X) is a new Minecraft mod development library used by the ASX Minecraft Mod Development Team. This library is open source. 

 

Features

  • Modern GUI Framework
  • Integrated Web Server for advanced server query
  • On-Screen Notifications
  • Drag-able Pop-up Windows
  • Ore XRAY for server operators and developers
  • Improved Chunk borders
  • Advanced rendering functions and classes
  • Item Renderers
  • Model Animations
  • Wavefront Model Loader
  • Schematic Loader
  • Waveform graphics
  • Weather, Storm, and Climate providers for dimensions
  • Improved Dimension registration and management
  • Reflection shortcuts
  • Common Game resource constants
  • Block, Item, and Entity ID remapping modules
  • Functions for detecting host OS versions and system hardware models
  • Library classes for commonly used functions related to Worlds, Entities, Inventories, Items, Blocks, and more!
  • Fluid material physics and on screen overlays
  • Item Drop objects (Store your item drops as constants!)
  • Save and load custom NBTs in your own file locations!
  • And more...

 

 

Integrated Web Server

The integrated web server allows you to retrieve specific system or game information from a client or server via a web browser. For example: Minecraft's RCON and Query features do not allow you to obtain system CPU usage. This is just one of the many stats MDXLib allows you to retrieve. Below are more of the available stats the web server's API provides.

 

Mod Developers

MDX Also allows you to add additional web hooks. You can use these web hooks to trigger actions with feedback or retrieve information from the game.

You can add additional web hooks simply by calling "WebModule.REQUESTS().add()". There are two primary types of hooks at this moment. Standard and Command. Standard hooks allow you to specify your own handling technique, while Command hooks allow you to execute host system commands. This can be especially useful when designing a server infrastructure.

Additional information

Web Server Port: 7761

API Format: JSON

Web Hooks

NOTE: At the moment the system statistics API is only supported on machines running Microsoft Windows. Unix systems are not supported. The server MUST be running on Windows for this API to function. The game API works regardless.

System Statistics API Webhooks

/sys/stat/cpu/totalusage - Shows total CPU usage

/sys/stat/cpu/coreusage - Shows CPU usage on individual cores

/sys/stat/cpu/corefrequency - Shows the base clock speed of each core

/sys/stat/memory/total - Shows total system memory

/sys/stat/memory/available - Shows available system memory

/sys/stat/disk/usage - Shows all disk usage (performance, not capacity)

/sys/stat/disk/readbps - Shows read speed in bytes per second for all disks

/sys/stat/disk/writebps - Shows write speed in bytes per second for all disks

/sys/stat/power/milliwatts - Shows system power usage if your host has a current sensor. (Dell Servers are supported, Does not work in a VM)

/sys/stat/gpu/usage - Shows the usage of all GPU engines for each GPU installed.

Game API Webhooks

/game/world/players/ - Shows detailed information for all players connected to the server. Player IP, Username, Nickname, UUID, Dimension, and Health.

 

An example using one of these webhooks: http://myserver.org:7761/sys/stat/cpu/coreusage

where myserver.org is the remote IP address or domain name of your server, 7761 being the port to access the web server through, and the rest of the request being the web hook provided above.

The returned output for a system with an Intel Core i9 7920X processor looks like this (XE1 is the hostname):

{  
   "\\\\XE1\\Processor Information(0,8)\\% Processor Utility":"9.270882",
   "\\\\XE1\\Processor Information(0,22)\\% Processor Utility":"108.561222",
   "\\\\XE1\\Processor Information(0,_Total)\\% Processor Utility":"21.844397",
   "\\\\XE1\\Processor Information(0,10)\\% Processor Utility":"21.172066",
   "\\\\XE1\\Processor Information(0,18)\\% Processor Utility":"19.858168",
   "\\\\XE1\\Processor Information(0,3)\\% Processor Utility":"10.110684",
   "\\\\XE1\\Processor Information(0,1)\\% Processor Utility":"0.661956",
   "\\\\XE1\\Processor Information(0,15)\\% Processor Utility":"1.941412",
   "\\\\XE1\\Processor Information(0,13)\\% Processor Utility":"11.573509",
   "\\\\XE1\\Processor Information(0,20)\\% Processor Utility":"14.673194",
   "\\\\XE1\\Processor Information(0,6)\\% Processor Utility":"13.183317",
   "\\\\XE1\\Processor Information(0,4)\\% Processor Utility":"34.759691",
   "\\\\XE1\\Processor Information(0,21)\\% Processor Utility":"4.217080",
   "\\\\XE1\\Processor Information(0,19)\\% Processor Utility":"5.873449",
   "\\\\XE1\\Processor Information(0,2)\\% Processor Utility":"29.601899",
   "\\\\XE1\\Processor Information(0,9)\\% Processor Utility":"40.381283",
   "\\\\XE1\\Processor Information(0,11)\\% Processor Utility":"9.830968",
   "\\\\XE1\\Processor Information(0,17)\\% Processor Utility":"8.065465",
   "\\\\XE1\\Processor Information(0,23)\\% Processor Utility":"5.964317",
   "\\\\XE1\\Processor Information(0,12)\\% Processor Utility":"8.560160",
   "\\\\XE1\\Processor Information(0,16)\\% Processor Utility":"13.224722",
   "\\\\XE1\\Processor Information(0,5)\\% Processor Utility":"2.744753",
   "\\\\XE1\\Processor Information(_Total)\\% Processor Utility":"21.844319",
   "\\\\XE1\\Processor Information(0,0)\\% Processor Utility":"61.362719",
   "\\\\XE1\\Processor Information(0,7)\\% Processor Utility":"10.136266",
   "\\\\XE1\\Processor Information(0,14)\\% Processor Utility":"78.543283"
}

 

More to come!

 

= END OF WEB SERVER SECTION =

 

Featured Mods Using MDX

  • AliensVsPredator
  • Starway (Unreleased)

Requirements

  • Java 8
  • Minecraft Forge

Adding MDX To Gradle As A Dependency

repositories {
    maven {
        name = "aliensvspredator"
        url = "http://maven.aliensvspredator.org/"
    }
}

dependencies {
    compile "com.arisux:mdxlib:2.0.0.33:deobf"
}

 

Conditions

  • Do not package MDX with your mod.
  • Do not redistribute

 

Javadoc

Comments

  • To post a comment, please or register a new account.
Posts Quoted: