Creating a custom backpack is quite challenging, but there are some ways to make it work.
First, you’ll need a powerful JS 1.7.0 build. Since it's not yet published, you’ll need to build it yourself. (I may release a continuation once I figure out how to bind containers with item handlers and the interation of create stress system.)
For now, all we can do is hoping Prunoideae publishes the item handler.
#Cutom Backpack
15 messages · Page 1 of 1 (latest)
StartUp scripts:
StartupEvents.registry("item", event => {
event.create("backpack", "basic")
.maxStackSize(1)
.attachCapability(CapabilityBuilder.ITEM.itemStack(27))
});
ServerScripts:
Paste version of backpack.js from @hexed osprey
You can use NBT to store items instead of relying on powerfuljs, making a basic backpack is possible with KubeJS.
Althought it sucks
const $CompoundTag = Java.loadClass("net.minecraft.nbt.CompoundTag");
Would it be hard to add restriction of what kind of items you can store in the container?
oooooh can I get some more info on this? I need to make items that store numbers and enums
Basically you need to download the source codes if PowerfulJS and build it first.
It's a kind of "Fake Chest". So sadlly you can't : ( I'm finding a way of archiving it.
And I thought Menu JS which hasn't been released will support it.
can you add this to a curios slot and then have the open inv set to a keybind? or make it like a portable ender chest :0
Sounds intersting. Actually available, cuiros is almost data driven.
do you think its doable?
Doable and not that hard.