Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot cast java.lang.Double #441

Open
gregja opened this issue Mar 29, 2020 · 9 comments
Open

Cannot cast java.lang.Double #441

gregja opened this issue Mar 29, 2020 · 9 comments

Comments

@gregja
Copy link

gregja commented Mar 29, 2020

Hi,
I hope that everybody here is in good health.
I met a bug with the drone object.
My config is :

Scriptcraft on Fedora 29.
JDK 1.8.0-232 (wich includes Nashorn)
Spigot-1.15.2
MagicCraft (as recommended in that issue #437)

The error is :

xxx issued server command: /js drone.box(blocks.rainbow[1])
[10:48:03 INFO]: [scriptcraft] Drone build error: java.lang.ClassCastException: Cannot cast java.lang.Double to org.bukkit.block.data.BlockData while processing function wrapperFn() { [native code] }

Simple commands like "/js var drone = new Drone(self)" seems to work fine.
Is is due to something wrong in my configuration ?
Thank's for you help.
Take care.

@TzunamiDev
Copy link

Do you have more details about this error ?, I just tried this on my server and it seems to work properly without any exceptions

@wwlib
Copy link

wwlib commented Apr 2, 2020

I am seeing the same errors after installing a scriptcraft.jar that I just built from the latest development commit:

commit 6f5771d4c842ea86143ae5d5c9e022292bcd0de6
Merge: dae0f9d 24568fd
Author: Walter Higgins <[email protected]>
Date:   Tue Feb 4 14:42:45 2020 +0000

    Merge pull request #434 from jwulf/patch-4
    
    Gracefully fail drone module on 1.15.2+

[scriptcraft] Drone build error: java.lang.ClassCastException: Cannot cast java.lang.Integer to org.bukkit.block.data.BlockData while processing function wrapperFn() { [native code] }

[scriptcraft] Drone build error: java.lang.ClassCastException: Cannot cast java.lang.Double to org.bukkit.block.data.BlockData while processing function wrapperFn() { [native code] }

I am running spigot.1.15.2.jar

Note: I updates build.xml to target 1.8 vs 1.6

<javac includeantruntime="false" 
           source="1.8" 
           target="1.8" 
           destdir="${build}" 
           debug="true">

java version "1.8.0_131"

Andrew

@jwulf
Copy link
Contributor

jwulf commented Apr 3, 2020

See this issue: #401

Drone doesn't work with 1.15.2

@wwlib
Copy link

wwlib commented Apr 3, 2020

Thanks for the reply.

Is there an alternative to CraftEvil - or another way to place blocks?

@wwlib
Copy link

wwlib commented Apr 3, 2020

I just cloned MagikCraft and like the npm-style setup. Happy to help if there is a way to get Drone working again.

@jwulf
Copy link
Contributor

jwulf commented Apr 4, 2020

Great - you are basically where everyone else is with it. It doesn't work, and we need to find a new way to implement it.

I don't use it, so I don't have a motivation to spend time in there figuring it out. If it's your jam, and you can do it - that would be awesome!

@wwlib
Copy link

wwlib commented Apr 7, 2020

I will give it a shot. If there is someone who would be willing to chat for a few minutes (discord?) about the most relevant background that would be great. Maybe a spigot developer who is familiar with ScriptCraft/MagikCraft? (I am new to this community.)

@jwulf
Copy link
Contributor

jwulf commented Apr 7, 2020

I'm familiar with ScriptCraft and MagikCraft, but not with this particular aspect of Spigot (which is why it is not a low-orbit task for me). Happy to chat on Discord.

Link expires in 1 day: https://discord.gg/v5epMc

@justinchin919
Copy link

justinchin919 commented Jun 26, 2020

So summary here is ScriptCraft for MC version 1.15.2 and newer will not work due to the dependency Drone and CraftEvil?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants