Droppable Cakes

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Stefqnutz

Active Member
Sep 23, 2019
67
1
8
19
This plugin is rather simple, it does what it says, it allows you to break and place cakes. It also remembers the tick at which you have broken a cake, so lets say you broke a cake at tick 4. Well next time you place that cake it will place it at tick 4.
 
here it will tell how many piece left in item lore too

Code:
on break:
    if event-block is cake:
        if block data tag "bites" of event-block is 0:
            drop cake at event-location
            stop
        if block data tag "bites" of event-block is 1:
            drop cake with lore "&ePiece left: 6" at event-location
            stop
        if block data tag "bites" of event-block is 2:
            drop cake with lore "&ePiece left: 5" at event-location
            stop
        if block data tag "bites" of event-block is 3:
            drop cake with lore "&ePiece left: 4" at event-location
            stop
        if block data tag "bites" of event-block is 4:
            drop cake with lore "&ePiece left: 3" at event-location
            stop
        if block data tag "bites" of event-block is 5:
            drop cake with lore "&ePiece left: 2" at event-location
            stop
        if block data tag "bites" of event-block is 6:
            drop cake with lore "&ePiece left: 1" at event-location
            stop
    else:
        stop

on place of cake:
    if "%lore of player's tool%" contains "&ePiece left: 6":
        set event-block to cake[bites=1]
        stop
    if "%lore of player's tool%" contains "&ePiece left: 5":
        set event-block to cake[bites=2]
        stop
    if "%lore of player's tool%" contains "&ePiece left: 4":
        set event-block to cake[bites=3]
        stop
    if "%lore of player's tool%" contains "&ePiece left: 3":
        set event-block to cake[bites=4]
        stop
    if "%lore of player's tool%" contains "&ePiece left: 2":
        set event-block to cake[bites=5]
        stop
    if "%lore of player's tool%" contains "&ePiece left: 1":
        set event-block to cake[bites=6]
        stop
 
Last edited: