Reflection / Java access

Very limited reflection is possible, but is not recommended. Use it in cases, when mod doesn't have integration.

// side: client
// This is a startup script. This script changes a java variable in ProjectE mod by accessing code directly

// Listen to post-init event, after all mods have loaded
onEvent('postinit', event => {
  // Loads Java class field
  var PECore = java('moze_intel.projecte.PECore')
  // Changes public static boolean DEV_ENVIRONMENT of PECore class to false

Revision #3
Created Sun, Jun 28, 2020 5:14 PM by LatvianModder
Updated Tue, Apr 27, 2021 10:16 AM by LatvianModder