Skip to content

Commit 232c8c6

Browse files
authored
Merge pull request #1 from amcocan/dev
Pulling branch dev into branch main.
2 parents 0273cf1 + 97d5c2d commit 232c8c6

File tree

20 files changed

+170
-12
lines changed

20 files changed

+170
-12
lines changed

README.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,51 @@ The custom recipes are pretty self explanitory from just the names (_they follow
1919
- `minecraft/recipe/shulker_box_with_barrel_shapeless.json`
2020
- `minecraft/recipe/shulker_box_with_chest_shapeless.json`
2121

22+
## antigrief
23+
I will explain this feature when I successfully add it into the datapack.
24+
<!-- Creepers / Endermen / Ghasts / Withers - Selective Griefing Removal -->
25+
26+
## cleanup
27+
This feature adds tha ability to bring items within 16 blocks of the player to the players location using the following `trigger` command.
28+
- `/trigger clean_up` ~ _Brings all droped items within 16 blocks to the players location._
29+
30+
## combatswitch
31+
I will explain this feature when I successfully add it into the datapack.
32+
<!-- A way to toggle pvp. -->
33+
34+
## fastleafdecay
35+
I will explain this feature when I successfully add it into the datapack.
36+
<!-- Adds fast leaf decay for all trees. -->
37+
38+
## invframe
39+
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.
40+
- `/trigger find_frame` ~ _This makes it possible to find a `minecraft:item_frame` or `minecraft:glow_item_frame` that is invisible and empty._
41+
- `/trigger hide_frame` ~ _This hides the nearest `minecraft:item_frame` or `minecraft:glow_item_frame` within 1.5 blocks of the player._
42+
- `/trigger show_frame` ~ _This unhides the nearest `minecraft:item_frame` or `minecraft:glow_item_frame` within 1.5 blocks of the player._
43+
44+
## invstand
45+
I will explain this feature when I successfully add it into the datapack.
46+
<!-- Invisible / Invulnerable / Locking - Armor Stands -->
47+
2248
## packauthor
23-
This is should use the `tellraw` command to provide information on the datapack (author and load status) everytime the datapack is reloaded. This feature is curently bugged and does not work as intended.
49+
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.
50+
- `/trigger silence_alerts` ~ _This mutes the datapack alerts for individual features loading._
51+
- `/trigger enable_alerts` ~ _This unmutes the datapack alerts for individual features loading._
2452

2553
## playerseats
54+
This feature adds the ability to sit anywhere the player wants using the following `trigger` command.
55+
- `/trigger sit` ~ _This makes the player sit in the location they were standing._
56+
57+
## pocketshulker
2658
I will explain this feature when I successfully add it into the datapack.
59+
<!-- Opening shulkers in inventory. -->
2760

2861
## shearheads
2962
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.
3063
> 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`.
3164
3265
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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ======= Clean Up =======
2+
# Add the logic of the trigger command for the cleanup function.
3+
execute as @a[scores={clean_up=1..}] at @s run tp @e[type=minecraft:item, distance=..16] @s
4+
# Play a sound so that the player knows it ran.
5+
execute at @a[scores={clean_up=1..}] run playsound minecraft:entity.item.pickup player @a[distance=..30] ~ ~ ~
6+
# Reset adn enable the trigger.
7+
execute as @a[scores={clean_up=1..}] run scoreboard players reset @s clean_up
8+
scoreboard players enable @a clean_up
9+
10+
# ======= Cleanup Loop =======
11+
schedule function cleanup:loop 0.25s append
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# ======= Clean Up =======
2+
# Add trigger for players to run the cleanup function.
3+
scoreboard objectives add clean_up trigger "Clean Up"
4+
# Alert everyone that datapack loaded successfully.
5+
tellraw @a[team=!no_alerts] {"text":"Cleanup function initialized successfully.", "color":"green", "italic":false}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# ======= Hide Frame =======
2+
# Hide and lock an invframe.
3+
execute at @a[scores={hide_frame=1..}] run data modify entity @e[type=#invframe:invframe, distance=..1.5, limit=1, sort=nearest] Invisible set value 1b
4+
execute at @a[scores={hide_frame=1..}] run data modify entity @e[type=#invframe:invframe, distance=..1.5, limit=1, sort=nearest] Fixed set value 1b
5+
# Adds tag for easier manipulation of entities.
6+
execute as @e[type=#invframe:invframe, nbt={Invisible: 1b}] run tag @s add invisible_entity
7+
# Play a sound so that the player knows it ran.
8+
execute as @a[scores={hide_frame=1..}] at @e[tag=invisible_entity] run playsound minecraft:entity.item.pickup block @a[distance=..16] ~ ~ ~ 5 0 0.5
9+
# Reset and enable the trigger.
10+
execute as @a[scores={hide_frame=1..}] run scoreboard players reset @s hide_frame
11+
scoreboard players enable @a hide_frame
12+
13+
# ======= Show Frame =======
14+
# Show and unlock an invframe.
15+
execute at @a[scores={show_frame=1..}] run data modify entity @e[type=#invframe:invframe, distance=..1.5, limit=1, sort=nearest] Invisible set value 0b
16+
execute at @a[scores={show_frame=1..}] run data modify entity @e[type=#invframe:invframe, distance=..1.5, limit=1, sort=nearest] Fixed set value 0b
17+
# Play a sound so that the player knows it ran.
18+
execute as @a[scores={show_frame=1..}] at @e[tag=invisible_entity] run playsound minecraft:entity.item.pickup block @a[distance=..16] ~ ~ ~ 5 1 0.5
19+
# Remove tag for unrequired manipulation of entities.
20+
execute as @e[type=#invframe:invframe, nbt={Invisible: 0b}] run tag @s remove invisible_entity
21+
# Reset and enable the trigger.
22+
execute as @a[scores={show_frame=1..}] run scoreboard players reset @s show_frame
23+
scoreboard players enable @a show_frame
24+
25+
# ======= Find Frame =======
26+
# Find an invisible item frame using the tag atribute.
27+
execute as @a[scores={find_frame=1..}] at @e[tag=invisible_entity] run particle minecraft:glow ~ ~0.05 ~
28+
# Play a sound so that the player knows it ran.
29+
execute as @a[scores={find_frame=1..}] at @e[tag=invisible_entity] run playsound minecraft:block.amethyst_block.step block @a[distance=..16] ~ ~ ~ 5 1 0.5
30+
# Reset and enable the trigger.
31+
execute as @a[scores={find_frame=1..}] run scoreboard players reset @s find_frame
32+
scoreboard players enable @a find_frame
33+
34+
# ======= Invframe Loop =======
35+
schedule function invframe:loop 0.25s append
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ======= Invisable Frames =======
2+
# Add trigger for players to run the cleanup function.
3+
scoreboard objectives add hide_frame trigger "Hide Frame"
4+
scoreboard objectives add show_frame trigger "Show Frame"
5+
scoreboard objectives add find_frame trigger "Find Frame"
6+
# scoreboard objectives add debug_frame trigger "Debug Frame"
7+
# Alert everyone that datapack loaded successfully.
8+
tellraw @a[team=!no_alerts] {"text":"Invframe function initialized successfully.", "color":"green", "italic":false}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"values":
3+
[
4+
"minecraft:item_frame",
5+
"minecraft:glow_item_frame"
6+
]
7+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# effect give @e[nbt={Invisible: 1b}, distance=..16] minecraft:glowing 5 1 true
File renamed without changes.
File renamed without changes.

data/minecraft/tags/function/load.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
"values":
33
[
44
"packauthor:setup",
5+
"packauthor:loop",
6+
"cleanup:setup",
7+
"cleanup:loop",
8+
"invframe:setup",
9+
"invframe:loop",
510
"playerseats:setup",
11+
"playerseats:loop",
612
"shearheads:setup"
713
]
814
}

0 commit comments

Comments
 (0)