Problem with loading inventory items of an entity when loading world

Started by Kalioz on

Topic category: Help with modding (Java Edition)

Last seen on 19:10, 11. Feb 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Problem with loading inventory items of an entity when loading world
Wed, 01/17/2024 - 22:35 (edited)

Hello, I am creating a new creature, which has two slots in its inventory, slot 0 and slot 1, one for a mount and one for a shell but you cannot use both at the same time.
I managed to relate those items to the textures that correspond to them, including a neutral texture when nothing was detected in the slots, and I decided to place them in the armor slots so that when restarting the world they would still remain there.
The problem happens when I reload the world, the game detects an empty inventory and empties the armor slot, thus giving me the neutral texture. After this, the bug is solved by reopening the inventory because it reloads the items and returns to the texture. that corresponds to it, that is why I would like to know if there is any way that when loading the world the inventory items are loaded automatically without having to do it manually, I will show you my procedure in case it is of any use to solve the bug

https://imgur.com/a/5go3bmZ

 

 

Edited by Kalioz on Wed, 01/17/2024 - 22:35