This repository has been archived by the owner on Jun 14, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #2 - Item frames can turn invisible again (without smoke particle)
- Loading branch information
Showing
2 changed files
with
13 additions
and
13 deletions.
There are no files selected for viewing
18 changes: 9 additions & 9 deletions
18
data/origami-games/functions/invisible_item_frames/item_frame/item_check.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#called by item_frame/glass_check | ||
|
||
execute unless block ~ ~ ~ #origami-games:invisible_item_frames/air unless block ~ ~ ~ #origami-games:invisible_item_frames/glass run function origami-games:invisible_item_frames/item_frame/remove_invisibility | ||
|
||
execute if block ~ ~ ~ #origami-games:invisible_item_frames/glass run function origami-games:invisible_item_frames/item_frame/remove_block | ||
|
||
execute if data entity @s Item.id run data modify entity @s Invisible set value 1b | ||
execute unless data entity @s Item.id run data modify entity @s Invisible set value 0b | ||
execute unless data entity @s Item.id run particle dust 0.341 0.341 0.341 .5 ~ ~ ~ 0 0 0 0 1 force @a | ||
#called by item_frame/glass_check | ||
|
||
execute if data entity @s Item.id run data modify entity @s Invisible set value 1b | ||
execute unless data entity @s Item.id run data modify entity @s Invisible set value 0b | ||
execute unless data entity @s Item.id run particle dust 0.341 0.341 0.341 .5 ~ ~ ~ 0 0 0 0 1 force @a | ||
|
||
execute unless block ~ ~ ~ #origami-games:invisible_item_frames/air unless block ~ ~ ~ #origami-games:invisible_item_frames/glass run function origami-games:invisible_item_frames/item_frame/remove_invisibility | ||
|
||
execute if block ~ ~ ~ #origami-games:invisible_item_frames/glass run function origami-games:invisible_item_frames/item_frame/remove_block |
8 changes: 4 additions & 4 deletions
8
data/origami-games/functions/invisible_item_frames/item_frame/remove_block.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#called by item_frame/item_check | ||
|
||
setblock ~ ~ ~ air destroy | ||
execute align xyz unless entity @e[type=item,dx=0,dy=0,dz=0] run loot spawn ~ ~ ~ mine ~ ~ ~ diamond_pickaxe{Enchantments:[{id:silk_touch,lvl:1s}]} | ||
#called by item_frame/item_check | ||
|
||
execute align xyz run loot spawn ~ ~ ~ mine ~.5 ~.5 ~.5 diamond_pickaxe{Enchantments:[{id:silk_touch,lvl:1s}]} | ||
setblock ~ ~ ~ air |