rework of the event system, allowing apps to function more independently and allowing for player scoped apps to handle global events. fixes #596

This commit is contained in:
gnembon committed 2020-12-02 01:02:36 -04:00
1 parent 926c1a8e63
commit d29f49967f
13 files changed
+367 -246

No files matched your search

@@ -90,12 +90,9 @@ calculate(end)->(
)
);
_carpets() -> system_info('world_carpet_rules'):'carpets'=='true';
on_player_places_block(player, item_tuple, hand, block) ->
(
if(block==global_assist_block && _carpets(),
if(block==global_assist_block,
effective_pos = pos(block)+[0.5, 0, 0.5];
if(global_current_start==null||player~'sneaking',//wont complain for first carpet
set_start(effective_pos)
@@ -107,7 +104,7 @@ on_player_places_block(player, item_tuple, hand, block) ->
on_player_uses_item(player, item_tuple, hand) ->
(
if (item_tuple:0 == global_assist_block && hand == 'mainhand' && _carpets(),
if (item_tuple:0 == global_assist_block && hand == 'mainhand',
if (player ~'sneaking',
global_current_mode = global_display_modes:(global_display_modes ~ global_current_mode + 1);
display_title(player, 'actionbar', format('w Distance mode: ','e '+global_current_mode));