-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #177 from aksiome/id-rework
🚚 Rename and update id predicates
- Loading branch information
Showing
11 changed files
with
129 additions
and
39 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
datapacks/Bookshelf/data/bs.id/functions/update_cuids/loop.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,3 +1,3 @@ | ||
scoreboard players add $id.cuid.check bs.in 1 | ||
execute unless entity @e[predicate=bs.id:cuid_match,sort=arbitrary,limit=1] run function bs.id:update_cuids/shift | ||
scoreboard players add $id.cuid bs.in 1 | ||
execute unless entity @e[predicate=bs.id:cuid_equal,sort=arbitrary,limit=1] run function bs.id:update_cuids/shift | ||
execute if score #size bs.cid < #counter bs.cid run function bs.id:update_cuids/loop |
2 changes: 1 addition & 1 deletion
2
datapacks/Bookshelf/data/bs.id/functions/update_cuids/shift.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,3 +1,3 @@ | ||
scoreboard players remove #counter bs.cid 1 | ||
scoreboard players remove @e[predicate=bs.id:cuid_upper,sort=arbitrary] bs.cid 1 | ||
execute if score #size bs.cid < #counter bs.cid unless entity @e[predicate=bs.id:cuid_match,sort=arbitrary,limit=1] run function bs.id:update_cuids/shift | ||
execute if score #size bs.cid < #counter bs.cid unless entity @e[predicate=bs.id:cuid_equal,sort=arbitrary,limit=1] run function bs.id:update_cuids/shift |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"condition": "minecraft:entity_scores", | ||
"entity": "this", | ||
"scores": { | ||
"bs.cid": { | ||
"min": { | ||
"type": "minecraft:score", | ||
"target": { | ||
"type": "minecraft:fixed", | ||
"name": "$id.cuid" | ||
}, | ||
"score": "bs.in" | ||
}, | ||
"max": { | ||
"type": "minecraft:score", | ||
"target": { | ||
"type": "minecraft:fixed", | ||
"name": "$id.cuid" | ||
}, | ||
"score": "bs.in" | ||
} | ||
} | ||
} | ||
} |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"condition": "minecraft:entity_scores", | ||
"entity": "this", | ||
"scores": { | ||
"bs.id": { | ||
"min": { | ||
"type": "minecraft:score", | ||
"target": { | ||
"type": "minecraft:fixed", | ||
"name": "$id.suid" | ||
}, | ||
"score": "bs.in" | ||
}, | ||
"max": { | ||
"type": "minecraft:score", | ||
"target": { | ||
"type": "minecraft:fixed", | ||
"name": "$id.suid" | ||
}, | ||
"score": "bs.in" | ||
} | ||
} | ||
} | ||
} |
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
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
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
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