Advertisement
DakotaPride

Example Health Gain Code Item

Apr 13th, 2022
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. public TypedActionResult<ItemStack> use(World world, PlayerEntity playerEntity, Hand hand, StatusEffect effect) {
  2. effect.addAttributeModifier(EntityAttributes.GENERIC_MAX_HEALTH, "5D6F0BA2-1186-46AC-B896-C61C5CEE99CC",
  3. (amount)D, EntityAttributeModifier.Operation.ADDITION);
  4. return TypedActionResult.success(playerEntity.getStackInHand(hand));
  5. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement