25. Display a Mob’s Health During Combat

In This Chapter

Track damage to mobs during combat

Listen to events when a mob targets a player

Listen to events when a player attacks a mob

Display information about a mob in the game

Retrieve a mob’s current health and maximum health

Select different colors for text output in game text

Use NetBeans to learn about the Spigot class library

Although Minecraft is commonly described as a building game, there’s also a lot of enjoyment to be had from facing off in combat against mobs, other players, and the occasional unfortunate animal when you need food, a leather hide, chicken feathers, or some other item.

The mod for this chapter enhances combat by adding a feature to Minecraft that appears ...

Get Absolute Beginner’s Guide to Minecraft® Mods Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.