Posted August 26, 20196 yr So i want to be able to make an item that when you eat it u get an item or an item is put in your armor slot is this possible
August 26, 20196 yr 58 minutes ago, McSpank said: So i want to be able to make an item that when you eat it u get an item or an item is put in your armor slot is this possible Yes it is possible. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 26, 20196 yr Author 56 minutes ago, Animefan8888 said: Yes it is possible. so two things one r u like the only one that responds on these forums and two how would i add that to my code
August 26, 20196 yr Just now, McSpank said: o two things one r u like the only one that responds on these forums No, I just do it more often than other people probably. I have the tab open whenever I'm online typically. 2 minutes ago, McSpank said: two how would i add that to my code What MC version are you modding for? 1.12.2 or 1.14.4? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 26, 20196 yr Author 22 minutes ago, Animefan8888 said: No, I just do it more often than other people probably. I have the tab open whenever I'm online typically. What MC version are you modding for? 1.12.2 or 1.14.4? 1.12.2
August 26, 20196 yr Just now, McSpank said: 1.12.2 Ok that might be the simpler one to explain. You just need to extend ItemFood and override ItemFood#onFoodEaten, call the super, and use the player parameter to add an Item to the EntityPlayer#additemStackToInventory or use EntityPlayer#setItemStackToSlot to just put it in the armor slot. Make sure to check if there is something there though. Also addItemStackToInventory returns a boolean of whether it fit in the players inventory if it returns false you'll want to spawn them into the world as EntityItems. VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 27, 20196 yr Author 1 hour ago, Animefan8888 said: Ok that might be the simpler one to explain. You just need to extend ItemFood and override ItemFood#onFoodEaten, call the super, and use the player parameter to add an Item to the EntityPlayer#additemStackToInventory or use EntityPlayer#setItemStackToSlot to just put it in the armor slot. Make sure to check if there is something there though. Also addItemStackToInventory returns a boolean of whether it fit in the players inventory if it returns false you'll want to spawn them into the world as EntityItems. so like im super new so i know what some of it means but not all could u please try and explain more
August 27, 20196 yr 1 minute ago, McSpank said: so like im super new To forge or java? Or both? Because if you are new to java I'm not gonna explain that to you. There is already plenty of info online you can use for that. 2 minutes ago, McSpank said: but not all could u please try and explain more  Why not tell me where you need more help? VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
August 27, 20196 yr Author 7 minutes ago, Animefan8888 said: To forge or java? Or both? Because if you are new to java I'm not gonna explain that to you. There is already plenty of info online you can use for that. Why not tell me where you need more help? ok ill try and find something 7 minutes ago, Animefan8888 said: To forge or java? Or both? Because if you are new to java I'm not gonna explain that to you. There is already plenty of info online you can use for that. Why not tell me where you need more help?
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.