Deep Mob Learning: Refabricated

Deep Mob Learning: Refabricated

3M Downloads

Expose an API for data models.

ProjectET opened this issue ยท 5 comments

commented

Hi, I'm making an addon mod for Deep Mob Learning and I need to get the data amount from the data models, would it be possible to expose that as an API or would there be another way to do that without having to expose an API?

commented

I'll be closing this because it seems pointless at the current state of the mod

commented

Hello, I will keep this as a feature request for the 1.17 update.

For now, you can simply use the NBT of the ItemStack.

It may be a good idea to import the mod in your compile time and use this method: https://github.com/NathanPB/DeepMobLearning-Refabricated/blob/70f74739fd9458a019c9e615d68395aa60a269ed/src/main/kotlin/dev/nathanpb/dml/data/DataModelData.kt#L43

So you can do something like: stack.dataModel.dataAmount = foobar.

To manage the NBT I'm using this little library I made: https://github.com/NathanPB/KtDataTagLib

commented

Thanks for the quick reply! ๐Ÿ‘๐Ÿป

commented

Haha yeah will do!

commented

No problem, feel free to ask if you need something else.

I saw the Discord messages ๐Ÿ‘€