Solved Glass breaking drops BROKEN

  • 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 community!

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

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

McSkinnerOG

Member
Jun 16, 2018
4
0
1
Im not sure if its something i have done but upon breaking any glass block with the code below i get the right glass block AND a white glasss block for some reason, any help would be greatly appreciated

on break of orange_glass_block:
cancel event
set block to air
drop 1 orange_glass_block
stop

on break of white_glass_block:
cancel event
set block to air
drop 1 white_glass_block
stop

on break of magenta_glass_block:
cancel event
set block to air
drop 1 magenta_glass_block
stop

on break of light_blue_glass_block:
cancel event
set block to air
drop 1 light_blue_glass_block
stop

on break of yellow_glass_block:
cancel event
set block to air
drop 1 yellow_glass_block
stop

on break of light_green_glass_block:
cancel event
set block to air
drop 1 light_green_glass_block
stop

on break of pink_glass_block:
cancel event
set block to air
drop 1 pink_glass_block
stop

on break of gray_glass_block:
cancel event
set block to air
drop 1 gray_glass_block
stop

on break of light_gray_glass_block:
cancel event
set block to air
drop 1 light_gray_glass_block
stop

on break of cyan_glass_block:
cancel event
set block to air
drop 1 cyan_glass_block
stop

on break of purple_glass_block:
cancel event
set block to air
drop 1 purple_glass_block
stop

on break of blue_glass_block:
cancel event
set block to air
drop 1 blue_glass_block
stop

on break of brown_glass_block:
cancel event
set block to air
drop 1 brown_glass_block
stop

on break of dark_green_glass_block:
cancel event
set block to air
drop 1 dark_green_glass_block
stop

on break of red_glass_block:
cancel event
set block to air
drop 1 red_glass_block
stop

on break of black_glass_block:
cancel event
set block to air
drop 1 black_glass_block
stop

Thankyou in advance.
PS. removing the white_glass_block code makes it function normally but i want the white_glass_block to drop when broken too, also normal glass blocks wont drop no matter what i try
 
hmm that is odd, that may be a problem with skript itself, I would suggest reporting that on their GITHUB

as for the normal glass block
code_language.skript:
on break of plain glass block:
    cancel event
    set block to air
    drop 1 plain glass block
    stop
 
  • Like
Reactions: McSkinnerOG
you'd have to do
code_language.skript:
on break of any glass block:
    drop 1 of event-block
    stop
 
After revising the code and editing it with both ShaneBee's and MusikManSK's solutions every glass block now works with the following code.

code_language.skript:
on break of plain_glass_block:
    cancel event
    set block to air
    drop 1 plain_glass_block at location of event-block
    stop
    
on break of any glass block:
    drop 1 of event-block at location of event-block
    stop

for some strange reason i have to define plain glass separately from any but it works none the less many thanks guys <3
 
Last edited:
code_language.skript:
on break of plain_glass_block:
    drop 1 plain_glass_block at location of event-block
    stop
  
on break of any glass block:
    drop 1 of event-block at location of event-block
    stop
 
you want to make glass drops some item.. and glass by default doesnt dorp any items.. so you dont have to cancel event and set it to air.. it would be required when would you want to drop for example glass block from iron ore..
 
  • Like
Reactions: McSkinnerOG
Status
Not open for further replies.