added inhabited_time and player events revolving around damage, death and respawns.

This commit is contained in:
gnembon committed 2020-04-12 19:42:04 -03:00
1 parent 0133ceb507
commit d6d6b69fcb
12 files changed
+154 -4

No files matched your search

+10 -1
View File
@@ -276,7 +276,8 @@ global_foo = floor(rand(10));
check_foo_not_zero();
...
check_foo_not_zero() -> if(global_foo == 0, global_foo = 1)
</pre># Variables and Constants
</pre>
# Variables and Constants
`scarpet` provides a number of constants that can be used literally in scripts
@@ -2055,6 +2056,10 @@ Returns generation status as per the ticket system. Can return any value from se
can only be stable in a few states: `full`, `features`, `liquid_carvers`, and `structure_starts`. Returns `null`
if the chunk is not in memory unless called with optional `true`.
### `inhabited_time(pos)`
Returns inhabited time for a chunk.
### `structures(pos), structures(pos, structure_name)`
Returns structure information for a given block position. Note that structure information is the same for all the
@@ -2872,6 +2877,10 @@ __on_player_interacts_with_block(player, hand, block, face, hitvec) //right cli
__on_player_places_block(player, item_tuple, hand, block) // player have just placed the block.
__on_player_interacts_with_entity(player, entity, hand)
__on_player_attacks_entity(player, entity)
__on_player_takes_damage(player, amount, source, source_entity)
__on_player_deals_damage(player, amount, entity)
__on_player_dies(player)
__on_player_respawns(player)
__on_player_rides(player, forward, strafe, jumping, sneaking)
__on_player_jumps(player)
__on_player_deploys_elytra(player)
+4
View File
@@ -519,6 +519,10 @@ Returns generation status as per the ticket system. Can return any value from se
can only be stable in a few states: `full`, `features`, `liquid_carvers`, and `structure_starts`. Returns `null`
if the chunk is not in memory unless called with optional `true`.
### `inhabited_time(pos)`
Returns inhabited time for a chunk.
### `structures(pos), structures(pos, structure_name)`
Returns structure information for a given block position. Note that structure information is the same for all the
+4
View File
@@ -33,6 +33,10 @@ __on_player_interacts_with_block(player, hand, block, face, hitvec) //right cli
__on_player_places_block(player, item_tuple, hand, block) // player have just placed the block.
__on_player_interacts_with_entity(player, entity, hand)
__on_player_attacks_entity(player, entity)
__on_player_takes_damage(player, amount, source, source_entity)
__on_player_deals_damage(player, amount, entity)
__on_player_dies(player)
__on_player_respawns(player)
__on_player_rides(player, forward, strafe, jumping, sneaking)
__on_player_jumps(player)
__on_player_deploys_elytra(player)
@@ -30,6 +30,7 @@ hardness
harvest
in_dimension
in_slime_chunk
inhabited_time
inventory_find
inventory_get
inventory_remove
+5 -1
View File
@@ -25,4 +25,8 @@ __on_player_wakes_up
__on_statistic
__on_tick
__on_tick_ender
__on_tick_nether
__on_tick_nether
__on_player_takes_damage
__on_player_deals_damage
__on_player_dies
__on_player_respawns
@@ -54,7 +54,7 @@
hardness blast_resistance top loaded suffocates power ticks_randomly update block_tick random_tick in_slime_chunk
set without_updates
blocks_movement block_sound material map_colour property block_properties block_data poi set_poi
place_item set_biome biome loaded_status generation_status chunk_tickets
place_item set_biome biome loaded_status generation_status inhabited_time chunk_tickets
structures structure_references set_structure reset_chunk
scoreboard scoreboard_add scoreboard_remove scoreboard_display
@@ -104,6 +104,10 @@
__on_tick
__on_tick_ender
__on_tick_nether
__on_player_takes_damage
__on_player_deals_damage
__on_player_dies
__on_player_respawns
</Keywords>
<Keywords name="Keywords8">$</Keywords>
<Keywords name="Delimiters">00&apos; 01\ 02&apos; 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>