74 lines
2.1 KiB
Java
74 lines
2.1 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*
|
|
* Could not load the following classes:
|
|
* org.jspecify.annotations.Nullable
|
|
*/
|
|
package net.minecraft.world.entity.monster;
|
|
|
|
import net.minecraft.sounds.SoundEvent;
|
|
import net.minecraft.sounds.SoundEvents;
|
|
import net.minecraft.world.damagesource.DamageSource;
|
|
import net.minecraft.world.effect.MobEffectInstance;
|
|
import net.minecraft.world.effect.MobEffects;
|
|
import net.minecraft.world.entity.EntityType;
|
|
import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
|
|
import net.minecraft.world.entity.ai.attributes.Attributes;
|
|
import net.minecraft.world.entity.monster.AbstractSkeleton;
|
|
import net.minecraft.world.entity.projectile.AbstractArrow;
|
|
import net.minecraft.world.entity.projectile.Arrow;
|
|
import net.minecraft.world.item.ItemStack;
|
|
import net.minecraft.world.level.Level;
|
|
import org.jspecify.annotations.Nullable;
|
|
|
|
public class Parched
|
|
extends AbstractSkeleton {
|
|
public Parched(EntityType<? extends AbstractSkeleton> type, Level level) {
|
|
super(type, level);
|
|
}
|
|
|
|
@Override
|
|
protected AbstractArrow getArrow(ItemStack projectile, float power, @Nullable ItemStack firingWeapon) {
|
|
AbstractArrow arrow = super.getArrow(projectile, power, firingWeapon);
|
|
if (arrow instanceof Arrow) {
|
|
((Arrow)arrow).addEffect(new MobEffectInstance(MobEffects.WEAKNESS, 600));
|
|
}
|
|
return arrow;
|
|
}
|
|
|
|
public static AttributeSupplier.Builder createAttributes() {
|
|
return AbstractSkeleton.createAttributes().add(Attributes.MAX_HEALTH, 16.0);
|
|
}
|
|
|
|
@Override
|
|
protected SoundEvent getAmbientSound() {
|
|
return SoundEvents.PARCHED_AMBIENT;
|
|
}
|
|
|
|
@Override
|
|
protected SoundEvent getHurtSound(DamageSource source) {
|
|
return SoundEvents.PARCHED_HURT;
|
|
}
|
|
|
|
@Override
|
|
protected SoundEvent getDeathSound() {
|
|
return SoundEvents.PARCHED_DEATH;
|
|
}
|
|
|
|
@Override
|
|
SoundEvent getStepSound() {
|
|
return SoundEvents.PARCHED_STEP;
|
|
}
|
|
|
|
@Override
|
|
protected int getHardAttackInterval() {
|
|
return 50;
|
|
}
|
|
|
|
@Override
|
|
protected int getAttackInterval() {
|
|
return 70;
|
|
}
|
|
}
|
|
|