-
Recently Browsing
No registered users viewing this page.
-
Posts
-
Unfortunately that was not the case, there was no change in the result at all.
-
Okay so I'm trying to join one of my friends modded server and it said that illegal state of wheat was stopping me from joining
-
By MrNoodles75 · Posted
@Draco18s I have been figuring everything out since then, by going through the default code and getting information on how to do something -
By AntonBespoiasov · Posted
public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving) { Entity entity = ModMath.getMouseOver(Minecraft.getMinecraft().getRenderPartialTicks(), 0); // Gets entity that entityLiving is looking at if (entity != null && entity instanceof EntityLiving) { ((EntityLiving)entity).attackEntityFrom(DamageSource.MAGIC, 2.0f); ((EntityLiving)entity).setRevengeTarget(entityLiving); } return stack; } Using item that has the implementation of the method above doesn't damage entity. Debugging it showed that attackEntityFrom() is called, code within if statement is executed but entity isn't attacked. I looked into Minecraft's files that use attackEntityFrom() and observed that they just call attackEntityFrom(), just one line of code(I assume that something else that can affect entity attacking process was called before attackEntityFrom() in that files). How can I solve this problem? How can I deal damage to entity?
-
-
Topics
-
Who's Online (See full list)