Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elytra Swap #339

Open
IceWolf23 opened this issue Sep 18, 2022 · 2 comments · May be fixed by #365
Open

Elytra Swap #339

IceWolf23 opened this issue Sep 18, 2022 · 2 comments · May be fixed by #365
Labels
enhancement New feature or request

Comments

@IceWolf23
Copy link

IceWolf23 commented Sep 18, 2022

Elytra Swap with any Chestplate Armor
By right-clicking with an elytra or any chestplate this script will swap the items

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, (

		if ( global_swappable_items ~ (item_tuple:0) != null, (
			
				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);

                return()
				)
			)
		)
	)
);
@IceWolf23 IceWolf23 added the enhancement New feature or request label Sep 18, 2022
@altrisi
Copy link
Collaborator

altrisi commented Sep 22, 2022

Assuming you want to get these into the repo: You should make a Pull Request, that's the way github works for suggesting changes to files in the repo.

@IceWolf23
Copy link
Author

Assuming you want to get these into the repo: You should make a Pull Request, that's the way github works for suggesting changes to files in the repo.

Thanks!

@Ghoulboy78 Ghoulboy78 linked a pull request Feb 5, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants