Posted June 6, 201312 yr hey was just wondering how i would code my own sword cause im used to modloader coding and im kinda confused about making swords etc in forge. would love for someone to help me
June 6, 201312 yr Make the item, then override the onLeftClickEntity() function. BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
June 6, 201312 yr Make the item, then override the onLeftClickEntity() function. to code a sword is the on of the easiest things i make. make an new itemclass for it and extends it itemsword: than add these things: setMaxDamage(); getDamageVsEntity(); onHitEntity();//Damage the tool when you hit an entity onDistroyBlock(); //damage the sword when it distroy its block and thats it.
June 6, 201312 yr Make the item, then override the onLeftClickEntity() function. to code a sword is the on of the easiest things i make. make an new itemclass for it and extends it itemsword: than add these things: setMaxDamage(); getDamageVsEntity(); onHitEntity();//Damage the tool when you hit an entity onDistroyBlock(); //damage the sword when it distroy its block and thats it. Or there is that. A more... elegant solution. I'll admit, I was feeling too lazy to check if ItemSword could be successfully overridden. BEWARE OF GOD --- Co-author of Pentachoron Labs' SBFP Tech.
June 6, 201312 yr Make the item, then override the onLeftClickEntity() function. to code a sword is the on of the easiest things i make. make an new itemclass for it and extends it itemsword: than add these things: setMaxDamage(); getDamageVsEntity(); onHitEntity();//Damage the tool when you hit an entity onDistroyBlock(); //damage the sword when it distroy its block and thats it. Or there is that. A more... elegant solution. I'll admit, I was feeling too lazy to check if ItemSword could be successfully overridden. Yeah but there are better ways to make swords. This kind is the really basic easiest form i made. I do think enchants do work. And repair to. zoomx19 you should really learn how to use minecraft efficent to do not ask these kind of questions. I have problems too. but my real problem is. I ask a question and befor someone answer i have the anser find out bye myself. When you see the problem try to read classes of minecraft and whats more important from other mods. Make yourself an ModSource Lib (with all Versions from oldest to newest) thats the way i do and if i have a question i look at their source. And in every case i find an answer. or when was my last question? i think it was something with redstone problems but that i find out by myself. its only a hint^^" Thats it. Bye
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.