Hello i’m 1697 today we’re showing you how to create a food that when you eat it poisons your health so it makes your health go down for a certain amount of time so we’ll be creating the food adding the necessary stuff and then adding these this thing at the very end Well not very end but here um which gives this food its poison effect and why it goes where it goes and not just at the end so i’ve set up my basic um modern school class file and we’re going to be creating a green apple so Like it’s going to be an apple same texture and that one it’s going to be green and when you eat it poisons your health for a certain amount of time so first we’re going to declare the food as if it wasn’t poisoned through just a normal food so we’re going to put public Static final item and then green apple actually i’ll put apple green to fit like the pattern of apple red and apple gold and equals new item food and then first you put the id so i just put some like that second thing is the amount of half hearts it Heals now because i want this to poison your health and not and not heal your hunger level and put it as zero which means nothing’s filled up when you eat it one f for the saturation i’ll just put it as one f still don’t know what that does and false which means that You can’t feed this to a wolf and you put dot set item and give it a name that mod loader will recognize so green apple space from there semicolon that’s uh food declared and now the next thing i’ve done is just put in the stuff we need so let’s add in The name of it inventory name um um add in the texture of it’s overwriting the items.png with our own texture which is apple green which i’ll show you later on and i’ve added a recipe where if you put one block of dirt in your inventory or crafting table Then you get two green apples back and then next thing and the very last thing in this code we need to do is to add that thing we called set potion effect which gives this food the effect of a certain potion and in this case it’s the one That poisons your health makes it drop down a certain amount of seconds so what we need to do is in between these these brackets after item food and before set item name we need to put this code because you put it after set item Name it will mess it up so as long as it’s before set item name and obviously it has to be passed here then it will work fine so we need to put here dot set potion effect and we need to put what potion effect is going to happen proportion dot and we Want poison which means it poisons the health and then we have to put dot id a comma and now we need to say what how many seconds is last i want it to last for five seconds the next one is something called an amplifier which means extends it but i Never quite understood how it extends it may be like how times uh duration here or adds on order now so i’ll leave that as zero so it’s going to be in total five seconds that’s how long it’s going to last and then last things uh the Chance of it happening so i’m gonna put one f which means there’s a hundred percent of it happening so like stuff like uh spider eyes i think that’s one f as well but something like rotten flesh which is completely different to here but it still uses the same Number format you put as 0.8 f which means there’s an 80 chance of it poisoning you but there’s a 20 chance it will so that’s the code done you Video Information
This video, titled ‘Minecraft Complete Modding Guide / #20 Part 1/3 | Creating A Food That Poisons Health (mod_***)’, was uploaded by SikhStar97tutorials on 2012-08-22 20:34:35. It has garnered 70 views and 3 likes. The duration of the video is 00:03:39 or 219 seconds.
Minecraft Complete Modding Guide Episode 20 Part 1. I show you how to create a food that poisons your health on consumption.
Files: http://www.mediafire.com/#l688y9wd9ab2o
All Episodes: http://www.youtube.com/playlist?list=PL32ED47AA6CCFAB24 Forum Topic (written tutorials): http://www.minecraftforum.net/topic/1211047-
My Tutorials Channel: http://www.youtube.com/sikhstar97tutorials My Gaming Channel: http://www.youtube.com/sikhstar97 My Reviews Channel: http://www.youtube.com/sikhstar97nar My Twitter: http://www.twitter.com/sikhstar97 My Facebook: http://www.facebook.com/sikhstar97