Download DolphinsWithGills — Minecraft Mods — MetaMods

DolphinsWithGills

Active

Downloads

0

Last update

1 year ago

Versions

1.13 — 1.21
Server
Game mechanics
Mobs

[[DolphinsWithGills]] - Dolphin Protection from Drowning and Dryout

This simple yet effective Minecraft modifier saves dolphins from dying by drowning or drying out. Thanks to this plugin, you'll never see these beautiful creatures perish from lack of water.

Main Functionality:

The modification automatically blocks damage to dolphins in two critical situations:

  • Drowning damage from prolonged underwater stays
  • Dryout damage from extended time on land

Technical Implementation:

@EventHandler
public void onEntityDamage(EntityDamageEvent event) {
    if (event.getEntityType() != EntityType.DOLPHIN) return;
    DamageCause cause = event.getCause();
    if (cause == DamageCause.DROWNING) event.setCancelled(true);
    if (cause == DamageCause.DRYOUT) event.setCancelled(true);
}

The code monitors mob damage events and automatically cancels drowning and dryout damages when applied to dolphins.

Project members
DrBot

DrBot

Developer

Created: 22 Apr 2024

ID: 25032