Skip to content

Commit

Permalink
Update for 1.21
Browse files Browse the repository at this point in the history
WBIT Integration to be considered in future
  • Loading branch information
AvgZing committed Jun 29, 2024
1 parent 30a61fc commit 859470d
Show file tree
Hide file tree
Showing 9 changed files with 207 additions and 180 deletions.
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# 1PS-and-More
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.

## Warning
This is not updated to 1.20, where the Player Sleep Percentage gamerule was added. You will have to set that percentage to 1 to get the 1 player sleeping effect. You're still free to use this addon, but it'll need to be combined with that gamerule.
The functions in this addon will be adjusted to accomodate this new gamerule soon.
Combined pack using player.json, including:
1. One Player Sleep system (This sends a message in chat for sleeping players, a good morning notice, makes sure sleeppercent is at 0, and resets the weather), originally by AvgZing
2. Death Counter Scoreboard (Scoreboard ID "deaths"), originally by RavinMadHatter
3. AFK Display (Sets players to AFK after 5 minutes, scoreboard ID afk_display), originally by DrAv
28 changes: 28 additions & 0 deletions animation_controllers/afk_display.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.afk_check": {
"states": {
"default": {
"transitions": [
{
"afk": "!q.is_moving && q.is_alive"
}
]
},
"afk": {
"animations": ["afk_timer"],
"transitions": [
{
"default": "q.is_moving"
}
],
"on_exit": [
"/scoreboard players reset @s afk_time",
"/scoreboard players reset @s afk_display"
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.death_counter_j5cfmnkccwt7ppim3lsyue": {
"controller.animation.death_counter": {
"initial_state": "alive",
"states": {
"alive": {
Expand All @@ -11,7 +11,7 @@
}
],
"on_exit": [
"/scoreboard players add @s deaths_J5CfmnKCc 1"
"/scoreboard players add @s deaths 1"
]
},
"dead": {
Expand Down
12 changes: 3 additions & 9 deletions animations/1ps.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@
"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"
]
"0.0": ["/gamerule playersSleepingPercentage 0", "/me §ewent to bed. Sweet dreams."],
"4.9": ["/weather rain", "/title @s actionbar §eGood Morning!"],
"5.0": ["/toggledownfall"]
}
}
}
Expand Down
19 changes: 19 additions & 0 deletions animations/afk_display.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"format_version": "1.8.0",
"animations": {
"animation.start_afk_timer": {
"loop": true,
"animation_length": 1.0,
"timeline": {
"0.0": [
"/scoreboard objectives add afk_time dummy",
"/scoreboard objectives add afk_display dummy \"§7Player AFK\"",
"/scoreboard objectives setdisplay belowname afk_display",
"/scoreboard players add @s afk_time 1",
"/scoreboard players reset * afk_display",
"/execute as @a[scores={afk_time=300..}] run scoreboard players set @s afk_display 1"
]
}
}
}
}
14 changes: 14 additions & 0 deletions animations/death_counter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"format_version": "1.10.0",
"animations": {
"animation.start_death_counter": {
"timeline": {
"0.0": [
"/scoreboard objectives add deaths dummy Deaths"
]
},
"animation_length": 1.0,
"loop": false
}
}
}
15 changes: 0 additions & 15 deletions animations/death_counter_start_j5cfmnkccwt7ppim3lsyue.json

This file was deleted.

Loading

0 comments on commit 859470d

Please sign in to comment.