BlastProofGlassLogic: type: world debug: true events: on entity explodes: # Disallow the destruction of non-whitelisted blocks - define blocklist - foreach : - if !]>: - determine passively cancelled # Determine orientation between explosion and block. #- define origin #- define Block #- announce "Source: , Block .<&nl>Difference:,,]>" # Check if there is glass between and ####################################################################################################################################### - choose ,,]>: # Explosion was two blocks above the to-be-destroyed block's location. - case l@0.0,-2.0,0.0: # Determine if there is glass inbetween. - if ]>: - define blocklist ]> # Explosion was two blocks below the to-be-destroyed block's location. - case l@0.0,2.0,0.0: - if ]>: - define blocklist ]> ####################################################################################################################################### # Explosion was two blocks to the North-side of the to-be-destroyed block's location on equal Y. - case l@0.0,0.0,2.0: - if ]>: - define blocklist ]> # Explosion was two blocks to the East-side of the to-be-destroyed block's location on equal Y. - case l@-2.0,0.0,0.0: - if ]>: - define blocklist ]> # Explosion was two blocks to the South-side of the to-be-destroyed block's location on equal Y. - case l@0.0,0.0,-2.0: - if ]>: - define blocklist ]> # Explosion was two blocks to the West-side of the to-be-destroyed block's location on equal Y. - case l@2.0,0.0,0.0: - if ]>: - define blocklist ]> ####################################################################################################################################### # Explosion was directly diagonally to the NE of the to-be-destroyed block's location on equal Y. - case l@-1.0,0.0,1.0: # check if there is a block to the North AND East. - if ]> && ]>: - define blocklist ]> # Explosion was directly diagonally to the SE of the to-be-destroyed block's location on equal Y. - case l@-1.0,0.0,-1.0: # check if there is a block to the South AND East. - if ]> && ]>: - define blocklist ]> # Explosion was directly diagonally to the SW of the to-be-destroyed block's location on equal Y. - case l@1.0,0.0,-1.0: # check if there is a block to the South AND West. - if ]> && ]>: - define blocklist ]> # Explosion was directly diagonally to the NW of the to-be-destroyed block's location on equal Y. - case l@1.0,0.0,1.0: # check if there is a block to the North AND West. - if ]> && ]>: - define blocklist ]> ####################################################################################################################################### # Explosion was directly north of the to-be-destroyed block's location on Y+1. - case l@0.0,-1.0,1.0: # check if there is a block to the Above AND to the North. - if ]> && ]>: - define blocklist ]> # Explosion was directly East of the to-be-destroyed block's location on Y+1. - case l@-1.0,-1.0,0.0: # check if there is a block to the Above AND to the East. - if ]> && ]>: - define blocklist ]> # Explosion was directly South of the to-be-destroyed block's location on Y+1. - case l@0.0,-1.0,-1.0: # check if there is a block to the Above AND to the South. - if ]> && ]>: - define blocklist ]> # Explosion was directly West of the to-be-destroyed block's location on Y+1. - case l@1.0,-1.0,0.0: # check if there is a block to the Above AND to the West. - if ]> && ]>: - define blocklist ]> ####################################################################################################################################### # Explosion was directly north of the to-be-destroyed block's location on Y-1. - case l@0.0,1.0,1.0: # check if there is a block to the Above AND to the North. - if ]> && ]>: - define blocklist ]> # Explosion was directly East of the to-be-destroyed block's location on Y-1. - case l@-1.0,1.0,0.0: # check if there is a block to the Above AND to the East. - if ]> && ]>: - define blocklist ]> # Explosion was directly South of the to-be-destroyed block's location on Y-1. - case l@0.0,1.0,-1.0: # check if there is a block to the Above AND to the South. - if ]> && ]>: - define blocklist ]> # Explosion was directly West of the to-be-destroyed block's location on Y-1. - case l@1.0,1.0,0.0: # check if there is a block to the Above AND to the West. - if ]> && ]>: - define blocklist ]> ####################################################################################################################################### # Explosion was directly NE of the to-be-destroyed block's location on Y+1. - case l@-1.0,-1.0,1.0: # check if there is a block to the Above AND West AND EAST - if ]> && ]> && ]>: - define blocklist ]> # Explosion was directly SE of the to-be-destroyed block's location on Y+1. - case l@-1.0,-1.0,-1.0: # check if there is a block to the Above AND South AND EAST - if ]> && ]> && ]>: - define blocklist ]> # Explosion was directly SW of the to-be-destroyed block's location on Y+1. - case l@1.0,-1.0,-1.0: # check if there is a block to the Above AND South AND West - if ]> && ]> && ]>: - define blocklist ]> # Explosion was directly NW of the to-be-destroyed block's location on Y+1. - case l@1.0,-1.0,1.0: # check if there is a block to the Above AND North AND West - if ]> && ]> && ]>: - define blocklist ]> ####################################################################################################################################### # Explosion was directly NE of the to-be-destroyed block's location on Y-1. - case l@-1.0,1.0,1.0: # check if there is a block to the Above AND West AND EAST - if ]> && ]> && ]>: - define blocklist ]> # Explosion was directly SE of the to-be-destroyed block's location on Y-1. - case l@-1.0,1.0,-1.0: # check if there is a block to the Above AND South AND EAST - if ]> && ]> && ]>: - define blocklist ]> # Explosion was directly SW of the to-be-destroyed block's location on Y-1. - case l@1.0,1.0,-1.0: # check if there is a block to the Above AND South AND West - if ]> && ]> && ]>: - define blocklist ]> # Explosion was directly NW of the to-be-destroyed block's location on Y-1. - case l@1.0,1.0,1.0: # check if there is a block to the Above AND North AND West - if ]> && ]> && ]>: - define blocklist ]> ####################################################################################################################################### # Determine updated blocklist. - determine