-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add LivingDeathEvent and EntityAddedEvent
- Loading branch information
1 parent
1d7cf6a
commit 2516eae
Showing
4 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
shared/src/main/java/net/blay09/mods/balm/api/event/EntityAddedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package net.blay09.mods.balm.api.event; | ||
|
||
import net.minecraft.world.entity.Entity; | ||
import net.minecraft.world.level.Level; | ||
|
||
public class EntityAddedEvent extends BalmEvent { | ||
private final Entity entity; | ||
private final Level level; | ||
|
||
public EntityAddedEvent(Entity entity, Level level) { | ||
this.entity = entity; | ||
this.level = level; | ||
} | ||
|
||
public Entity getEntity() { | ||
return entity; | ||
} | ||
|
||
public Level getLevel() { | ||
return level; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
shared/src/main/java/net/blay09/mods/balm/api/event/LivingDeathEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package net.blay09.mods.balm.api.event; | ||
|
||
import net.minecraft.world.damagesource.DamageSource; | ||
import net.minecraft.world.entity.LivingEntity; | ||
|
||
public class LivingDeathEvent extends BalmEvent { | ||
private final LivingEntity entity; | ||
private final DamageSource damageSource; | ||
|
||
public LivingDeathEvent(LivingEntity entity, DamageSource damageSource) { | ||
this.entity = entity; | ||
this.damageSource = damageSource; | ||
} | ||
|
||
public LivingEntity getEntity() { | ||
return entity; | ||
} | ||
|
||
public DamageSource getDamageSource() { | ||
return damageSource; | ||
} | ||
} |