Skip to content

Commit

Permalink
feat: newbie mode
Browse files Browse the repository at this point in the history
  • Loading branch information
leaftail1880 committed Jul 25, 2024
1 parent 36f8391 commit f995a48
Show file tree
Hide file tree
Showing 28 changed files with 678 additions and 87 deletions.
108 changes: 82 additions & 26 deletions entities/player.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,23 @@
"is_experimental": false,
"properties": {
// used in RP/entities/player.json
"sm:minimap": {
"lw:minimap": {
"type": "bool",
"default": false,
"client_sync": true
},

"lw:newbie": {
"type": "bool",
"default": false,
"client_sync": false
},

"lw:minigame_team": {
"type": "enum",
"values": ["no", "green", "red", "blue", "yellow"],
"default": "no",
"client_sync": false
}
}
},
Expand Down Expand Up @@ -40,13 +53,6 @@
"visible": false,
"display_on_screen_animation": true
},
{
"effect": "saturation",
"duration": 2,
"amplifier": 255,
"visible": false,
"display_on_screen_animation": false
},
{
"effect": "fire_resistance",
"duration": 2,
Expand Down Expand Up @@ -114,24 +120,6 @@
}
},
"components": {
"minecraft:damage_sensor": {
"triggers": [
{
"on_damage": {
"filters": {
"all_of": [
{
"test": "has_tag",
"subject": "self",
"value": "protected"
}
]
}
},
"deals_damage": false
}
]
},
"minecraft:type_family": {
"family": ["player"]
},
Expand Down Expand Up @@ -259,6 +247,74 @@
"event": "player:no_container_open"
}
]
},
"minecraft:damage_sensor": {
"triggers": [
{
"on_damage": {
"filters": {
"all_of": [
{
"test": "has_tag",
"subject": "self",
"value": "protected"
}
]
}
},
"deals_damage": false
},

{
"on_damage": {
"filters": {
"all_of": [
{ "all_of": [{ "test": "bool_property", "domain": "lw:newbie" }] },
{
"any_of": [
{ "test": "is_family", "subject": "other", "value": "player" },
{ "test": "has_damage", "value": "fire_tick" }
]
}
]
}
},
"deals_damage": false //if all of these filters evaluate to true in the current attack interaction, the target will not be hurt.
},
{
"on_damage": {
"filters": {
"any_of": [
{
"all_of": [
{ "test": "enum_property", "domain": "lw:can_climb", "value": "green" },
{ "test": "enum_property", "domain": "lw:can_climb", "value": "green" }
]
},
{
"all_of": [
{ "test": "enum_property", "domain": "lw:can_climb", "value": "blue" },
{ "test": "enum_property", "domain": "lw:can_climb", "value": "blue" }
]
},
{
"all_of": [
{ "test": "enum_property", "domain": "lw:can_climb", "value": "red" },
{ "test": "enum_property", "domain": "lw:can_climb", "value": "red" }
]
},
{
"all_of": [
{ "test": "enum_property", "domain": "lw:can_climb", "value": "yellow" },
{ "test": "enum_property", "domain": "lw:can_climb", "value": "yellow" }
]
}
]
}
},
"deals_damage": false //if any of these filters evaluate to true in the current attack interaction, the target will not be hurt.
}
]
}
},
"events": {
Expand Down
Loading

0 comments on commit f995a48

Please sign in to comment.