diff --git a/programs/survival/README.md b/programs/survival/README.md index ca1f4169..51fe5b78 100644 --- a/programs/survival/README.md +++ b/programs/survival/README.md @@ -92,7 +92,11 @@ Various scripts that modify various game elements, often replicating popular mod you have a 1/50 chance of getting a wet sponge. Can be used to make renewable sponge without the use of lightning RNG manipulation, which in 1.14+ is impossible, hence the name easier_renweable_sponge. - + +### [elytra_swap.sc](https://github.com/gnembon/scarpet/blob/master/programs/survival/elytra_swap.sc): +#### By IceWolf23 + By right-clicking with an elytra or any chestplate this script will swap the items + ### [enchanting_table_bottling.sc](https://github.com/gnembon/scarpet/blob/master/programs/survival/enchanting_table_bottling.sc): #### By Firigion Shift right clicking on an enchanting table with an empty glass bottle consumes it and generates a @@ -180,6 +184,11 @@ Various scripts that modify various game elements, often replicating popular mod #### By Gnottero Allows the player to milk sheeps using a bucket. +### [mob_display_health.sc](https://github.com/gnembon/scarpet/blob/master/programs/survival/mob_display_health.sc): +#### By IceWolf23 + When a player hits any entity, the Mob Type is displayed with the remaining life (in HP) in the actionbar + + ### [nether_poi.sc](https://github.com/gnembon/scarpet/blob/master/programs/survival/nether_poi.sc): #### By Firigion When holding an ender eye, all nether portal points of interest will be shown with a marker. @@ -443,4 +452,5 @@ Various scripts that modify various game elements, often replicating popular mod Xendergo ch-yx Crec0 + IceWolf23 (Many more hopefully!) diff --git a/programs/survival/elytra_swap.sc b/programs/survival/elytra_swap.sc new file mode 100644 index 00000000..16c3a0e8 --- /dev/null +++ b/programs/survival/elytra_swap.sc @@ -0,0 +1,15 @@ +// By right-clicking with an elytra or any chestplate this script will swap the items +// By: IceWolf23 + +global_swappable_items = {'netherite_chestplate','diamond_chestplate','iron_chestplate','golden_chestplate','chainmail_chestplate','leather_chestplate','elytra'}; + + +__on_player_uses_item(player, item_tuple, hand) -> ( + if ( hand == 'mainhand' && inventory_get(player, 38) != null && has(global_swappable_items, item_tuple:0), + playerArmorDressed = inventory_get(player, 38); + handSlot = query(player, 'selected_slot'); + + inventory_set(player, handSlot, 1, playerArmorDressed:0, playerArmorDressed:2); + inventory_set(player, 38, 1, item_tuple:0, item_tuple:2); + ) +); diff --git a/programs/survival/mob_display_health.sc b/programs/survival/mob_display_health.sc new file mode 100644 index 00000000..b657a583 --- /dev/null +++ b/programs/survival/mob_display_health.sc @@ -0,0 +1,10 @@ +// When a player hits any entity, the Mob Type is displayed with the remaining life (in HP) in the actionbar +// By: IceWolf23 + +__on_player_deals_damage(player, amount, entity) -> ( + entity_hp = entity ~ 'health'; + _entityHealth = max(0, entity_hp-floor(amount)); + + text_string = (format('w '+entity)+format('g » ')+format('r '+_entityHealth+' ❤')); + display_title(player, 'actionbar', text_string); +);