Agreenstopsign Posted July 12, 2020 Posted July 12, 2020 simply, how do I add an itemstack to a horses saddle/horsearmor slot? Quote
Agreenstopsign Posted July 13, 2020 Author Posted July 13, 2020 am I able to just add it? or do I have to use NBT? (I do not know how to do either..) Quote
Agreenstopsign Posted July 13, 2020 Author Posted July 13, 2020 (edited) 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 July 13, 2020 by Agreenstopsign Quote
Novârch Posted July 13, 2020 Posted July 13, 2020 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. Quote 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".
Agreenstopsign Posted July 13, 2020 Author Posted July 13, 2020 (edited) 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 July 13, 2020 by Agreenstopsign Quote
Novârch Posted July 13, 2020 Posted July 13, 2020 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. Quote 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".
Agreenstopsign Posted July 14, 2020 Author Posted July 14, 2020 (edited) 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 July 14, 2020 by Agreenstopsign Quote
poopoodice Posted July 14, 2020 Posted July 14, 2020 (edited) I don’t think doing that on client (mc) would work, what do you want to do? Edited July 14, 2020 by poopoodice Quote
Agreenstopsign Posted July 14, 2020 Author Posted July 14, 2020 do you have a recommendation for what you think would work? Quote
Recommended Posts
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.