PeterRDevries Posted March 11, 2014 Posted March 11, 2014 Hello, I'm stuck on a wierd problem some how this does not work? @Override public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_) { p_149670_5_.attackEntityFrom(DamageSource.fallingBlock, 2); } anyone knows what i'm doing wrong? Quote I'm always happy to help others! Java is not my main programming language but I have alot experience in PHP/HTML/JS/CSS3/C#/SQL
coolAlias Posted March 11, 2014 Posted March 11, 2014 What exactly is the problem, other than the horribly named parameters? You're going to have to give us more information. Quote http://i.imgur.com/NdrFdld.png[/img]
PeterRDevries Posted March 11, 2014 Author Posted March 11, 2014 attackentityfrom just doesn't works. Quote I'm always happy to help others! Java is not my main programming language but I have alot experience in PHP/HTML/JS/CSS3/C#/SQL
darty11 Posted March 11, 2014 Posted March 11, 2014 add System.out.println("Debug"); somewhere in that function. If the console spews out "Debug" but doesn't damage whatever it is supposed to, then you know there is a problem with attackentityfrom. But if it doesn't, then you are not using onEntityCollidedWithBlock right. Quote
PeterRDevries Posted March 11, 2014 Author Posted March 11, 2014 I already tried that and yes it is the attack entity from. Quote I'm always happy to help others! Java is not my main programming language but I have alot experience in PHP/HTML/JS/CSS3/C#/SQL
darty11 Posted March 12, 2014 Posted March 12, 2014 The only thing I can think of is that you have a messed up source code. I copy and pasted your exact code into my mod and it works fine. Are you absolutely sure that onEntityCollidedWithBlock is being called and then attackentityfrom is called but it doesn't work? Quote
Recommended Posts
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.