Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Author

yes I know that, however, replaceItemInInventory asks or a number (which represents the slot), and then the itemstack,
I do not know what the number for a horses saddle/horse armor slot is

Edited by Agreenstopsign

1 hour ago, Agreenstopsign said:

yes I know that, however, replaceItemInInventory asks or a number (which represents the slot), and then the itemstack,
I do not know what the number for a horses saddle/horse armor slot is

Well look through the code and find out, it has to be somewhere, my guess is 0 for the saddle and 1 for the armor.

It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".

  • Author

I have looked quite a bit.. and I have also tested 0 and 1, and it just creates the item stack in my hotbar slots 0 and 1.
I also looked through a bit of code for horses, and whenever saddle slot was brought up, I would see either 3, or -18, however, once again neither work, -18 crashes the game, and 3 simply adds it to hotbar

 

Edited by Agreenstopsign

4 minutes ago, Agreenstopsign said:

I have looked quite a bit.. and I have also tested 0 and 1, and it just creates the item stack in my hotbar slots 0 and 1

 

I'm gonna take a wild guess and say you're calling the method on the player, I can't be certain without seeing your code.

It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".

  • Author

I have found that the horses saddle slot is most likely 400, and armor slot is 401.. however I still cannot seem to add an itemstack, I have "mc.player.getRidingEntity().replaceItemInInventory(401, itemstack);"
but still, in game nothing seems to happen

I found out the info about the slot number in the file for the /ReplaceItem command, 

 

Edited by Agreenstopsign

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.