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

Spawning an entity in a spawn event causes a stack trace #7156

Open
1 task done
Fusezion opened this issue Oct 18, 2024 · 1 comment
Open
1 task done

Spawning an entity in a spawn event causes a stack trace #7156

Fusezion opened this issue Oct 18, 2024 · 1 comment

Comments

@Fusezion
Copy link
Contributor

Skript/Server Version

[01:43:43 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[01:43:43 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[01:43:43 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[01:43:43 INFO]: [Skript] Server Version: 1.21.1-118-fb76840 (MC: 1.21.1)
[01:43:43 INFO]: [Skript] Skript Version: 2.9.3 (skriptlang-github)
[01:43:43 INFO]: [Skript] Installed Skript Addons:
[01:43:43 INFO]: [Skript]  - skript-gui v1.3 (https://github.com/APickledWalrus/skript-gui)
[01:43:43 INFO]: [Skript]  - skript-reflect v2.5.1 (https://github.com/SkriptLang/skript-reflect)
[01:43:43 INFO]: [Skript]  - SkAnimation v1.0.1 (fusezion.github.io)
[01:43:43 INFO]: [Skript]  - SkBee v3.6.2 (https://github.com/ShaneBeee/SkBee)
[01:43:43 INFO]: [Skript] Installed dependencies:
[01:43:43 INFO]: [Skript]  - Vault v1.7.3-b131

Bug Description

When attempting to spawn an entity using type of entity expression appears to causes a stacktrace

Expected Behavior

Don't cause any stack trace and possibly just fail silently if proper execution is impossible

Steps to Reproduce

on spawn of a monster:
    spawn reason is spawn egg or custom
    set {_type} to type of entity
    set {_loc} to location of entity
    spawn {_type} at {_loc}

Errors or Screenshots

https://gist.github.com/Fusezion/2c3dea45c7307928a34235c44b8eaff7

Other

I'm not really 100% sure what's causing this as it works perfectly fine using spawn zombie at location

Agreement

  • I have read the guidelines above and affirm I am following them with this report.
@TheAbsolutionism
Copy link

TheAbsolutionism commented Nov 1, 2024

So I did some testing, if you were to do type of event-entity it works normal, with the type returning properly. i.e. EntityType of Zombie
But doing type of entity returns EntityType of Entity.
I currently dont know a fix for it but was atleast putting the info here. Maybe instead of the parser using the ExprEntity, its using the entity class/type

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

2 participants