#backpack addon with feature plugins

1 messages · Page 1 of 1 (latest)

mint galleon
quaint patio
#

that's already awesome

#

maybe add an option that let you put lava or water

#

or protection complement

mint galleon
mint galleon
vocal briar
#

this is great

inland crypt
#

Would it be possible to do a stack upgrade?

formal quarry
#

Also maybe a portable brewing stand

proud jetty
#

how did you add item slots

dusk cave
#

That's awesome

mint galleon
near arch
#

And a slot in the player’s inventory to equip the backpack and open it from there instead of just opening it by clicking

#

Like with a button, same as you did for the portable furnace

vital violet
#

that's crazy

warped knoll
#

how?

trail maple
#

The mechanics alone are sweet

queen yoke
#

this is crazy

mint galleon
wintry marlin
#

Awesome, thats really amazing

pure ore
#

How do you open the "inventory" from the item?

dusk cave
pure ore
mint galleon
pure ore
#

Or do you save the info of the items as dynamic properties in the item?

mint galleon
mint galleon
pure ore
# mint galleon The truth is, I haven't thought about what happens if you lose the article, I do...

I think you could despawn the entity when the player stops holding the item and save the inventory as a text string in the item itself using dynamic properties. Then other players could open the back pack, you could have multiple back packs each one with their one inventory and remove any issues with the entity getting lost or the lag. Of constantly teleporting

Even more, if you make it so you need to hold the item to open the back pack, you can spawn the entity, make it be "tamed" by the player opening it and load the items in the inventory, that way you can detect using the entity when the player closes the inventory, then load the items back into the back pack item, and despawn the entity

#

The only issue I find is the character limit for dynamic properties, but you could use a dynamic property for each slot and I you should be able to save the info of the full inventory in the item

#

.
If you lose the item you could either just let it despawn, or spawn the items in the place the item disappears

mint galleon
pure ore
pure ore
#

As for the entities, I would recommend you that instead of constantly teleporting them to the player, you "store" them in a specific ticking area on the end when non player is holding the back pack with their id, teleporting many entities tends to cause a lot of lag in my experience

mint galleon
pure ore
#

Instead if you leave them in a specific Chunk when not in use, you can still access them when needed but there's not as much impact in the game.

I still think it would be better to save the info of the items in the back pack item itself but it's a bit convoluted to convert the info to strings and vice versa, JSON.stringify doesn't works on item stacks in specific.

If you want I could try and write two functions to convert item stacks into strings and vice versa