Skript icon indicating copy to clipboard operation
Skript copied to clipboard

Spawn Falling Block throws NPE

Open NotSoDelayed opened this issue 3 years ago • 2 comments

Skript/Server Version

[03:12:54 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[03:12:54 INFO]: [Skript] Skript's documentation can be found here: https://skriptlang.github.io/Skript
[03:12:54 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[03:12:54 INFO]: [Skript] Server Version: git-Paper-81 (MC: 1.19)
[03:12:54 INFO]: [Skript] Skript Version: 2.6.3
[03:12:54 INFO]: [Skript] Installed Skript Addons:
[03:12:54 INFO]: [Skript]  - skript-yaml v1.4
[03:12:54 INFO]: [Skript]  - reqn v1.3.0-alpha
[03:12:54 INFO]: [Skript]  - skript-reflect v2.3 (https://github.com/TPGamesNL/skript-reflect)
[03:12:54 INFO]: [Skript]  - SkBee v2.1.0 (https://github.com/ShaneBeee/SkBee)
[03:12:54 INFO]: [Skript] Installed dependencies: None

Bug Description

Using EffSecSpawn to spawn a Falling Block throws NPE.

Expected Behavior

Does not throws NPE, and perhaps default to falling block of Sand Block as in pre-1.13 is called falling_sand after all.

Steps to Reproduce

Code used: spawn falling block at player

Errors or Screenshots

image

Other

No response

Agreement

  • [X] I have read the guidelines above and affirm I am following them with this report.

NotSoDelayed avatar Aug 23 '22 19:08 NotSoDelayed

Further testing shows that spawning a falling block with SkBee's NBT throws the exact same error. Code used: spawn falling block with nbt compound of "{BlockState:{Name:""minecraft:sand""},Time:1,DropItem:0b,HurtEntities:0b}"

NotSoDelayed avatar Aug 23 '22 19:08 NotSoDelayed

As a workaround, specify the type of falling block, e.g. falling stone.

FallingBlockData#types is nullable, but the spawn method doesn't deal with this properly.

TPGamesNL avatar Aug 24 '22 09:08 TPGamesNL