Skript: skull types support.

Created on 2 Jan 2017  路  4Comments  路  Source: SkriptLang/Skript

you add the types of skulls? #player_skull_block, creeper_skull_block to do...
example:

on rightclick on note_block:
    block above location = floor_mob_head_block or wall_mob_head_block
    cancel event
    send "true"
    if block above location = creeper_skull_block:
        #play sound

wiki: http://minecraft.gamepedia.com/Mob_head
api:
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/block/Skull.html
https://hub.spigotmc.org/javadocs/spigot/org/bukkit/SkullType.html

bug low

Most helpful comment

Thank.
addon: SkStuff
temporary solution:

on click on floor_mob_head_block or wall_mob_head_block:
    if tag "SkullType" of nbt of block = 4:
        broadcast "{Creeper Head}"

All 4 comments

I think there is already this feature. Also, you can just use IDs.

# -- mob head --
{mob head direction}:
    floor = :1
    wall = :2-5
{mob head type}:
    skeleton = :0
    wither skeleton = :1
    zombie = :2
    (human|player) = :3
    creeper = :4

You actually can't use IDs for skull types @TrademarkTM, as the actual placed blocks store their skull type in an NBT tag called SkullType which is not accessible in vanilla Skript (though SkStuff can help you here, @FUZIK ).

This would probably make sense to have vanilla Skript support for though. For Bensku, this would use the SkullType enum, and you can retrieve a placed skull's skull type with getSkullType().

Thank.
addon: SkStuff
temporary solution:

on click on floor_mob_head_block or wall_mob_head_block:
    if tag "SkullType" of nbt of block = 4:
        broadcast "{Creeper Head}"

This should now be possible with the new aliases. This issue is very old so if you have issues with the skulls feel free to ping me or report a new issue (preferably in the aliases repo) but the support is now there.

Was this page helpful?
0 / 5 - 0 ratings