How To Update NPC Inventory#

../../_images/npc_inv_b.png

Roleplay NPC is capable of holding items and displaying them holding or wearing armor to other places and it is compatible with custom resource pack custom models. textures and so on.

NPC Inventory Slot Type#

  • head - This will assign the item/block on the NPC head armor slot

  • chest - This will assign the item (Chestplate only) to the NPC chest plate armor slot

  • legs - This will assign the item (Legs only) to the NPC leggings armor slot

  • feet - This will assign the item (Boots only) to the NPC Boots armor slot

  • mainhand - This will assign the item/block on the NPC main hand slot

  • offhand - This will assign the item/block on the NPC off hand slot

Hint

To order to get your NPC assigned ID click here to find out

Adding Items into the slots#

Hint

Any custom item such generated from ItemAdder or any custom resource pack RPNPC will make a copy of the item itself including its item data so you will be able to see the custom texture if the resource pack has one.

Now if want to add or update an item into an Inventory slot the process is very simple and basic, to order to assign the item you must hold that item of your choice in your main head and then run this command /rpnpc inv set <Temp ID Slot> <Slot Type>. How you can find the valid inventory slots above this section.

For a sample, let’s use the items Iron Sword, Book and Gold Helmet and assign them to the NPC. Now let us start with the first item Iron Sword we want to assign this item to the main hand so we will be running this command /rpnpc inv set <Temp ID Slot> mainhand, now we want to do to the same thing for the Book (OffHand) and Gold Helmet (Head)

  • /rpnpc inv set <Temp ID Slot> offhand

  • /rpnpc inv set <Temp ID Slot> head

Once this is done it should look something like this!`

../../_images/npc_inv_add.png

Removing Items from the slots#

Removing the item is some method of adding, but however, you don’t have to hold any items in your inventory. Now for the sample let’s remove the Iron Sword from the NPC inventory slot.

Sample Command: /rpnpc inv set <Temp ID Slot> mainhand

../../_images/npc_inv_rem.png