Plugin Doesent work.

Started by UlvardsV on

Topic category: Help with MCreator software

Active 1 year ago
Joined Feb 2023
Points:
331

User statistics:

  • Modifications: 0
  • Forum topics: 9
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 35
Plugin Doesent work.

I am trying to make a plugin that finds the distance between 2 points. it doesen't really work. Here is the code 

{
 "args0": [
   {
     "type": "input_value",
     "name": "aX",
     "check": "Number"
   },
   {
     "type": "input_value",
     "name": "aY",
     "check": "Number"
   },
   {
     "type": "input_value",
     "name": "aZ",
     "check": "Number"
   },
   {
     "type": "input_value",
     "name": "bX",
     "check": "Number"
   },
   {
     "type": "input_value",
     "name": "bY",
     "check": "Number"
   },
   {
     "type": "input_value",
     "name": "bZ",
     "check": "Number"
   }
 ],
 "inputsInline": true,
 "output": "Number",
 "colour": 60,
 "tooltip": "Calculates the distance between two points",
 "mcreator": {
   "toolbox_id": "custom_procedures",
   "inputs": ["aX", "aY", "aZ", "bX", "bY", "bZ"]
 },
 "code": "Math.sqrt(Math.pow(aX - bX, 2) + Math.pow(aY - bY, 2) + Math.pow(aZ - bZ, 2));"
}