minecraft-src/net/minecraft/world/entity/monster/Giant.java
2025-07-04 02:00:41 +03:00

23 lines
824 B
Java

package net.minecraft.world.entity.monster;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.ai.attributes.AttributeSupplier.Builder;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.LevelReader;
public class Giant extends Monster {
public Giant(EntityType<? extends Giant> entityType, Level level) {
super(entityType, level);
}
public static Builder createAttributes() {
return Monster.createMonsterAttributes().add(Attributes.MAX_HEALTH, 100.0).add(Attributes.MOVEMENT_SPEED, 0.5).add(Attributes.ATTACK_DAMAGE, 50.0);
}
@Override
public float getWalkTargetValue(BlockPos pos, LevelReader level) {
return level.getPathfindingCostFromLightLevels(pos);
}
}