-
-
Notifications
You must be signed in to change notification settings - Fork 58
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
Hotswap Hotbars #850
base: master
Are you sure you want to change the base?
Hotswap Hotbars #850
Conversation
New module (name subject to change) description todo
- hotswappers will retain their custom name when placed and broken - fixes some bugs related to copy-paste typos - still has a bug when placing shulker box with offhand, but that will be irrelevant after next push which changes it to a firework star when in the offhand
- When in the offhand, the hotswapper will turn into a (colored) firework star so the player cannot accidentally place it down - CMD changed to 5 as to not conflict with other firework stars
- allows animi to be added to the hotswapper
- make firework star state nonstackable - prevent crafting a hotswapper with a hotswapper - Firework star states no longer wait until there's no hotswapper in offhand before converting back into a shulker box
Downloaded the artifact, tested in 1.19.4. Works great, feels seamless, can't seem to find any issues 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a few minor points. Code looks good, and the module feels great to use in-game.
It could be be updated with the new 1.19.4 features before release, but that's not at all necessary.
What could be added is a custom texture for the Hotswapper (especially the firework form), kyrkis is looking for something to work on, so you can ask him to make something.
gm4_hotswap_hotbars/data/gm4_hotswap_hotbars/functions/check_item_tags.mcfunction
Outdated
Show resolved
Hide resolved
@@ -0,0 +1 @@ | |||
execute if score gm4_hotswap_hotbars load.status matches 1 if score $crafted gm4_crafting matches 0 store success score $crafted gm4_crafting if score $slot_count gm4_crafting matches 9 if score $stack_size gm4_crafting matches 1 if data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:0b,id:"minecraft:leather"},{Slot:1b,id:"minecraft:leather"},{Slot:2b,id:"minecraft:leather"},{Slot:3b,id:"minecraft:copper_ingot"},{Slot:4b,item_tags:{gm4_hotswap_hotbars:{shulker_boxes:1b}}},{Slot:5b,id:"minecraft:copper_ingot"},{Slot:6b,id:"minecraft:leather"},{Slot:7b,id:"minecraft:leather"},{Slot:8b,id:"minecraft:leather"}]} unless data storage gm4_custom_crafters:temp/crafter {Items:[{Slot:4b,tag:{gm4_hotswap_hotbars:{item:"hotswapper"}}}]} run function gm4_hotswap_hotbars:craft |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
File missing a header
...tswap_hotbars/data/gm4_hotswap_hotbars/functions/place_hotswapper/mark_hotswapper.mcfunction
Outdated
Show resolved
Hide resolved
gm4_hotswap_hotbars/data/gm4_hotswap_hotbars/functions/place_hotswapper/ray.mcfunction
Show resolved
Hide resolved
gm4_hotswap_hotbars/data/gm4_hotswap_hotbars/functions/place_hotswapper/ray_fuzzy.mcfunction
Show resolved
Hide resolved
gm4_hotswap_hotbars/data/gm4_hotswap_hotbars/functions/swap/restore_box.mcfunction
Outdated
Show resolved
Hide resolved
gm4_hotswap_hotbars/data/gm4_hotswap_hotbars/tags/items/shulker_boxes.json
Outdated
Show resolved
Hide resolved
Co-authored-by: Thanathor <[email protected]>
Co-authored-by: Thanathor <[email protected]>
…/GM4_Datapacks into hotswap-hotbars
- add version field - add website field
tested in 1.20, works as expected and was unable to break anything |
Notes after some playtesting:
|
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:
|
Update on this for future us: At some point this will need to be tested & potentially updated to be compatible with newer minecraft versions. |
new recipe as decided in a meeting, now involving 7 copper ingots, 1 shulker box, and 1 piston
- dupe bug introduced when preventing hotswappers and shulker boxes from being saved (issue was the hotswapper item would be dropped since it's invalid, but the function still restores the item into the offhand)
- Change name to "Mechanical Shulker Box" - Hide Firework Star color info
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. |
- only one shulker box at a time would be restored, all others would be lost - light blue shulker boxes were missed and always deleted - all shulker boxes would be returned, not just the ones in the hotbar leading to duped shulker boxes if in the normal inventory
- piston with CMD 3420008 - works in all 6 rotations, matching how a piston is rotated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this in-game and found a couple of issues.
Loss of custom data (breaking):
- Be in survival mode and have a hotswapper in your hotbar
- Place the hotswapper
- Break it by hand
- ❌ The hotswapper loses all its custom data; It is now called 'Customize Hotbars' and no longer becomes a firework star when placed in the offhand.
Wooden swords visuals:
- Have a hotswapper in your offhand, with some items inside
- Press the offhand key (
F
by default) whilst looking down - ❌ You can see wooden swords spawning in for a split second, additionally, if you do this on a hopper the hopper will steal your items (but those items wont be wooden swords)
This PR is outdated, as it does not support 1.21. |
Hotswap Hotbars allows players to craft a new item: the hotswapper!
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.