From 30a61fc1b75099147f2a462dcde2d48e64eecebb Mon Sep 17 00:00:00 2001 From: AvgZing <25853984+AvgZing@users.noreply.github.com> Date: Sat, 2 Dec 2023 23:36:50 -0800 Subject: [PATCH] Initial Upload --- README.md | 3 +- animation_controllers/1ps.json | 27 ++ .../death_counter_j5cfmnkccwt7ppim3lsyue.json | 27 ++ animations/1ps.json | 20 ++ ..._counter_start_j5cfmnkccwt7ppim3lsyue.json | 15 ++ entities/player.json | 232 ++++++++++++++++++ manifest.json | 29 +++ pack_icon.png | Bin 0 -> 6223 bytes 8 files changed, 352 insertions(+), 1 deletion(-) create mode 100644 animation_controllers/1ps.json create mode 100644 animation_controllers/death_counter_j5cfmnkccwt7ppim3lsyue.json create mode 100644 animations/1ps.json create mode 100644 animations/death_counter_start_j5cfmnkccwt7ppim3lsyue.json create mode 100644 entities/player.json create mode 100644 manifest.json create mode 100644 pack_icon.png diff --git a/README.md b/README.md index 5f76576..a74826a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # 1PS-and-More -One Player Sleep system and Death Counter Scoreboard addon for Minecraft Bedrock +One Player Sleep system and Death Counter Scoreboard addon for Minecraft Bedrock. +Credit to RavinMadHatter for the death counter scoreboard system. This includes any utilities that include the Player.Json file; other uses may be added in the future. diff --git a/animation_controllers/1ps.json b/animation_controllers/1ps.json new file mode 100644 index 0000000..5f85c8f --- /dev/null +++ b/animation_controllers/1ps.json @@ -0,0 +1,27 @@ +{ + "format_version": "1.10.0", + "animation_controllers": { + "controller.animation.1ps": { + "initial_state": "stop", + "states": { + "stop": { + "transitions": [ + { + "start": "query.is_sleeping" + } + ] + }, + "start": { + "animations": [ + "start_1ps" + ], + "transitions": [ + { + "stop": "!query.is_sleeping" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/animation_controllers/death_counter_j5cfmnkccwt7ppim3lsyue.json b/animation_controllers/death_counter_j5cfmnkccwt7ppim3lsyue.json new file mode 100644 index 0000000..ea275d0 --- /dev/null +++ b/animation_controllers/death_counter_j5cfmnkccwt7ppim3lsyue.json @@ -0,0 +1,27 @@ +{ + "format_version": "1.10.0", + "animation_controllers": { + "controller.animation.death_counter_j5cfmnkccwt7ppim3lsyue": { + "initial_state": "alive", + "states": { + "alive": { + "transitions": [ + { + "dead": "!query.is_alive" + } + ], + "on_exit": [ + "/scoreboard players add @s deaths_J5CfmnKCc 1" + ] + }, + "dead": { + "transitions": [ + { + "alive": "query.is_alive" + } + ] + } + } + } + } +} \ No newline at end of file diff --git a/animations/1ps.json b/animations/1ps.json new file mode 100644 index 0000000..3e289c3 --- /dev/null +++ b/animations/1ps.json @@ -0,0 +1,20 @@ +{ + "format_version": "1.8.0", + "animations": { + "animation.start_1ps": { + "loop": false, + "animation_length": 5.0, + "timeline": { + "0.0": "/me \u00c2\u00a7ewent to bed. Sweet dreams.", + "4.9": [ + "/weather rain", + "/title @s actionbar \u00c2\u00a7eGood Morning!" + ], + "5.0": [ + "/toggledownfall", + "/time set 23992" + ] + } + } + } +} \ No newline at end of file diff --git a/animations/death_counter_start_j5cfmnkccwt7ppim3lsyue.json b/animations/death_counter_start_j5cfmnkccwt7ppim3lsyue.json new file mode 100644 index 0000000..7d8549e --- /dev/null +++ b/animations/death_counter_start_j5cfmnkccwt7ppim3lsyue.json @@ -0,0 +1,15 @@ +{ + "format_version": "1.10.0", + "animations": { + "animation.start_death_counter_j5cfmnkccwt7ppim3lsyue": { + "timeline": { + "0.0": [ + "/scoreboard objectives add deaths_J5CfmnKCc dummy Deaths", + "/scoreboard objectives setdisplay list deaths_J5CfmnKCc descending" + ] + }, + "animation_length": 1.0, + "loop": false + } + } +} \ No newline at end of file diff --git a/entities/player.json b/entities/player.json new file mode 100644 index 0000000..742bfde --- /dev/null +++ b/entities/player.json @@ -0,0 +1,232 @@ +{ + "format_version": "1.18.20", + "minecraft:entity": { + "description": { + "identifier": "minecraft:player", + "is_spawnable": false, + "is_summonable": false, + "is_experimental": false, + "scripts": { + "animate": [ + "1ps", + "death_counter_j5cfmnkccwt7ppim3lsyue", + "start_death_counter_j5cfmnkccwt7ppim3lsyue" + ] + }, + "animations": { + "1ps": "controller.animation.1ps", + "start_1ps": "animation.start_1ps", + "death_counter_j5cfmnkccwt7ppim3lsyue": "controller.animation.death_counter_j5cfmnkccwt7ppim3lsyue", + "start_death_counter_j5cfmnkccwt7ppim3lsyue": "animation.start_death_counter_j5cfmnkccwt7ppim3lsyue" + } + }, + "component_groups": { + "minecraft:add_bad_omen": { + "minecraft:spell_effects": { + "add_effects": [ + { + "effect": "bad_omen", + "duration": 6000, + "visible": false, + "display_on_screen_animation": true + } + ] + }, + "minecraft:timer": { + "time": [ + 0, + 0 + ], + "looping": false, + "time_down_event": { + "event": "minecraft:clear_add_bad_omen", + "target": "self" + } + } + }, + "minecraft:clear_bad_omen_spell_effect": { + "minecraft:spell_effects": {} + }, + "minecraft:raid_trigger": { + "minecraft:raid_trigger": { + "triggered_event": { + "event": "minecraft:remove_raid_trigger", + "target": "self" + } + }, + "minecraft:spell_effects": { + "remove_effects": "bad_omen" + } + } + }, + "components": { + "minecraft:experience_reward": { + "on_death": "Math.Min(query.player_level * 7, 100)" + }, + "minecraft:type_family": { + "family": [ + "player" + ] + }, + "minecraft:is_hidden_when_invisible": {}, + "minecraft:loot": { + "table": "loot_tables/empty.json" + }, + "minecraft:collision_box": { + "width": 0.6, + "height": 1.8 + }, + "minecraft:can_climb": {}, + "minecraft:movement": { + "value": 0.1 + }, + "minecraft:hurt_on_condition": { + "damage_conditions": [ + { + "filters": { + "test": "in_lava", + "subject": "self", + "operator": "==", + "value": true + }, + "cause": "lava", + "damage_per_tick": 4 + } + ] + }, + "minecraft:attack": { + "damage": 1 + }, + "minecraft:exhaustion_values": { + "heal": 6, + "jump": 0.05, + "sprint_jump": 0.2, + "mine": 0.005, + "attack": 0.1, + "damage": 0.1, + "walk": 0, + "sprint": 0.01, + "swim": 0.01 + }, + "minecraft:player.saturation": { + "value": 5, + "max": 20 + }, + "minecraft:player.exhaustion": { + "value": 0, + "max": 20 + }, + "minecraft:player.level": { + "value": 0, + "max": 24791 + }, + "minecraft:player.experience": { + "value": 0, + "max": 1 + }, + "minecraft:breathable": { + "total_supply": 15, + "suffocate_time": -1, + "inhale_time": 3.75, + "generates_bubbles": false + }, + "minecraft:nameable": { + "always_show": true, + "allow_name_tag_renaming": false + }, + "minecraft:physics": {}, + "minecraft:pushable": { + "is_pushable": false, + "is_pushable_by_piston": true + }, + "minecraft:insomnia": { + "days_until_insomnia": 3 + }, + "minecraft:rideable": { + "seat_count": 2, + "family_types": [ + "parrot_tame" + ], + "pull_in_entities": true, + "seats": [ + { + "position": [ + 0.4, + -0.2, + -0.1 + ], + "min_rider_count": 0, + "max_rider_count": 0, + "lock_rider_rotation": 0 + }, + { + "position": [ + -0.4, + -0.2, + -0.1 + ], + "min_rider_count": 1, + "max_rider_count": 2, + "lock_rider_rotation": 0 + } + ] + }, + "minecraft:conditional_bandwidth_optimization": {}, + "minecraft:block_climber": {}, + "minecraft:environment_sensor": { + "triggers": { + "filters": { + "all_of": [ + { + "test": "has_mob_effect", + "subject": "self", + "value": "bad_omen" + }, + { + "test": "is_in_village", + "subject": "self", + "value": true + } + ] + }, + "event": "minecraft:trigger_raid" + } + } + }, + "events": { + "minecraft:gain_bad_omen": { + "add": { + "component_groups": [ + "minecraft:add_bad_omen" + ] + } + }, + "minecraft:clear_add_bad_omen": { + "remove": { + "component_groups": [ + "minecraft:add_bad_omen" + ] + }, + "add": { + "component_groups": [ + "minecraft:clear_bad_omen_spell_effect" + ] + } + }, + "minecraft:trigger_raid": { + "add": { + "component_groups": [ + "minecraft:raid_trigger" + ] + } + }, + "minecraft:remove_raid_trigger": { + "remove": { + "component_groups": [ + "minecraft:raid_trigger" + ] + } + } + } + } +} \ No newline at end of file diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..4805fef --- /dev/null +++ b/manifest.json @@ -0,0 +1,29 @@ +{ + "format_version": 2, + "header": { + "description": "Multiplayer compatible one-player sleep v2.2 by AvgZing, death counter addition by RavinMaddHatter.", + "name": "AvgZing 1-Player Sleep + Death Counter", + "uuid": "107c45e9-0e6a-465a-83a7-3203229ab807", + "version": [ + 2, + 2, + 1 + ], + "min_engine_version": [ + 1, + 18, + 10 + ] + }, + "modules": [ + { + "type": "data", + "uuid": "851782bb-5b70-41cd-bb34-6e198304afd3", + "version": [ + 2, + 2, + 1 + ] + } + ] +} \ No newline at end of file diff --git a/pack_icon.png b/pack_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..94eab7fa9fb32e1c2fdffefbc2524e02ff0a2ed8 GIT binary patch literal 6223 zcmZ`-Wl+>#)c)<#uyi8=l1ne$-O?o~DGiE%q~I>Fgwj&d4T5wEEGZ4rp@e_}x^%9R zFaMeM%lqM-JLf)go;%MuAI{9VGf%96o(3@?10eta#9ErFM)#=mU*O~3-$NOOy!U|Z zqNJ+?0QHGP*Y-H~Ig6vFkuCrPa{>T75&$mmDfn*ycm)Fhv>gCQX957NcTT&Z?EM3- zgSLh$aQELSK$XA0X9&DCEqnohr2oGF4ZWy%c2DB@Y3ZurZGaz;Q$NsQ!5h4mxbq@!wR)(TnGh+Ymt(uJNr7gVI0!vkMZjcTSj4W4#${xR<>SY01-$+`l;@O zAEx6FC65W{+QQs)o#IM*M(@`>Z0Yx3B3ZVVfvQIbgS7XX%_cUBegs41>vtbN{s_-? z4%B1GB}sX%Z+n)aAXTz^m4>xh1uQF$ztvEE7a^`fKcHAsZ>SS z;c!hWY*Mm_RA9cCno%4~2rgj32NFw;)J||>e$bn0961lO^u5F<5Y zR=PLxjX4$^j05c}? zhp@GZvU5{C*LO@5{8zOlVF1IAgPZ-Ui@l?nVwQ7R#d+s`@gf&*zQ60nR$~1?5cR-V z!S~~fx8iSOXc!@kDl#3 z>_Hdv(MFuJ53p%&5zyRHh0AEozhF&sGqSCHf(;?%zc!VXNY8cOZb*Q?K@82XgOuANr~ z;-7+Aa8H*drd53^og2HyHuYK0hu&YhVNE*e63y#^V2Xr7kFx8a=7hz+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