#backpack addon with feature plugins
1 messages · Page 1 of 1 (latest)
damn
that's already awesome
maybe add an option that let you put lava or water
or protection complement
I was thinking about that but I don't really like it.
yes, this is a good idea
this is great
First person animations
Would it be possible to do a stack upgrade?
Maybe the ability to lock the backpack and add a lock combination or something
Also maybe a portable brewing stand
how did you add item slots
That's awesome
They are slots from the backpack inventory, you get them with js and add functions and in the json ui you place the collection index of the slot
Maybe a better backpack model
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
that's crazy
how?
The mechanics alone are sweet
this is crazy
I tried but I was not successful but I will keep trying
Awesome, thats really amazing
How do you open the "inventory" from the item?
It's prob teleporting the entity in front of the player while holding the item
So, the "inventory" the player sees is just an json UI interface?
It is an entity which spawns when you have the item in your hand so you can open the inventory
Ahhh, but then, where do you "store " the entity when the player is not holding an item, does it constantly teleports or rides the player? And what happens if you lose the backpack item?
Or do you save the info of the items as dynamic properties in the item?
The entity is constantly teleporting to the player, only the sensor range is very low and having the object in hand is placed right in front of the player.
The truth is, I haven't thought about what happens if you lose the article, I don't know what the result will be, honestly.
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
Yes, you can have multiple backpacks, if you lose the backpack and another player picks it up they will have the same backpack as the other player, I am generating an id for each entity to spawn different entities depending on the id of the item
in that case if a back pack gets destroyed or despawn you could just teleport the entity to that place and make it drops it's inventory, similar to how shulker boxes work
ohh ok ok
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
You're right, I'll see how to solve that aspect.
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