Skip to content

Commit

Permalink
Fix split mobling on death event by changing event name and triggerin…
Browse files Browse the repository at this point in the history
…g task on death
  • Loading branch information
freshc0w committed Oct 10, 2023
1 parent bc8c0e6 commit 1113a08
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SplitMoblings extends Component {
public static final float MAX_X_BOUNDS = (float) 18.5;
public static final float MIN_Y_BOUNDS = 0;
public static final float MAX_Y_BOUNDS = 8;
public static final String DIE_START_EVENT = "dieStart";
public static final String DIE_START_EVENT = "splitDeath";

/**
* Initialises a component that splits mob into multiple moblings. Amount of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ private void animate() {
case ATTACK -> owner.getEntity().getEvents().trigger("water_slime_attack");
case DEATH -> {
owner.getEntity().getEvents().trigger("water_slime_death");
owner.getEntity().getEvents().trigger("splitDeath");
}
case DEFAULT -> owner.getEntity().getEvents().trigger("default");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,7 @@ public static Entity createSplittingXenoGrunt(int health) {
/**
* Create Splitting water slime
*
* @require Entity to have a "splitDeath"
* @return
*/
public static Entity createSplittingWaterSlime(int health) {
Expand Down

0 comments on commit 1113a08

Please sign in to comment.