Jump to content

[1.7.10] Custom entities inventory with custom armour rendering


KnightDemon

Recommended Posts

Hello there, I've got a 1.7.10 mod I've worked on a while, I'll be updating it to a newer forge but only after I've got this one little "bug" fixed.

 

I don't want to give out code, if anything I more so want a push in the right direction of where to look.

 

My problem is that I have a custom entity that has modular armour that can be equipped, it does this by having an inventory with slots. I have the entity working fine, it has a GUI for it's inventory and I can change the armour around and have it render fine. The actual issue is when I relog or have a second player log in (this is all in the test forge). When you open the inventory of the entity, the model and render does update and you can see the armour, if you don't ever look inside the inventory, it's just a plain old entity without the armour.

 

I think my issue is a desync error and I would need a packet to send the information about the contents of the inventory to the players in render distance of the entity. I have nearly zero knowledge of packets so that's a problem straight away. If anyone has thought's please let me know. As a last note, the way the inventory is saved is through an Extended Entities file and it doesn't use datawatchers, I have a feeling that if I used datawatchers then I wouldn't have enough of them for other things AND it wouldn't work with the inventory / container / gui etc. but I have no definite clue on that.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.