I feel very strong with Java, I'm an experienced Android app developer and have done lots of work with Java and ActionScript which is similar.
I just don't know how to work with the minecraft Forge APIs yet as I actually just started modding yesterday
I'm a noob modder but I do at least know enough to create that piece of code. Like Hydro said it would be good to investigate entity interact events. I'm sorry I wish I could help you more, I'm just not an expert though.
Thank you for all the help I think I want to make a coremod, but I don't know where to start. How similar is it to standard modding? Do you know of any good tutorials I could start with?
I have made changes to the EntityPlayer class stored in net.minecraft.entity.player however when I recompile and reobfuscate my mod, then zip it up and put it in my forge mods folder for testing, the changes to EntityPlayer don't appear in game. What is the proper way to make changes to the EntityPlayer class? Am I going about this in the right way at all?
I haven't actually tested it and am fairly new at modding, however I believe in order to deal damage you call the following:
EntityWeWantToDamage.damageEntity(DamageSource par1DamageSource, float par2);
Where EntityWeWantToDamage is replaced by whatever entity you're damaging, and par2 is the amount of damage dealt.