1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Inventory name

Discussion in 'Facepalm' started by LucGamesDE, Jun 3, 2017.

  1. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    I have a chest tile $t and it's inventory $i. In a later version I was able to change the name of the chest inventory to whatever I want. Is this possible at the moment?
     
  2. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    As far as I know, it does currently work. pocketmine\tile\Chest::setName().
     
  3. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    But does this change the name of the chest INVENTORY?
     
  4. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    What do you think holds the ChestInventory and it's data? Yes, it does. At least, it did. Mojang removed custom inventory names a while back, but I believe they added them back more recently.
     
    Last edited: Jun 3, 2017
  5. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    But how can I change the name of a ender inventory? There is no tile. It's only the inventory
     
  6. corytortoise

    corytortoise Skeleton

    Messages:
    825
    GitHub:
    corytortoise
    There is no EnderchestInventory in PMMP at the moment.
     
  7. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    It's has a tile. Try using a worldedit plugin and doing /setBlock ender_chest, then see itbecome a ghost block when you relogin.
     
  8. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    But I can open a ender chest without a placed chest! The inventory isn't bound to a chest
     
  9. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    I don't think so. Calling BlockEventPacket() can be considered spawning a tile too! The inventory is bounded to the chest, but the ender chest inventory contents are saved along with the player's NBT data (according to Minecraft Wiki).
     
    corytortoise likes this.
  10. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    Ok. And how can I create the chest tile??
     
  11. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Chest or Ender Chest? But I don't think that was what your question was about :3
     
  12. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    I want to spawn a chest tile, open the inventory and set the name of the inventory
     
  13. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    The first two are possible, the third one isn't since 0.16
    cd.PNG
     
  14. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    Ok :/
    But I can't spawn the tile?!
     
  15. LucGamesDE

    LucGamesDE Baby Zombie

    Messages:
    170
    If I spawn a chest using setBlock I can open the inventory. But how can I reset the block after using the chest?
     
  16. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    corytortoise likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.