Skip to content

Commit d248855

Browse files
authored
Merge pull request #2 from amcocan/dev
Added New Features
2 parents 5482852 + 8a99a05 commit d248855

File tree

133 files changed

+5983
-19
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+5983
-19
lines changed

README.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ The custom recipes are pretty self explanitory from just the names (_they follow
2323
I will explain this feature when I successfully add it into the datapack.
2424
<!-- Creepers / Endermen / Ghasts / Withers - Selective Griefing Removal -->
2525

26+
## armorstatues
27+
Armor Statues allows the player to manipulate armorstands for decoration purposes using a custom `minecraft:written_book`. To learn how to get the custom `minecraft:written_book`, run `/trigger as_help`.
28+
29+
Armor Statues was built by [Phssthpok](https://x.com/MCPhssthpok), [MukiTanuki](https://twitter.com/mukitanuki), and [MSpaceDev](https://github.com/MSpaceDev). Check out the rest of [MukiTanuki's](https://github.com/MukiTanuki) and [MSpaceDev's](https://github.com/MSpaceDev) work!
30+
31+
Maintained by [Vanilla Tweeks](https://vanillatweaks.net/about/).
32+
> Learn about the details of this datapack on [Vanilla Tweeks](https://vanillatweaks.net/picker/datapacks/) & [Github](https://github.com/MukiTanuki/armor-statues#).
33+
<!-- Might remove some of the features in this datapack. -->
34+
2635
## cleanup
2736
This feature adds tha ability to bring items within 16 blocks of the player to the players location using the following `trigger` command.
2837
- `/trigger clean_up` ~ _Brings all droped items within 16 blocks to the players location._
@@ -31,19 +40,26 @@ This feature adds tha ability to bring items within 16 blocks of the player to t
3140
I will explain this feature when I successfully add it into the datapack.
3241
<!-- A way to toggle pvp. -->
3342

43+
## extrashell
44+
This feature increases the drop of shulker shells to guarantee 2 `minecraft:shulker_shell` items. This will sidestep the looting requirments from MJE.
45+
3446
## fastleafdecay
35-
I will explain this feature when I successfully add it into the datapack.
36-
<!-- Adds fast leaf decay for all trees. -->
47+
Adds fast leaf decay for all trees.
48+
49+
Fast Leaf Decay was built by [Grant](https://twitter.com/GrantGryczan). Check out the rest of [Grant's](https://github.com/GrantGryczan) work!
50+
51+
Maintained by [Vanilla Tweeks](https://vanillatweaks.net/about/).
52+
53+
> Learn about the details of this datapack on [x.com/vanillatweaks](https://x.com/vanillatweaks/status/1294840567168479233).
3754
3855
## invframe
3956
This feature adds the ability to _hide_, _show_, and _find_ a `minecraft:item_frame` or `minecraft:glow_item_frame`. When a `minecraft:item_frame` or `minecraft:glow_item_frame` is hidden, it is also fixed so that you don't have the item rotating or the frame breaking. When a `minecraft:item_frame` or `minecraft:glow_item_frame` is shown, it is unfixed so that you can rotate the item and break the frame. You can use this feature by using the triggers below.
4057
- `/trigger find_frame` ~ _This makes it possible to find a `minecraft:item_frame` or `minecraft:glow_item_frame` that is invisible and empty._
4158
- `/trigger hide_frame` ~ _This hides the nearest `minecraft:item_frame` or `minecraft:glow_item_frame` within 1.5 blocks of the player._
4259
- `/trigger show_frame` ~ _This unhides the nearest `minecraft:item_frame` or `minecraft:glow_item_frame` within 1.5 blocks of the player._
4360

44-
## invstand
45-
I will explain this feature when I successfully add it into the datapack.
46-
<!-- Invisible / Invulnerable / Locking - Armor Stands -->
61+
## mutetags
62+
To silence an entity rename a `minecraft:name_tag` to `/mute` (case-sensitive) and apply the `minecraft:name_tag` to the entity. To revert this change, repeat the steps with a `minecraft:name_tag` renamed to `/unmute` (case-sensitive).
4763

4864
## packauthor
4965
This feature uses the `tellraw` command to provide information on the datapack everytime the datapack is reloaded. It also creates the following two `trigger` commands that people can use.
@@ -54,16 +70,13 @@ This feature uses the `tellraw` command to provide information on the datapack e
5470
This feature adds the ability to sit anywhere the player wants using the following `trigger` command.
5571
- `/trigger sit` ~ _This makes the player sit in the location they were standing._
5672

57-
## pocketshulker
73+
## pocketshulker [Ignored]
5874
I will explain this feature when I successfully add it into the datapack.
75+
> For the time being, I will _ignore adding this feature_ as there are preblems with the duplication of items and optimization.
5976
<!-- Opening shulkers in inventory. -->
6077
6178
## shearheads
6279
This feature adds the ability to collect a `minecraft:blocks/player_head` without having to kill the player in MJE. Eventualy this feature will extend to other mobs/entities as well, but in the meantime it remains for players only.
6380
> The items `minecraft:blocks/player_head` will not carry special properties that extend beyond the purpose of decorations. For example, collecting a wither skelleton head (in the future) will not give you a `minecraft:blocks/wither_skeleton_skull`.
6481
6582
To collect the `minecraft:blocks/player_head` you will need to craft a special item useing the recipe found in `minecraft/recipe/god_reaper.json`. This is a shapeless recipe that consists of a `minecraft:armor_stand`, `minecraft:written_book`, and `minecraft:shears`. Once this item is aquired, simply walk up to the player you want the head from and hit them with this item. You must be within 2 blocks of them and they have to be in survival mode for this to work. This feature successfuly triggers only when the entitiy takes damage from the custom item and you are in the correct range.
66-
67-
## silencetags
68-
I will explain this feature when I successfully add it into the datapack.
69-
<!-- Add name tags that silence mobs permanently. -->
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ======= Antigrief =======
2+
# Creeper antigrief.
3+
execute as @e[type=minecraft:creeper,tag=!antigrief] at @s run data merge entity @s {ExplosionRadius:0}
4+
tag @e[type=minecraft:creeper,tag=!antigrief] add antigrief
5+
6+
# Enderman antigrief.
7+
# This feature is located at "data\minecraft\tags\block\enderman_holdable.json" in this datapack.
8+
9+
# Ghast antigrief.
10+
execute as @e[type=minecraft:ghast,tag=!antigrief] at @s run data merge entity @s {ExplosionPower:0}
11+
tag @e[type=minecraft:ghast,tag=!antigrief] add antigrief
12+
13+
# ======= Antigrief Loop =======
14+
schedule function antigrief:loop 1s
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ======= Antigrief =======
2+
# Alert everyone that datapack loaded successfully.
3+
tellraw @a[team=!no_alerts] {"text":"Antigrief function initialized successfully.", "color":"green", "italic":false}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"parent": "armor_statues:root",
3+
"criteria": {
4+
"craft_book": {
5+
"trigger": "minecraft:inventory_changed",
6+
"conditions": {
7+
"items": [
8+
{
9+
"items": [
10+
"minecraft:written_book"
11+
],
12+
"predicates": {
13+
"minecraft:written_book_content": {
14+
"title": "Statues"
15+
}
16+
}
17+
}
18+
]
19+
}
20+
}
21+
},
22+
"requirements": [
23+
[
24+
"craft_book"
25+
]
26+
],
27+
"rewards": {
28+
"function": "armor_statues:craft_book"
29+
}
30+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parent": "armor_statues:root",
3+
"criteria": {
4+
"tick": {
5+
"trigger": "minecraft:tick"
6+
}
7+
},
8+
"requirements": [
9+
[
10+
"tick"
11+
]
12+
],
13+
"rewards": {
14+
"function": "armor_statues:enable"
15+
}
16+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"criteria": {
3+
"impossible": {
4+
"trigger": "minecraft:impossible"
5+
}
6+
},
7+
"requirements": [
8+
[
9+
"impossible"
10+
]
11+
]
12+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# Description: Display admin options in chat
3+
# Called by: Player
4+
# Entity @s: Player
5+
#
6+
tellraw @s [{"text":"Customizable Armor Stands - Admin Options","color":"yellow","bold":true}]
7+
tellraw @s [{"text":"Get book from help: ","color":"aqua"},{"storage":"customizable_armor_stands:settings", "nbt":"as_admin.book_help", "color":"green", "clickEvent":{"action":"run_command", "value":"/function armor_statues:admin/book_from_help_toggle"}, "hoverEvent":{"action":"show_text", "contents":{"text":"Click to toggle", "color":"yellow"}}}]
8+
tellraw @s [{"text":"Craftable book: ","color":"aqua"},{"storage":"customizable_armor_stands:settings", "nbt":"as_admin.book_craft", "color":"green", "clickEvent":{"action":"run_command", "value":"/function armor_statues:admin/craft_book_toggle"}, "hoverEvent":{"action":"show_text", "contents":{"text":"Click to toggle", "color":"yellow"}}}]
9+
tellraw @s [{"text":"UUID locked Armor Stands: ","color":"aqua"},{"storage":"customizable_armor_stands:settings", "nbt":"as_admin.uuid_lock", "color":"green", "clickEvent":{"action":"run_command", "value":"/function armor_statues:admin/uuid_lock_toggle"}, "hoverEvent":{"action":"show_text", "contents":{"text":"Makes locked armor stands only unlockable by the player who locked them or creative players.\\n\\nClick to toggle", "color":"yellow"}}}]
10+
#
11+
tellraw @s [{"text":"Delete unused invisible stands","color":"green","hoverEvent":{"action":"show_text","contents":[{"text":"Deletes any invisible armor stands in loaded chunks that are not holding or wearing any items.","color":"yellow"}]},"clickEvent":{"action":"run_command","value":"/function armor_statues:admin/unused"}}]
12+
tellraw @s [{"text":"Highlight all stands","color":"green","hoverEvent":{"action":"show_text","contents":[{"text":"Gives all stands within 64 blocks the glowing effect for 15 seconds","color":"yellow"}]},"clickEvent":{"action":"run_command","value":"/effect give @e[type=armor_stand,distance=..64] minecraft:glowing 15 1 true"}}]
13+
#tellraw @s [{"text":"Reduce local server load","color":"green","hoverEvent":{"action":"show_text","contents":[{"text":"Sets the Marker tag on all locked armor stands within 128 blocks. This reduces the load on the server from ticking the entities but makes the stands unaffected by entity updates such as being pushed by pistons. The Marker tag can be reset for individual stands by unlocking them.","color":"yellow"}]},"clickEvent":{"action":"run_command","value":"/function armor_statues:admin/marker"}}]
14+
tellraw @s [{"text":"--------------------------","color":"yellow","bold":true}]
15+
#
16+
# The "Reduce local server load" option has the unfortunate side effect of moving the stands' eye line to their base.
17+
# If this puts it inside a block, the items held and worn by the stand turn black.
18+
# Commented out for the time being whilst options are investigated.
19+
#
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Description: Disable option to get the book directly from the help menu
3+
# Called by: armor_statues:admin via chat link
4+
# Entity @s: player
5+
#
6+
execute store success score #as_success as_help run data modify storage customizable_armor_stands:settings as_admin.book_help set value "Disabled"
7+
execute unless score #as_success as_help matches 1 run data modify storage customizable_armor_stands:settings as_admin.book_help set value "Enabled"
8+
#
9+
tellraw @s [{"text":"Getting the book from the help menu has been ","color":"aqua"},{"storage":"customizable_armor_stands:settings", "nbt":"as_admin.book_help"}]
10+
#
11+
function armor_statues:admin
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# Description: Enable option to get the book by crafting
3+
# Called by: armor_statues:admin via chat link
4+
# Entity @s: player
5+
#
6+
execute store success score #as_success as_help run data modify storage customizable_armor_stands:settings as_admin.book_craft set value "Disabled"
7+
execute unless score #as_success as_help matches 1 run data modify storage customizable_armor_stands:settings as_admin.book_craft set value "Enabled"
8+
#
9+
tellraw @s [{"text":"Getting the book via crafting has been ","color":"aqua"},{"storage":"customizable_armor_stands:settings", "nbt":"as_admin.book_craft"}]
10+
#
11+
function armor_statues:admin
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# This function is currently not used - see armor_statues:admin for details
3+
#
4+
5+
#
6+
# Description: Sets the Marker tag on all locked armor stands within 128 blocks
7+
# Called by: armor_statues:admin via chat clickEvent
8+
# Entity @s: Player
9+
#
10+
# Note: DisabledSlots tag is checked to exclude armor stands in tool racks
11+
#
12+
# Store number of affected stands for reporting
13+
#
14+
execute store result score @s as_pose run execute if entity @e[type=armor_stand,distance=..128,tag=as_locked,nbt=!{Marker:1b},nbt=!{DisabledSlots:4079166}]
15+
#
16+
# Set Marker tag on affected stands
17+
#
18+
execute as @e[type=armor_stand,distance=..128,tag=as_locked,nbt=!{Marker:1b},nbt=!{DisabledSlots:4079166}] run data merge entity @s {Marker:1b}
19+
#
20+
# Report number affected
21+
#
22+
tellraw @p [{"text":"Marker set on ","color":"aqua"},{"score":{"name":"@s","objective":"as_pose"},"color":"aqua"},{"text":" armor stands","color":"aqua"}]
23+
#
24+
scoreboard players reset @s as_pose

0 commit comments

Comments
 (0)