Jump to content

Achilleus117

Members
  • Posts

    7
  • Joined

  • Last visited

Achilleus117's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I actually made my own type of LightningBoltEntity that extends LightningBoltEntity, I guess it may be a bit easier to pass the information to that?
  2. The DamageSource's data says which entity is holding my custom item? Which property is that? The entity that dealt the damage was the lightning bolt. That's not what I need. I need the entity that is holding my custom item. Using the static entity is working, but it stops the player (and only the player) from ever receiving lightning damage even after dropping the item.
  3. The event provides the entity that is being hit, not the entity that is holding my item. Storing the data like that is working, but once the item is dropped it will still block the damage to the player
  4. I set a static LIvingEntity variable on the handler class and set it to the player entity and checked the damage against that, it works but it doesn't seem like the cleanest solution.
  5. My bad, realized I missed that as soon as I posted that. I made a handler and set it to disable damage when the source was lightning. The problem is that it disables the damage for everybody, how can I make it just disable it when my custom item is being held?
  6. Here (https://mcforge.readthedocs.io/en/latest/events/intro/#canceling) it says to call Event#setCanceled to cancel an event, but how do I check it first? Also, where should I be calling it? Every tick?
  7. I am making a mod that has an item that spawns lightning when used. The lightning is used to attack other entities. I need to block damage from the lightning to just the player. How can I achieve this? I know lightning is one of the DamageSources, is there a way to just block this DamageSource for the user holding the item?
×
×
  • Create New...

Important Information

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