GM4_Datapacks icon indicating copy to clipboard operation
GM4_Datapacks copied to clipboard

Hotswap Hotbars

Open BPR02 opened this issue 2 years ago • 8 comments

Hotswap Hotbars allows players to craft a new item: the hotswapper! Screen_Shot_2023-02-18_at_8 29 33_PM Any shulker box can be used in the recipe and by default the hotswapper is a brown shulker box, but it can be renamed and recolored with no issues. When placed down, players can configure the three additional hotbar rows which will be saved back onto the item when broken.

To use the hotswapper, players must equip it in their offhand. When this happens it will turn into a firework star to prevent players from accidentally placing down the hotswapper as a shulker box.

When equipped in the offhand, swapping hands will instead swap hotbars, cycling between the 3 rows stored in the hotswapper (plus the active hotbar, making 4 rows total). This will store any changes made to the hotbars, so shulker boxes can be stored inside the hotswapper (the only way to put a shulker box in a saved hotbar).

To place down and modify the hotswapper as a shulker box players must go into their inventory and move the hotswapper to a different slot (that's not the mainhand) and it'll convert back to a shulker box. All data is saved between the two states of the hotswapper, so no name, lore, enchantments, shamirs, etc. are lost.

Hotswappers can have the Animi Shamir equipped to it.

BPR02 avatar Feb 19 '23 04:02 BPR02

Downloaded the artifact, tested in 1.19.4. Works great, feels seamless, can't seem to find any issues 👍

EpyonProjects avatar Mar 22 '23 20:03 EpyonProjects

tested in 1.20, works as expected and was unable to break anything

TheThanathor avatar Jul 03 '23 19:07 TheThanathor

Notes after some playtesting:

  • conserve colour during crafting
  • don't allow storing of shulker boxes or hotswappers in firework star form inside hotswappers (really easy to chunk ban an area), instead drop the item at the players feet with 0 PickupDelay
  • don't HideFlags the contents of the shulkerbox
  • crafting recipe might need tweaking

TheThanathor avatar Jul 10 '23 21:07 TheThanathor

I've made the changes outlined in Thanathor's latest post. The recipe tweak hasn't been made since that's waiting for further discussion on discord. I didn't (and currently can't) test the changes, so if someone could see if the following works that'd be great:

  • When crafting, the color of the shulker box doesn't change (test with all colors)
  • When there are items in the hotswapper, the advanced tooltips say what the items are (just like a normal shulker box)
  • Trying to swap a shulker box and/or hotswapper firework star into a new hotbar results in those items being dropped at the player's feet (I forgot how to obtain the firework star item, but there is a minor, non-destructive exploit to get it in the inventory)

BPR02 avatar Jul 25 '23 01:07 BPR02

Update on this for future us: This is still being worked on but has dropped on the priority list (to make space for more important projects such as the Guidebook).

At some point this will need to be tested & potentially updated to be compatible with newer minecraft versions.

Bloo-dev avatar Nov 22 '23 12:11 Bloo-dev

This has had a few updates, notably the crafting recipe has been changed (see below) and the name of the item was changed to "Mechanical Shulker Box." Additionally, a dupe bug that was introduced in the commit to prevent hotswappers and shulker boxes to be stored was squished. Also, now it properly hides the color data of the firework star when it's in the offhand.

I've tested it for 1.20.2 and I didn't see anything that'd break in 1.20.3-1.20.4, though if someone would like to test it, that'd be awesome.

BPR02 avatar Dec 17 '23 03:12 BPR02

New recipe recipe

BPR02 avatar Dec 17 '23 04:12 BPR02

This PR is outdated, as it does not support 1.21.

Bloo-dev avatar Jul 21 '24 11:07 Bloo-dev