Shadows-of-Fire / Hostile-Neural-Networks

A Minecraft Forge mod about defeating hostile simulations to produce loot drops
MIT License
17 stars 19 forks source link

Cannot use Data Models in custom recipes #28

Closed aaronhowser1 closed 1 year ago

aaronhowser1 commented 1 year ago

I'm trying to make a custom recipe with KubeJS, and I want to use a Self Aware Enderman Model in it.

image

KubeJS:

recipe.shaped('enderstorage:ender_chest',[
        ' H ',
        ' P ',
        ' C '
    ],{
        P: 'enderstorage:ender_pouch',
        C: 'minecraft:ender_chest',
        H: Item.of('hostilenetworks:data_model', '{data_model:{data:1271,id:"hostilenetworks:enderman"}}')
    })

As far as I can see, the data model doesn't include any special nbt that would be breaking this. My first assumption was that each model's nbt was actually just a pointer to the actual information, but no it's just right there. Any idea why this wouldn't be working?

Shadows-of-Fire commented 1 year ago

If the nbt matches exactly the nbt you would see on the real item, it should be working as expected, which leads me to think there may be some sort of mismatch between the "real" item and the "ingredient" item.

Did you write the nbt manually or did you get it from the kjs hand command (or whatever copies your held item into kjs form)?

aaronhowser1 commented 1 year ago

I did /kjs_hand

Shadows-of-Fire commented 1 year ago

Well that's even more bizzare then. Can you use a mod which dumps nbt to tooltip to verify that the item shown in jei has the right nbt?

Also, check if the recipe works as intended. It might be a jei issue we're seeing

aaronhowser1 commented 1 year ago

I did use /ftblibrary nbtedit item to set the NBT, by manually pushing data up until it says Self Aware (specifically, going up until I was 1 below Self Aware and then killing another one)

aaronhowser1 commented 1 year ago

image {Count:1b,id:"hostilenetworks:data_model",tag:{data_model:{data:1271,id:"hostilenetworks:enderman"}}}

image

Using https://www.curseforge.com/minecraft/mc-mods/item-nbt-viewer: image

aaronhowser1 commented 1 year ago

image image huh.

aaronhowser1 commented 1 year ago

image actually this might just be a problem with KubeJS, I'm going to try with a random other NBT-item from another mod to see.

aaronhowser1 commented 1 year ago

image Yep, this tank should have stuff in it. Sorry for the confusion, I'll report to KubeJS!