Skip to content

Commit

Permalink
snapper has increased health when tamed
Browse files Browse the repository at this point in the history
  • Loading branch information
NewJumper committed Dec 12, 2023
1 parent e522916 commit 54ca207
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ public boolean isFood(ItemStack pStack) {
return pStack.is(Items.NETHERITE_CHESTPLATE) && !pStack.getEnchantmentTags().isEmpty();
}

@Override
public void setTame(boolean pTamed) {
super.setTame(pTamed);
System.out.println(pTamed);
if(pTamed) {
this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(16);
this.setHealth(16f);
}
}

@Override
public InteractionResult mobInteract(Player pPlayer, InteractionHand pHand) {
ItemStack stack = pPlayer.getItemInHand(pHand);
Expand Down

0 comments on commit 54ca207

Please sign in to comment.