package net.minecraft.world.entity.boss;

import net.minecraft.world.entity.Pose;
import net.minecraft.network.protocol.Packet;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.entity.EntityDimensions;
import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
import net.minecraft.world.entity.Entity;

public class EnderDragonPart extends Entity {
    public final EnderDragon parentMob;
    public final String name;
    private final EntityDimensions size;
    
    public EnderDragonPart(final EnderDragon aus, final String string, final float float3, final float float4) {
        super(aus.getType(), aus.level);
        this.size = EntityDimensions.scalable(float3, float4);
        this.refreshDimensions();
        this.parentMob = aus;
        this.name = string;
    }
    
    @Override
    protected void defineSynchedData() {
    }
    
    @Override
    protected void readAdditionalSaveData(final CompoundTag jt) {
    }
    
    @Override
    protected void addAdditionalSaveData(final CompoundTag jt) {
    }
    
    @Override
    public boolean isPickable() {
        return true;
    }
    
    @Override
    public boolean hurt(final DamageSource ajz, final float float2) {
        return !this.isInvulnerableTo(ajz) && this.parentMob.hurt(this, ajz, float2);
    }
    
    @Override
    public boolean is(final Entity akq) {
        return this == akq || this.parentMob == akq;
    }
    
    @Override
    public Packet<?> getAddEntityPacket() {
        throw new UnsupportedOperationException();
    }
    
    @Override
    public EntityDimensions getDimensions(final Pose alj) {
        return this.size;
    }
}
