package net.minecraft.world.damagesource;

import net.minecraft.network.chat.Style;
import net.minecraft.network.chat.TextComponent;
import net.minecraft.network.chat.HoverEvent;
import net.minecraft.network.chat.ClickEvent;
import net.minecraft.network.chat.ComponentUtils;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.LivingEntity;

public class NetherBedDamage extends DamageSource {
    protected NetherBedDamage() {
        super("netherBed");
        this.setScalesWithDifficulty();
        this.setExplosion();
    }
    
    @Override
    public Component getLocalizedDeathMessage(final LivingEntity akz) {
        final HoverEvent hoverEvent;
        final Object o;
        final Component lf3 = ComponentUtils.wrapInSquareBrackets(new TranslatableComponent("death.attack.netherBed.link", new Object[0])).withStyle(ln -> {
            ln.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://bugs.mojang.com/browse/MCPE-28723"));
            new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponent("MCPE-28723"));
            ((Style)o).setHoverEvent(hoverEvent);
            return;
        });
        return new TranslatableComponent("death.attack.netherBed.message", new Object[] { akz.getDisplayName(), lf3 });
    }
}
