Skip to content

Commit

Permalink
promote to testing (#2)
Browse files Browse the repository at this point in the history
* update gitignore

* update readme.md

* added logic and items to change game mode with the texture pack for MC JA

* added the game modes existing in the MC BE add-on

* MC JA and BE pack icon and description changed

* updated Readne.md

* updated manifest.json
  • Loading branch information
Luna115-onCode authored Sep 29, 2024
1 parent 6a76657 commit 17efb3a
Show file tree
Hide file tree
Showing 36 changed files with 209 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.mcattributes
.vscode/
.vscode/
/output
8 changes: 4 additions & 4 deletions MinecraftBedrock/IfTouchTheBlockDieBP/manifest.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"format_version": 2,
"header": {
"description": "If you touch the selected block, §4you'll die.\n§rMod by: §1L§2i §3C§4u§5b§6i§8t§9o",
"description": "If you touch the selected block, §4you'll die.\n§rMod by: §1L§2u§3n§4a§51§61§85",
"min_engine_version": [ 1, 21, 0 ],
"name": "If you touch the block, §4die",
"uuid": "2a1b2ec1-9033-402a-96f5-183ae4e80eea",
"version": [ 1, 2, 4 ]
"version": [ 1, 2, 10 ]
},
"metadata": {
"authors": [
Expand All @@ -16,10 +16,10 @@
},
"modules": [
{
"description": "If you touch the selected block, §4you'll die.\n§rMod by: §1L§2i §3C§4u§5b§6i§8t§9o",
"description": "If you touch the selected block, §4you'll die.\n§rMod by: §1L§2u§3n§4a§51§61§85",
"type": "data",
"uuid": "2a1b2ec1-9033-402a-96f5-183ae4e80eaf",
"version": [ 1, 2, 4 ]
"version": [ 1, 2, 10 ]
}
],
"subpacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
clear @a minecraft:carrot_on_a_stick[minecraft:custom_model_data=1]
clear @a minecraft:carrot_on_a_stick[minecraft:custom_model_data=2]
clear @a minecraft:carrot_on_a_stick[minecraft:custom_model_data=3]

execute as @a if data entity @s Inventory[{Slot:8b}] run tellraw @s "The slot 9 of the hotbar needs to be empty to obtain: Next Mode Item"
execute as @a unless data entity @s Inventory[{Slot:8b}] run item replace entity @a hotbar.8 with minecraft:carrot_on_a_stick[minecraft:custom_model_data=1,minecraft:item_name='{text:"Next game mode"}',minecraft:rarity="rare",minecraft:lore=['{text:"Change the gamemode to the next one."}', "DataPackTool"]]

execute as @a if data entity @s Inventory[{Slot:7b}] run tellraw @s "The slot 8 of the hotbar needs to be empty to obtain: Reset Mode Item"
execute as @a unless data entity @s Inventory[{Slot:7b}] run item replace entity @a hotbar.7 with minecraft:carrot_on_a_stick[minecraft:custom_model_data=3,minecraft:item_name='{text:"Reset game mode"}',minecraft:rarity="rare",minecraft:lore=['{text:"Change the gamemode to the first one: All blocks."}', "DataPackTool"]]

execute as @a if data entity @s Inventory[{Slot:6b}] run tellraw @s "The slot 7 of the hotbar needs to be empty to obtain: Prev Mode Item"
execute as @a unless data entity @s Inventory[{Slot:6b}] run item replace entity @a hotbar.6 with minecraft:carrot_on_a_stick[minecraft:custom_model_data=2,minecraft:item_name='{text:"Prev game mode"}',minecraft:rarity="rare",minecraft:lore=['{text:"Change the gamemode to the previous one."}', "DataPackTool"]]
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
execute as @a if items entity @s weapon.mainhand minecraft:carrot_on_a_stick[minecraft:custom_model_data=1] run item replace entity @s weapon.mainhand with minecraft:air
scoreboard players add $game_mode game_mode 1
scoreboard players set @s change_mode 0
execute as @s if score $game_mode game_mode matches 25.. run scoreboard players set $game_mode game_mode 1
function touchdie:spawn
execute as @a at @a run function touchdie:mode_visor
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
execute as @a if items entity @s weapon.mainhand minecraft:carrot_on_a_stick[minecraft:custom_model_data=2] run item replace entity @s weapon.mainhand with minecraft:air
scoreboard players remove $game_mode game_mode 1
scoreboard players set @s change_mode 0
execute as @s if score $game_mode game_mode matches ..0 run scoreboard players set $game_mode game_mode 24
function touchdie:spawn
execute as @a at @a run function touchdie:mode_visor
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
execute as @a if items entity @s weapon.mainhand minecraft:carrot_on_a_stick[minecraft:custom_model_data=3] run item replace entity @s weapon.mainhand with minecraft:air
scoreboard players set $game_mode game_mode 1
scoreboard players set @s change_mode 0
function touchdie:spawn
execute as @a at @a run function touchdie:mode_visor
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"values": [
"touchdie:spawn"
"touchdie:mode_visor"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,21 @@ execute as @a at @a if block ~ ~-0.01 ~ minecraft:sculk_sensor run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:sculk_shrieker run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:calibrated_sculk_sensor run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:polished_basalt run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:red_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:blue_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:cyan_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:gray_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:lime_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:pink_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:black_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:brown_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:green_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:white_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:orange_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:purple_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:yellow_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:magenta_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:light_blue_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:light_gray_terracotta run kill @s
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,21 @@ execute as @a at @a if block ~ ~-0.01 ~ minecraft:sculk_sensor run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:sculk_shrieker run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:calibrated_sculk_sensor run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:polished_basalt run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:red_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:blue_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:cyan_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:gray_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:lime_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:pink_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:black_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:brown_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:green_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:white_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:orange_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:purple_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:yellow_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:magenta_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:light_blue_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:light_gray_terracotta run kill @s
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,21 @@ execute as @a at @a if block ~ ~-0.01 ~ minecraft:netherrack run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:end_stone run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:basalt run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:polished_basalt run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:terracotta run kill @s

execute as @a at @a if block ~ ~-0.01 ~ minecraft:red_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:blue_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:cyan_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:gray_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:lime_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:pink_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:black_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:brown_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:green_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:white_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:orange_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:purple_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:yellow_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:magenta_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:light_blue_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:light_gray_terracotta run kill @s
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
execute as @a at @a if block ~ ~-0.01 ~ minecraft:clay run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:red_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:blue_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:cyan_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:gray_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:lime_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:pink_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:black_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:brown_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:green_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:white_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:orange_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:purple_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:yellow_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:magenta_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:light_blue_terracotta run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:light_gray_terracotta run kill @s
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
execute as @a at @a if block ~ ~-0.01 ~ minecraft:dirt run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:dirt run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:coarse_dirt run kill @s
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
execute as @a run function afunc:aconfig_tools
function touchdie:spawn

execute as @s if score $game_mode game_mode matches 1 run title @s title "§l§4All blocks"
execute as @s if score $game_mode game_mode matches 1 run title @s subtitle "If you touch any natural block, you'll die"
execute as @s if score $game_mode game_mode matches 1 run tellraw @s "Blocks that you can't step on: ice normal, packed and blue, clay, deepslate, dirt, grass, gravel, sand, snow, snow layers, stone, magma block, netherrack, soul sand and soil, end stone"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
execute as @a at @a if block ~ ~-0.01 ~ minecraft:mud run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:muddy_mangrove_roots run kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
execute as @a at @a if block ~ ~-0.01 ~ minecraft:netherrack run kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
execute as @a at @a if block ~ ~-0.01 ~ minecraft:sand run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:red_sand run kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
execute as @a at @a if block ~ ~-0.01 ~ minecraft:sculk run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:sculk_catalyst run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:sculk_sensor run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:sculk_shrieker run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:calibrated_sculk_sensor run kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
execute as @a at @a if block ~ ~-0.01 ~ minecraft:snow run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:snow_block run kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
execute as @a at @a if block ~ ~-0.01 ~ minecraft:soul_sand run kill @s
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
execute as @a at @a if block ~ ~-0.01 ~ minecraft:soul_soil run kill @s
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ setblock 0 125 0 minecraft:water
setworldspawn 0 126 1
scoreboard objectives add death deathCount
scoreboard objectives add game_mode dummy
scoreboard objectives add change_mode minecraft.used:minecraft.carrot_on_a_stick
execute unless score $game_mode game_mode matches 1..25 run scoreboard players set $game_mode game_mode 1
execute as @a run function touchdie:mode_visor
gamerule keepInventory true
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
execute as @a at @a if block ~ ~-0.01 ~ minecraft:stone run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:granite run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:diorite run kill @s
execute as @a at @a if block ~ ~-0.01 ~ minecraft:andesite run kill @s
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,16 @@ execute as @a if score $game_mode game_mode matches 12 run function touchdie:gra
execute as @a if score $game_mode game_mode matches 13 run function touchdie:gravel
execute as @a if score $game_mode game_mode matches 14 run function touchdie:ice
execute as @a if score $game_mode game_mode matches 15 run function touchdie:magma
execute as @a if score $game_mode game_mode matches 16 run function touchdie:mud
execute as @a if score $game_mode game_mode matches 17 run function touchdie:netherrack
execute as @a if score $game_mode game_mode matches 18 run function touchdie:sand
execute as @a if score $game_mode game_mode matches 19 run function touchdie:sculk
execute as @a if score $game_mode game_mode matches 20 run function touchdie:snow
execute as @a if score $game_mode game_mode matches 21 run function touchdie:soul_sand
execute as @a if score $game_mode game_mode matches 22 run function touchdie:soul_soil
execute as @a if score $game_mode game_mode matches 23 run function touchdie:stone
execute as @a if score $game_mode game_mode matches 24 run function touchdie:warped
execute as @a[scores={change_mode=1..}] if entity @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",components:{"minecraft:custom_model_data":1}}}] run function afunc:change_next_mode
execute as @a[scores={change_mode=1..}] if entity @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",components:{"minecraft:custom_model_data":2}}}] run function afunc:change_prev_mode
execute as @a[scores={change_mode=1..}] if entity @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",components:{"minecraft:custom_model_data":3}}}] run function afunc:reset_mode
execute as @a if score @s death matches 1.. run function touchdie:mode_visor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
execute as @a at @a if block ~ ~-0.01 ~ minecraft:warped_nylium run kill @s
4 changes: 2 additions & 2 deletions MinecraftJava/IfTouchTheBlockDieDP/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 15,
"pack_format": 48,
"description": [
{
"text": "(This is the DP)"
Expand All @@ -9,7 +9,7 @@
"text": "If you touch the selected block, §4you'll die."
},
{
"text": "§rMod by: §1L§2i §3C§4u§5b§6i§8t§9o"
"text": "Mod by: §1L§2u§3n§4a§51§61§85"
}
]
}
Expand Down
Binary file added MinecraftJava/IfTouchTheBlockDieDP/pack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "minecraft:item/carrot_on_a_stick"
},
"overrides": [
{
"predicate": {
"custom_model_data": 1
},
"model": "minecraft:item/next_item"
},
{
"predicate": {
"custom_model_data": 2
},
"model": "minecraft:item/prev_item"
},
{
"predicate": {
"custom_model_data": 3
},
"model": "minecraft:item/reset_item"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:item/next_icon"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:item/prev_icon"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:item/reset_icon"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions MinecraftJava/IfTouchTheBlockDieRP/pack.mcmeta
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"pack": {
"pack_format": 34,
"description": [
{
"text": "(This is the RP)"
},
{
"text": "If you touch the selected block, §4you'll die."
},
{
"text": "§rMod by: §1L§2u§3n§4a§51§61§85"
}
]
}
}
Binary file added MinecraftJava/IfTouchTheBlockDieRP/pack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
This is the official github repo of the "If touch the block, die" datapack/add-on developed by Li Cubito.
This is the official github repo of the "If touch the block, die" datapack/add-on developed by Luna115.

This Add-on/datapack consist on making to the players unable to step on a list of specific blocks, and if they step on
it, kil them instantly.
it, kill them instantly.

About the repo...

Expand All @@ -15,6 +15,10 @@ You can see the different testing and release versions by using the "test" and "

About the Add-on/datapack...

NOTE: The .mcaddon file is for Minecraft Bedrock and it contains the needed behaviour and resources pack (if needed).
The DP and RP files (which ends on .zip both) are for Minecraft Java, which are the DataPack file and Resouces Pack
file (if needed, too).

The Add-on for Minecraft Bedrock can be used on Minecraft 1.21+ and it's tested on Minecraft 1.21.21 (Windows).

The datapack for Minecraft Java can be used on Minecraft 1.21+ and it's tested on Minecraft 1.21 (Windows, Minecraft bundled java) with optifine (HD_U_I1_pre2).
Expand Down

0 comments on commit 17efb3a

Please sign in to comment.