Skip to content

Commit

Permalink
Actually set the thrower lol
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed Jul 21, 2023
1 parent 205defd commit 11181c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,8 @@ public UUID getThrowerUUID() {
public Entity getThrower() {
return ((LevelExt)level()).getEntityByUuid(thrower);
}

public void setThrower(Entity thrower) {
this.thrower = thrower.getUUID();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public InteractionResultHolder<ItemStack> use(Level world, Player user, Interact
if (isSuper) {
pellet.resetLife(-1);
}
pellet.setThrower(user);
world.addFreshEntity(pellet);
return InteractionResultHolder.consume(item);
}
Expand Down

0 comments on commit 11181c7

Please sign in to comment.