Open nickmalleson opened 4 years ago
Confirmed. I have same issue -- first time setting up ScriptCraft as well. /js 1+1
works fine, the 'blocks howl' demo works fine, but /js up()
throws an exception.
The exceptions above are easy to fix:
(As you seem to use MC 1.16.2, possibly, you also should integrate the changes from pull request "minor workable fix for drone on 1.15.x and 1.16.x #443", before...)
Find these lines in your spigot server folder ./scriptcraft/modules/drone/index.js (must be about line 349)
console.log('Drone using CraftEvil.setTypeIdAndData method');
var CraftEvil = Java.type(server.class.package.name + '.util.CraftEvil');
return function(block, typeId, data, applyPhysics) {
and change them to become these lines:
console.log('Drone using CraftEvil.setTypeIdAndData method');
var CraftEvil = Java.type(server.class.package.name + '.legacy.CraftEvil');
return function(block, typeId, data, applyPhysics) {
Greetings,
Markus
Thanks Markus, changing those three lines worked a treat. I didn't integrate the changes from #443 but will do that first if I hit any other problems. I'll leave this open in case you intend to integrate the changes into the main branch first.
And thanks for helping this great library, I'm playing minecraft with my son and am tricking him into learning to code without him realising it :-)
Huge thanks @Markus-1974
I'm new to ScriptCraft, so apologies in advance if I've done something stupid. I am using ScriptCraft version 3.4.0 (https://github.com/walterhiggins/ScriptCraft/releases/tag/3.4.0) running with spigot-1.16.2 on OS X Catalina (10.15.6). I have successfully installed the ScriptCraft plugin and can make the simple 'greet' mod to print my username. But if I try to run the command
I get the following error:
(full stack trace below).
A few commands work, e.g.
\js blocks.oak
returns"5"
but any function calls give similar errors to the one above.There are also some warnings thrown when the server stars up which may be relevant:
Any ideas why function calls don't work?
Thanks in advance, Nick
Full stack trace from
/js up().box( blocks.wool.black, 4, 9, 1 )
: