Jump to content

Doublecaster

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Doublecaster's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I managed to solve this problem by adding damage source field to my ItemSword wrapper which the fire sword extends. Then in LivingHurtEvent I took the attacking entity from .getSource().getTrueSource() and checked if that entity is a player. If it is a player I'll check what he is wielding and if that item is instance of my ItemSword. If it was my ItemSword I can get the damage type from it and then apply the resistance as I wanted.
  2. I believe that the JSON file names are case sensitive. Try renaming itemvapestick.json to ItemVapeStick.json
  3. Hey! I have created new damage source called fire and my goal is that I want to reduce this type of damage in the LivingHurtEvent if the target has resistance to this new source. Now the problem is that I am not able cause this new type of damage from my fire sword. I've tried adding "target.attackEntityFrom(new DamageSource("mymod.fire"), 10f)" to the hitEntity function in the fire sword, but this seems to cause two attacks. The original attack with the source of player and a new attack with the new source. So my question is it possible to change this fire swords damage source from player to fire, or is it possible to cancel first damage caused by player and just apply the fire damage?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.