This site works best with JavaScript enabled. Please enable JavaScript to get the best experience from this site.
//Make 3 Wheat From 2 Diamonds Item.addCraftRecipe(296,3,0,[264,2,0]);
function attackHook(attacker,victim){ //id 32 = zombie,id 80 = Arrow if(Entity.getEntityTypeId(victim)==32&&Entity.getEntityTypeId(attacker)==80){ clientMessage("Good Shot"); } }
Quote from Lu_Lu54 I'll pm you some help soon.
Q1 : How To Overwrite Vanilla Recipe
I Tried Overwriting Vanilla Recipes Using This Code But It Didn't Work :
But This Code Adds A New Recipe For Wheat Instead Of Replacing The Old Recipe
Q2 : How To Detect If An Entity Gets Hit By An Arrow
I Tried This Code But It Didn't Work :
function attackHook(attacker,victim){ //id 32 = zombie,id 80 = Arrow if(Entity.getEntityTypeId(victim)==32&&Entity.getEntityTypeId(attacker)==80){ clientMessage("Good Shot"); } }This Code Doesn't Detect If The Zombie Got Hit By The Arrow Or Not...
ok thank you